Skip to content

Commit 836b99e

Browse files
vjuranekjpechane
authored andcommitted
DBZ-8340 Commit GTID also for TX playload events
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.
1 parent 5757462 commit 836b99e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main/java/com/github/shyiko/mysql/binlog/BinaryLogClient.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1193,6 +1193,9 @@ protected void updateGtidSet(Event event) {
11931193
MariadbGtidListEventData mariadbGtidListEventData = (MariadbGtidListEventData) EventDeserializer.EventDataWrapper.internal(event.getData());
11941194
gtid = mariadbGtidListEventData.getMariaGTIDSet().toString();
11951195
break;
1196+
case TRANSACTION_PAYLOAD:
1197+
commitGtid();
1198+
break;
11961199
default:
11971200
}
11981201
}

0 commit comments

Comments
 (0)