store/tikv: make snapshot thread safe (#17593)#18145
store/tikv: make snapshot thread safe (#17593)#18145jebter merged 11 commits intopingcap:release-4.0from
Conversation
|
@coocood,Thanks for you review. |
|
@tiancaiamao |
Move code from This code is not safe, as txn maybe set to I override GetSnapshot to provide the snapshot. |
|
Link issue #16817 |
|
/run-all-tests |
|
github is unavailable |
|
LGTM |
|
@coocood, Thanks for your review, however we are sorry that your vote won't be count. You already give a LGTM to this PR |
|
@bobotu PTAL |
bobotu
left a comment
There was a problem hiding this comment.
Not in a atomic way, but it should work , as a pointer is in a machine word size (assumption on hardware), either nil or a kv.Snapshot is OK.
This may have a problem with ARMv7?
In particular, the model was originally non-multicopy-atomic: writes could become visible to some other threads before becoming visible to all
Anyway, it isn't a blocker for this PR.
LGTM
|
LGTM |
|
@coocood, Thanks for your review, however we are sorry that your vote won't be count. You already give a LGTM to this PR |
|
@SunRunAway,Thanks for you review. |
|
/merge |
2 similar comments
|
/merge |
|
/merge |
|
/run-all-tests |
|
@tiancaiamao merge failed. |
|
/run-common-test |
|
/run-check_dev |
What problem does this PR solve?
Cherry pick #17593 to release-4.0
Problem Summary:
A correct fix need to cherry pick a series of commits:
#16056
#17555
#17593
#17678
#17911
That maybe too much for 4.0
What is changed and how it works?
make snapshot thread safe
Check List
Tests
Release note