Skip to content

Commit 7b99c79

Browse files
committed
fix(canal): restore saving position on fake rotate event
1 parent 72a1ce7 commit 7b99c79

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

canal/sync.go

+1-5
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,7 @@ func (c *Canal) runSyncBinlog() error {
5050

5151
// Update the delay between the Canal and the Master before the handler hooks are called
5252
c.updateReplicationDelay(ev)
53-
// if log pos equal zero ,it is a fake rotate event,ignore it.
54-
// see https://github.com/mysql/mysql-server/blob/8cc757da3d87bf4a1f07dcfb2d3c96fed3806870/sql/rpl_binlog_sender.cc#L899
55-
if ev.Header.LogPos == 0 {
56-
continue
57-
}
53+
5854
savePos = false
5955
force = false
6056
pos := c.master.Position()

0 commit comments

Comments
 (0)