Skip to content

Commit

Permalink
fix tx mark end check
Browse files Browse the repository at this point in the history
  • Loading branch information
whhe committed Nov 2, 2023
1 parent fd1fa9b commit 330ef20
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion session/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,6 @@ func (s *session) parserBinlog(ctx context.Context) {
}

ENDCHECK:
// 识别到结束标识时退出,正常情况不会读到这里
if s.needTransactionMark() {
txMark := s.toTransactionMark(e)
if txMark != nil && txMark.MarkType == transactionMarkTypeEnd && txMark.LogFile == record.StartFile && txMark.LogPosition == record.StartPosition {
Expand Down Expand Up @@ -457,6 +456,9 @@ func (s *session) parserBinlog(ctx context.Context) {
s.myRecord = next
record = next
} else {
if s.needTransactionMark() {
continue
}
log.Info("all binlog records processed, exit binlog parser")
break
}
Expand Down

0 comments on commit 330ef20

Please sign in to comment.