Skip to content

Conversation

@huyuanfeng2018
Copy link
Contributor

@huyuanfeng2018 huyuanfeng2018 commented Oct 27, 2025

What is the purpose of the change

Optimize MySQL CDC binlog split lookup from O(n) to O(log n) using binary search.

Brief change log

  • Add sortFinishedSplitInfos() and findSplitByKeyBinary() methods
  • Update BinlogSplitReader to use binary search instead of linear search
  • Add comprehensive unit tests

Performance Impact

  • Time Complexity: O(n) → O(log n)

Verifying this change

Added 6 new unit tests covering various scenarios including edge cases and consistency verification with linear search.

@huyuanfeng2018
Copy link
Contributor Author

hi , @ruanhang1993. Could you have the time to review this Pr? Thank you very much ~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant