Skip to content

Commit

Permalink
vstreamer: include gtid events in binlog commit queries
Browse files Browse the repository at this point in the history
Signed-off-by: Max Englander <[email protected]>
  • Loading branch information
maxenglander committed Oct 3, 2023
1 parent 2f1fc13 commit 10132ec
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions go/vt/vttablet/tabletserver/vstreamer/vstreamer.go
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,9 @@ func (vs *vstreamer) parseEvent(ev mysql.BinlogEvent) ([]*binlogdatapb.VEvent, e
})
case sqlparser.StmtCommit:
vevents = append(vevents, &binlogdatapb.VEvent{
Type: binlogdatapb.VEventType_GTID,
Gtid: replication.EncodePosition(vs.pos),
}, &binlogdatapb.VEvent{
Type: binlogdatapb.VEventType_COMMIT,
})
case sqlparser.StmtDDL:
Expand Down

0 comments on commit 10132ec

Please sign in to comment.