-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
executor: optimize cursor read point get by reading through pessimistic lock cache #36149
Conversation
Signed-off-by: you06 <[email protected]>
Signed-off-by: you06 <[email protected]>
[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. Reviewer can indicate their review by submitting an approval review. |
Signed-off-by: you06 <[email protected]>
Signed-off-by: you06 <[email protected]>
Code Coverage Details: https://codecov.io/github/pingcap/tidb/commit/1d7e800c363388ca25936127d3d873a9a4d90bdb |
This optimization only works when the following conditions are hit:
Maybe we can push down the lock-if-exist mechanism(RC mode) into TiKV, then it's able to reduce one round RPC for RC, cc @TonsnakeLin. |
Signed-off-by: you06 <[email protected]>
Signed-off-by: you06 <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 9852e8e
|
TiDB MergeCI notify🔴 Bad News! New failing [1] after this pr merged.
|
* master: (27 commits) executor: parallel cancel mpp query (pingcap#36161) store/copr: adjust the cop cache admission process time for paging (pingcap#36157) log-backup: get can restored global-checkpoint-ts when support v3 checkpoint advance (pingcap#36197) executor: optimize cursor read point get by reading through pessimistic lock cache (pingcap#36149) *: add tidb_min_paging_size system variable (pingcap#36107) planner: handle the expected row count for pushed-down selection in mpp (pingcap#36195) *: support show ddl jobs for sub-jobs (pingcap#36168) table-filter: optimize table pattern message and unit tests (pingcap#36160) domain: fix unstable test TestAbnormalSessionPool (pingcap#36154) executor: check the error returned by `handleNoDelay` (pingcap#36105) log-backup: fix checkpoint display (pingcap#36166) store/mockstore/unistore: fix several issues of coprocessor paging in unistore (pingcap#36147) test: refactor restart test (pingcap#36174) ddl: support rename index and columns for multi-schema change (pingcap#36148) test: remove meaningless test and update bazel (pingcap#36136) planner: Reduce verbosity of logging unknown system variables (pingcap#36013) metrics/grafana: bring back the plan cache miss panel (pingcap#36081) ddl: implement table granularity DDL for SchemaTracker (pingcap#36077) *: bazel use jdk 17 (pingcap#36070) telemetry: add reviewer rule (pingcap#36084) ...
What problem does this PR solve?
Issue Number: ref #36162
Problem Summary:
What is changed and how it works?
For the point-get must lock the secondary key, lock it before reading, then later TiDB can read from pessimistic lock cache, this reduces one kv-get RPC.
I test it by an edited sysbench update-non-index(wrap it in pessimistic txns) with the following options:
Before
After
There are no kv-get requests.
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.