-
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
*: fix panic that upgrade from old version TiDB. #7136
Conversation
table/tables/index.go
Outdated
index := &index{ | ||
idxInfo: indexInfo, | ||
prefix: tablecodec.EncodeTableIndexPrefix(id, indexInfo.ID), | ||
tblInfo: tblInfo, | ||
// The prefix can't Encode from tblInfo.ID, because table partition may change the id to partition id. |
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.
s/Encode/encode
@zimulala PTAL |
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
We need to cherry pick it to release-2.0.
How to know it could work? Please add a manual test result. |
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
What have you changed? (mandatory)
Upgrade tidb from 2.0.5 to master got panic:
The panic is cause by #7109,
tidb/table/tables/index.go
Line 135 in 48a42fe
What is the type of the changes? (mandatory)
How has this PR been tested? (mandatory)
exist tests.
Does this PR affect documentation (docs/docs-cn) update? (mandatory)
NO
Does this PR affect tidb-ansible update? (mandatory)
NO
Does this PR need to be added to the release notes? (mandatory)
NO
Refer to a related PR or issue link (optional)
#7109 #7126
Benchmark result if necessary (optional)
Add a few positive/negative examples (optional)