Skip to content

Commit

Permalink
DBZ-8340 Commit GTID also for TX playload events
Browse files Browse the repository at this point in the history
When binlog compression is enabled, events are wrapped inside
`TRANSACTION_PAYLOAD` events and thus GTID set is never updated.
This may cause replay of events when the client thread in interrupted
and started again by keep-alive thread as the new client would start
from the original (initial) GTID set.

Updateing GTID set also for `TRANSACTION_PAYLOAD` events ensures that
GTID set is update also when binlog compression is enabled.
  • Loading branch information
vjuranek authored and jpechane committed Oct 24, 2024
1 parent 5757462 commit 836b99e
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1193,6 +1193,9 @@ protected void updateGtidSet(Event event) {
MariadbGtidListEventData mariadbGtidListEventData = (MariadbGtidListEventData) EventDeserializer.EventDataWrapper.internal(event.getData());
gtid = mariadbGtidListEventData.getMariaGTIDSet().toString();
break;
case TRANSACTION_PAYLOAD:
commitGtid();
break;
default:
}
}
Expand Down

0 comments on commit 836b99e

Please sign in to comment.