raftstore-v2: implement local read for raftstore-v2
What is changed and how it works?
Issue Number: Ref #12842
What's Changed:
This PR involves:
- Refactor
LocalReaderof raftstore-v1 to make some code sharable with raftstore-v2 - Implement
LocalReaderof raftstore-v2 and add relevant tests - Replace
callbackwithReadCallbacktrait
Related changes
- PR to update
pingcap/docs/pingcap/docs-cn: - Need to cherry-pick to the release branch
Check List
Tests
- Unit test
- Integration test
Release note
None
[REVIEW NOTIFICATION]
This pull request has been approved by:
- 5kbpers
- tonyxuqqi
To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.
The full list of commands accepted by this bot can be found here.
Reviewer can indicate their review by submitting an approval review. Reviewer can cancel approval by submitting a request changes review.
/test
/test
/merge
@5kbpers: It seems you want to merge this PR, I will help you trigger all the tests:
/run-all-tests
You only need to trigger /merge once, and if the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.
If you have any questions about the PR merge process, please refer to pr process.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.
This pull request has been accepted and is ready to merge.
/test
Why merge this? I think it depends on #13568
Why merge this? I think it depends on #13568
The circumstance here is much easier. It only has snap oepration and does not have cache.
The circumstance here is much easier. It only has snap oepration and does not have cache.
It doesn't have cross snapshot cache, but it may has cache within the same region. And this PR also lacks the check of last_valid_ts.
The circumstance here is much easier. It only has snap oepration and does not have cache.
It doesn't have cross snapshot cache, but it may has cache within the same region. And this PR also lacks the check of last_valid_ts.
Checking last_valid_ts means we have to acquire the system time twice? One before getting the snapshot and one after it.
Checking last_valid_ts means we have to acquire the system time twice? One before getting the snapshot and one after it.
Yes, for V1. For v2, only check if latest tablet is None is sufficient.