Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

puller: ignore fallen back resolved ts #2077

Merged
merged 3 commits into from
Jun 18, 2021
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion cdc/puller/puller.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,18 @@ func (p *pullerImpl) Run(ctx context.Context) error {
lastResolvedTs := p.checkpointTs
g.Go(func() error {
output := func(raw *model.RawKVEntry) error {
// even after https://github.com/pingcap/ticdc/pull/2038, kv client
// could still miss region change notification, which leads to resolved
// ts update missing in puller, however resolved ts fallback here can
// be ignored since no late data is received and the guarantee of
// resolved ts is not broken.
if raw.CRTs < p.resolvedTs || (raw.CRTs == p.resolvedTs && raw.OpType != model.OpTypeResolved) {
log.Panic("The CRTs must be greater than the resolvedTs",
log.Warn("The CRTs is fallen back in pulelr",
zap.Reflect("row", raw),
zap.Uint64("CRTs", raw.CRTs),
zap.Uint64("resolvedTs", p.resolvedTs),
zap.Int64("tableID", tableID))
return nil
}
select {
case <-ctx.Done():
Expand Down