-
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
ddl: fix dist ddl reorg table range endKey #45679
Conversation
Hi @jiyfhust. Thanks for your PR. I'm waiting for a pingcap member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the 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/test-infra repository. |
Hi @jiyfhust. 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/test-infra repository. |
/ok-to-test |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #45679 +/- ##
================================================
+ Coverage 73.3543% 73.3589% +0.0045%
================================================
Files 1272 1275 +3
Lines 393070 393723 +653
================================================
+ Hits 288334 288831 +497
- Misses 86358 86483 +125
- Partials 18378 18409 +31
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
Could you briefly describe the fix in the PR description?
/cc @zimulala |
/test unit-test |
@jiyfhust: The specified target(s) for
Use 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/test-infra repository. |
Sorry, just ignore it. The code annotation mislead me.
it is not [start_key,end_key], but actually [start_key,end_key),so it is not a "tikv/client-go" bug which i said regionCache above. There is no problems now. |
/retest |
@jiyfhust Let me fix this issue in another PR, which will include some tests. Could you revert 47f36bd? Rest LGTM. |
784ff7d
to
a41403c
Compare
/retest-required |
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
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: tangenta, zimulala 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: close #45652
Problem Summary:
What is changed and how it works?
As the issue describe:
function getTableRange:
https://github.com/pingcap/tidb/blob/cf7ae4c3b917f81e43cbb2beab44abf841af52cc/ddl/reorg.go#L669C2-L669C2
return [startHandleKey, endHandleKey];
the reorg will use the range above to backfill index data.
Then splitTableRanges will split [startHandleKey, endHandleKey] into small ranges.
https://github.com/pingcap/tidb/blob/cf7ae4c3b917f81e43cbb2beab44abf841af52cc/ddl/scheduler.go#L267C8-L267C8
the small ranges is like [a, b], [b.next, c],[c.next, d].
here use a function getRangeEndKey:
https://github.com/pingcap/tidb/blob/cf7ae4c3b917f81e43cbb2beab44abf841af52cc/ddl/backfilling.go#L562C17-L562C17
change small ranges to [a, b.next), [b.next, c.next), [c.next, d.next).
and it use a "endInclude" to mark case when it is [c.next d].
This pr:
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.