Skip to content
This repository has been archived by the owner on Nov 24, 2023. It is now read-only.

syncer/checkpoint: ignore cancel for update/delete (#1174) #1177

Merged
merged 2 commits into from
Oct 16, 2020

Conversation

ti-srebot
Copy link

cherry-pick #1174 to release-2.0


What problem does this PR solve?

close #1172

What is changed and how it works?

for lease change, when update/delete checkpoint in DB, use a new context with 5-minute timeout, to avoid syncer's cancel() did not let SQL commit.

create checkpoint is only called at syncer's Init, seems OK to be canceled

read checkpoint doesn't have a side effect, OK to be canceled

those methods are called from Run -> handleQueryEvent, which may block when pause/stop. Maybe we need #605

Check List

Tests

  • Pass original test

Code changes

Side effects

Related changes

  • Need to cherry-pick to the release branch

Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@ti-srebot ti-srebot added priority/important Major change, requires approval from ≥2 primary reviewers type/bug-fix Bug fix type/cherry-pick This PR is just a cherry-pick (backport) first-time-contributor labels Oct 16, 2020
Copy link
Member

@csuzhangxc csuzhangxc left a comment

Choose a reason for hiding this comment

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

LGTM

@csuzhangxc csuzhangxc added the status/LGT1 One reviewer already commented LGTM label Oct 16, 2020
@csuzhangxc csuzhangxc added this to the v2.0.0 milestone Oct 16, 2020
@lance6716
Copy link
Collaborator

/run-all-tests

1 similar comment
@lance6716
Copy link
Collaborator

/run-all-tests

@csuzhangxc csuzhangxc merged commit 76918fe into pingcap:release-2.0 Oct 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
first-time-contributor priority/important Major change, requires approval from ≥2 primary reviewers status/LGT1 One reviewer already commented LGTM type/bug-fix Bug fix type/cherry-pick This PR is just a cherry-pick (backport)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants