store/tikv: make snapshot thread safe#17593
Merged
tiancaiamao merged 4 commits intopingcap:masterfrom Jun 3, 2020
Merged
Conversation
Contributor
Author
Contributor
Author
Member
|
LGTM |
Contributor
|
/merge |
Contributor
|
/run-all-tests |
Codecov Report
@@ Coverage Diff @@
## master #17593 +/- ##
===========================================
Coverage 79.6064% 79.6064%
===========================================
Files 520 520
Lines 140853 140853
===========================================
Hits 112128 112128
Misses 19731 19731
Partials 8994 8994 |
Contributor
|
@tiancaiamao merge failed. |
Contributor
Author
|
/run-all-tests |
tiancaiamao
added a commit
to tiancaiamao/tidb
that referenced
this pull request
Jun 19, 2020
jebter
pushed a commit
that referenced
this pull request
Jun 30, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What problem does this PR solve?
Problem Summary:
After point get executor becoming data source node, snapshot may be used concurrently.
Snapshot is a read-only object, it should be thread safe, but as it cache data, this is not the truth.
What is changed and how it works?
What's Changed:
Add read-write lock on the cache to make snapshot thread safe.
How it Works:
Check List
Tests
Side effects
The performance impact should be negligible.
Release note