Skip to content

Commit

Permalink
[MySQL] Fix for DBZ-7037 and apache#2217 to not clear tableMapEventBy…
Browse files Browse the repository at this point in the history
…TableId for fake Rotates Event (apache#3065)
  • Loading branch information
shikai93 authored and wuzhenhua01 committed Aug 4, 2024
1 parent f6e8ad0 commit fcf6f75
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,8 @@ public Event nextEvent(ByteArrayInputStream inputStream) throws IOException {

// DBZ-5126 Clean cache on rotate event to prevent it from growing
// indefinitely.
if (event.getHeader().getEventType() == EventType.ROTATE) {
if (event.getHeader().getEventType() == EventType.ROTATE
&& event.getHeader().getTimestamp() != 0) {
tableMapEventByTableId.clear();
}
return event;
Expand Down

0 comments on commit fcf6f75

Please sign in to comment.