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

gc_worker: compare locks by key and timestamp (#16536) #16948

Merged
merged 5 commits into from
Apr 30, 2020

Conversation

sre-bot
Copy link
Contributor

@sre-bot sre-bot commented Apr 30, 2020

cherry-pick #16536 to release-4.0


Signed-off-by: youjiali1995 zlwgx1023@gmail.com

What problem does this PR solve?

Issue Number: close #16490
Problem Summary:
mergeReceiver compares locks by key so that we only resolve the first lock. It's possible a key has locks with different timestamps:

  • A lock on the lagged follower has timestamp 10 and the timestamp is 20 on the leader.
  • A peer has been destroyed but the data haven't been deleted so that we could scan the stale locks.

What is changed and how it works?

What's Changed:
Compare locks by key and timestamp.

Related changes

  • Need to cherry-pick to the release branch

Check List

Tests

  • Unit test
  • Integration test

Release note

Fix the issue that Green GC misses locks when a key has locks with different timestamps.

@sre-bot
Copy link
Contributor Author

sre-bot commented Apr 30, 2020

/run-all-tests

@youjiali1995
Copy link
Contributor

@bb7133 Please merge it.

@jackysp
Copy link
Member

jackysp commented Apr 30, 2020

/merge

@sre-bot sre-bot added the status/can-merge Indicates a PR has been approved by a committer. label Apr 30, 2020
Copy link
Member

@jackysp jackysp left a comment

Choose a reason for hiding this comment

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

LGTM

@sre-bot
Copy link
Contributor Author

sre-bot commented Apr 30, 2020

/run-all-tests

@sre-bot
Copy link
Contributor Author

sre-bot commented Apr 30, 2020

@sre-bot merge failed.

@youjiali1995
Copy link
Contributor

/run-integration-copr-test

2 similar comments
@youjiali1995
Copy link
Contributor

/run-integration-copr-test

@youjiali1995
Copy link
Contributor

/run-integration-copr-test

@zhongzc
Copy link
Contributor

zhongzc commented Apr 30, 2020

/run-integration-copr-test

@jackysp
Copy link
Member

jackysp commented Apr 30, 2020

/merge

@sre-bot
Copy link
Contributor Author

sre-bot commented Apr 30, 2020

Your auto merge job has been accepted, waiting for:

  • 16915

@sre-bot
Copy link
Contributor Author

sre-bot commented Apr 30, 2020

/run-all-tests

@sre-bot
Copy link
Contributor Author

sre-bot commented Apr 30, 2020

@sre-bot merge failed.

@jackysp
Copy link
Member

jackysp commented Apr 30, 2020

/merge

@sre-bot
Copy link
Contributor Author

sre-bot commented Apr 30, 2020

/run-all-tests

@sre-bot
Copy link
Contributor Author

sre-bot commented Apr 30, 2020

@sre-bot merge failed.

@jackysp jackysp merged commit cffc5ad into pingcap:release-4.0 Apr 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/GC status/can-merge Indicates a PR has been approved by a committer. type/bugfix This PR fixes a bug. type/4.0-cherry-pick
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants