-
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
session, tikv: allocate task IDs for distsql requests (#16520) #17155
session, tikv: allocate task IDs for distsql requests (#16520) #17155
Conversation
Signed-off-by: sre-bot <[email protected]>
/run-all-tests |
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.
@sticnarf please resolve conflict and fix CI.
Signed-off-by: Yilin Chen <[email protected]>
/run-unit-tests |
/run-unit-tests |
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
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
Your auto merge job has been accepted, waiting for:
|
/run-all-tests |
cherry-pick #16520 to release-4.0
What problem does this PR solve?
Issue Number: close tikv/tikv#7484
Problem Summary:
Currently TiDB provides no information for TiKV that some group of requests belong to the same statement (task). So TiKV's unified read pool uses the start TS of the transaction as the task identifier . It's not suitable in all cases to use start ts as the task id for the unified read pool. For example, in the same transaction, a big query is executed and the following point selects are also downgraded.
What is changed and how it works?
What's Changed:
Currently in this PR, we only set task ids for distsql requests that can be run in transactions. For other distsql requests (like DDL reorg, analyze and checksum), the task id is not provided and TiKV still uses start_ts as task id. And TiKV uses random numbers as the task ids for point gets commands so this PR also does not set task ids for these requests.
Related changes
Check List
Tests
Side effects
Release note
Allocate task IDs for distsql requests to help TiKV schedule them better.