Skip to content

Commit

Permalink
skip query when size is 1
Browse files Browse the repository at this point in the history
  • Loading branch information
whhe committed Aug 12, 2024
1 parent 0144508 commit 145b7a7
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,9 @@ public static BinlogOffset findBinlogOffset(
if (binlogFiles.isEmpty()) {
return BinlogOffset.ofBinlogFilePosition("", 0);
}
if (binlogFiles.size() == 1) {
return BinlogOffset.ofBinlogFilePosition(binlogFiles.get(0), 0);
}

BinaryLogClient client = createBinaryClient(mySqlSourceConfig.getDbzConfiguration());
if (mySqlSourceConfig.getServerIdRange() != null) {
Expand Down

0 comments on commit 145b7a7

Please sign in to comment.