-
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
ddl: make added count correct in adding index #6980
Conversation
/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.
LGTM
If backfillIndexInTxn encounter error, "RunInNewTxn" do retry will also backfill the index which was already filled before encounter error, right? |
/run-common-test |
/run-integration-common-test |
@crazycs520 |
/run-common-test |
errInTxn = kv.RunInNewTxn(w.sessCtx.GetStore(), true, func(txn kv.Transaction) error { | ||
addedCount = 0 | ||
scanCount = 0 | ||
txn.SetOption(kv.Priority, kv.PriorityLow) | ||
idxRecords, handleOutOfRange, err := w.fetchRowColVals(txn, handleRange) |
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.
The indexRecord which was already filled before encounter error will also be backfilled again in retry process, right?
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.
@crazycs520
Yes, it will be backfilled again. If the RunInNewTxn
meets an error, these code lines from 593 to 625 need to retry.
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 |
/run-all-tests |
LGTM |
1 similar comment
LGTM |
There are 5 LGTMs in this pr. But no one wants to approve it. :) |
@jackysp I made the third LGTM, but I am waiting for the CI. |
What have you changed? (mandatory)
fix #6979
"RunInNewTxn" will do retry by itself when it encounters an error.
What are the type of the changes (mandatory)?