storage: Add API V2 check for RawKV and TxnKV requests (part 2)#11228
storage: Add API V2 check for RawKV and TxnKV requests (part 2)#11228ti-chi-bot merged 26 commits intotikv:masterfrom
Conversation
Signed-off-by: pingyu <yuping@pingcap.com>
Signed-off-by: pingyu <yuping@pingcap.com>
|
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. DetailsReviewer can indicate their review by submitting an approval review. |
| raw_start_key: Option<Vec<u8>>, | ||
| raw_end_key: Option<Vec<u8>>, |
There was a problem hiding this comment.
We can accept Vec<u8> and call Key::from_raw_maybe_unbounded here.
There was a problem hiding this comment.
I check unbounded and transform to Option<Vec<u8>> in service/kv.rs. So just Key::from_raw is needed here.
There was a problem hiding this comment.
I mean by checking it here, we save repeating the logic of Key::from_raw_maybe_unbounded in kv.rs and also no long bother to raw_start_key.as_ref().map(|x| Key::from_raw(&x[..])) later on.
There was a problem hiding this comment.
But if so, we need to check is_empty() again before passing to check_api_version().
Besides, the signature as Option telling that the argument is optional for unbounded. I think it's more readable.
| start_key: Key, | ||
| end_key: Option<Key>, | ||
| raw_start_key: Vec<u8>, | ||
| raw_end_key: Option<Vec<u8>>, |
Signed-off-by: pingyu <yuping@pingcap.com>
…part2 Signed-off-by: pingyu <yuping@pingcap.com>
Signed-off-by: pingyu <yuping@pingcap.com>
|
@andylokandy |
…part2 Signed-off-by: pingyu <yuping@pingcap.com>
Signed-off-by: pingyu <yuping@pingcap.com>
Signed-off-by: pingyu <yuping@pingcap.com>
Signed-off-by: pingyu <yuping@pingcap.com>
Signed-off-by: pingyu <yuping@pingcap.com>
…part2 Signed-off-by: pingyu <yuping@pingcap.com>
Signed-off-by: pingyu <yuping@pingcap.com>
Signed-off-by: andylokandy <andylokandy@hotmail.com>
|
/merge |
|
@andylokandy: It seems you want to merge this PR, I will help you trigger all the tests: /run-all-tests You only need to trigger If you have any questions about the PR merge process, please refer to pr process. DetailsInstructions 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. DetailsCommit hash: 4a67bc95a4a4cb29d1a57a9da7ae6ceb9c89ec0e |
|
/run-all-tests |
1 similar comment
|
/run-all-tests |
630010a to
fa8c297
Compare
|
/merge |
|
@andylokandy: It seems you want to merge this PR, I will help you trigger all the tests: /run-all-tests You only need to trigger If you have any questions about the PR merge process, please refer to pr process. DetailsInstructions 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. DetailsCommit hash: de4e6ef |
…#11228) * wip Signed-off-by: pingyu <yuping@pingcap.com> * wip Signed-off-by: pingyu <yuping@pingcap.com> * wip Signed-off-by: pingyu <yuping@pingcap.com> * wip Signed-off-by: pingyu <yuping@pingcap.com> * wip Signed-off-by: pingyu <yuping@pingcap.com> * wip Signed-off-by: pingyu <yuping@pingcap.com> * ref tikv#10974: Add API V2 check for RawKV and TxnKV requests (part 2) Signed-off-by: pingyu <yuping@pingcap.com> * ref tikv#10974: Add API V2 check for RawKV and TxnKV requests (part 2) Signed-off-by: pingyu <yuping@pingcap.com> * ref tikv#10974: Add API V2 check for RawKV and TxnKV requests (part 2) Signed-off-by: pingyu <yuping@pingcap.com> * ref tikv#10974: Add API V2 check for RawKV and TxnKV requests (part 2) Signed-off-by: pingyu <yuping@pingcap.com> * resolve conflict Signed-off-by: pingyu <yuping@pingcap.com> * add raw_key_maybe_unbounded_into_option Signed-off-by: pingyu <yuping@pingcap.com> * ref tikv#10974: Add API V2 check for RawKV and TxnKV requests (part 2) Signed-off-by: pingyu <yuping@pingcap.com> * ref tikv#10974: Add API V2 check for RawKV and TxnKV requests (part 2) Signed-off-by: pingyu <yuping@pingcap.com> * ref tikv#10974: address comments Signed-off-by: pingyu <yuping@pingcap.com> * ref tikv#10974: Add API V2 check for RawKV and TxnKV requests (part 2) Signed-off-by: pingyu <yuping@pingcap.com> * ref tikv#10974: Add API V2 check for RawKV and TxnKV requests (part 2) Signed-off-by: pingyu <yuping@pingcap.com> * remove make_invalid_key_prefix_err Signed-off-by: andylokandy <andylokandy@hotmail.com> Co-authored-by: andylokandy <andylokandy@hotmail.com>
|
This PR makes test test_txn_store_rawkv unstable in recent builds. See https://ci.pingcap.net/blue/organizations/jenkins/tikv_ghpr_test/detail/tikv_ghpr_test/12889/pipeline/115. |
Let me see see. |
What problem does this PR solve?
Issue Number: #10974
Problem Summary:
Add API V2 check for RawKV and TxnKV requests.
What is changed and how it works?
Proposal: TiKV API V2
What's Changed:
Add checker logics for the following API:
Related changes
No.
Check List
Tests
Side effects
Breaking backward compatibility: See rfc TiKV API V2 for detail.
Release note