Skip to content

Commit 0312e6a

Browse files
committed
[FLINK-37191][mysql] Avoid back filling if the lowWatermark of BinlogSplit is equal to highWatermark.
1 parent 36da15a commit 0312e6a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
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

+5
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,11 @@ public int compareTo(BinlogOffset that) {
255255
return Long.compare(this.getRestartSkipRows(), that.getRestartSkipRows());
256256
}
257257

258+
// serverId of BinlogOffset in snapshot phase is 0.
259+
if (serverId == 0) {
260+
return 0;
261+
}
262+
258263
// The skip rows are the same, so compare the timestamp ...
259264
return Long.compare(this.getTimestampSec(), that.getTimestampSec());
260265
}

0 commit comments

Comments
 (0)