-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
table: introduce RowIDShardGenerator
and ReservedRowIDAlloc
to alloc auto row id
#54789
Conversation
Hi @lcwangchao. Thanks for your PR. PRs from untrusted users cannot be marked as trusted with I understand the commands that are listed here. 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 kubernetes-sigs/prow repository. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #54789 +/- ##
=================================================
- Coverage 72.7078% 56.2650% -16.4429%
=================================================
Files 1557 1681 +124
Lines 438108 613294 +175186
=================================================
+ Hits 318539 345070 +26531
- Misses 99847 244707 +144860
- Partials 19722 23517 +3795
Flags with carried forward coverage won't be shown. Click here to find out more.
|
4c57529
to
81c3cc3
Compare
// ShardStep indicates the max size of continuous rowid shard in one transaction. | ||
ShardStep int | ||
shardRemain int | ||
currentShard int64 |
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.
This PR removed those lines because all states are moved to SessionVars
. And every time the txn active, the inner shardStep and shardRemain will be reset
/retest |
@lcwangchao: Cannot trigger testing until a trusted user reviews the PR and leaves an In response to this:
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 kubernetes-sigs/prow repository. |
08ca7e2
to
fdc1b28
Compare
fdc1b28
to
322bb43
Compare
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
[LGTM Timeline notifier]Timeline:
|
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: easonn7, tangenta, tiancaiamao, YangKeao The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What problem does this PR solve?
Issue Number: ref #54397
What changed and how does it work?
This PR introduced two more methods to
MutateContext
to reduce the usage ofGetSessionVars
:GetRowIDShardGenerator()
to return aRowIDShardGenerator
to generate shard for auto-random columns.GetReservedRowIDAlloc()
to return aReservedRowIDAlloc
to reserve row id locally.This PR does not change any code logic.
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.