Skip to content

Conversation

@BLAZZ
Copy link
Contributor

@BLAZZ BLAZZ commented Nov 25, 2022

handler可以获取位点时间戳,用于展示延迟信息:

func (h *handler) OnXID(nextPos mysql.Position) error { h.queue <- model.Position{ Name: nextPos.Name, Pos: nextPos.Pos, Timestamp: nextPos.Timestamp, Force: false,	} return nil }

展示:
binlog文件:mysql-bin.000102
binlog位点:1142900
binlog时间戳:2022-11-25 15:54:07 (1669362847)
距离上次更新: 2秒

)

// For binlog filename + position based replication
type Position struct {
Copy link
Collaborator

@lance6716 lance6716 Nov 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this structure represents the binlog position which can starts a position-based replication, so we should not add other fields. Maybe you can add a new interface EventHandlerV2 with OnXID(nextPos mysql.Position, xidEvent *replication.XIDEvent) error.

And please translate the PR description to English so I can refer non-Chinese reviewers.

@BLAZZ BLAZZ closed this by deleting the head repository Nov 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants