-
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
pkg/ddl: fix an issue where endkey usage issues caused index loss #47818
Conversation
Hi @zimulala. 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. |
2ca82e1
to
3862a99
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #47818 +/- ##
================================================
+ Coverage 71.8756% 72.7837% +0.9081%
================================================
Files 1396 1422 +26
Lines 404969 411710 +6741
================================================
+ Hits 291074 299658 +8584
+ Misses 94275 93185 -1090
+ Partials 19620 18867 -753
Flags with carried forward coverage won't be shown. Click here to find out more.
|
3862a99
to
be90c7b
Compare
/test check-dev2 |
@zimulala: 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/test-infra repository. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: tangenta, wjhuang2016 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 |
[LGTM Timeline notifier]Timeline:
|
In response to a cherrypick label: new pull request created to branch |
What problem does this PR solve?
Issue Number: close #46306
Problem Summary:
Ref: #45679. Before this PR(#45679 ), we used [startKey, endKey] with endInclude as the table range. After this PR we used [startKey, endKey.next).
We do "add index" on a branch without #45679, then get startKey and endKey with the range [startKey, endKey].
Then we do upgrade, we will continue to "add index" in the branch with #45679. And we use [startKey, endKey).
What is changed and how it works?
If the old version upgrades to the new version, we add Next to the endKey.
Check List
Tests
deploy v7.1.1+ cluster
set @@global.tidb_ddl_enable_fast_reorg = 0;
Create a table and import 3.5 million rows.
Do
alter table t add index idx(a, b);
, and when it backfills 700,000+ indexes, kill the cluster.Then upgrade this cluster to master.
After upgrading successfully, do
admin check index t idx
Result:
ERROR 8223 (HY000): data inconsistency in table: t, index: idx, handle: 3572562, index-values:"" != record-values:"handle: 3572562, values: [KindString 131 KindString xxx]"
Query OK
.Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.