Skip to content

Commit 06a70f4

Browse files
committed
增加测试用例
1 parent b943be7 commit 06a70f4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

flink-cdc-connect/flink-cdc-source-connectors/flink-connector-mysql-cdc/src/main/java/org/apache/flink/cdc/connectors/mysql/source/offset/BinlogOffset.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,12 +210,14 @@ public int compareTo(BinlogOffset that) {
210210
// ...
211211
return gtidSet.isContainedWithin(targetGtidSet) ? -1 : 1;
212212
}
213+
214+
// The GTIDs are the same, so compare the completed events in the transaction ...
213215
long restartSkipEvents = this.getRestartSkipEvents();
214216
long targetRestartSkipEvents = that.getRestartSkipEvents();
215-
// The positions are the same, so compare the completed events in the transaction ...
216217
if (restartSkipEvents != targetRestartSkipEvents) {
217218
return Long.compare(restartSkipEvents, targetRestartSkipEvents);
218219
}
220+
219221
// The completed events are the same, so compare the row number ...
220222
return Long.compare(this.getRestartSkipRows(), that.getRestartSkipRows());
221223
} else if (StringUtils.isNotEmpty(gtidSetStr)) {

0 commit comments

Comments
 (0)