Skip to content
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

lightning: revise the structure of table conflict_error_v1 and add index for faster search #45799

Merged
merged 2 commits into from
Aug 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions br/pkg/lightning/errormanager/errormanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ const (
raw_value mediumblob NOT NULL COMMENT 'the value of the conflicted key',
raw_handle mediumblob NOT NULL COMMENT 'the data handle derived from the conflicted key or value',
raw_row mediumblob NOT NULL COMMENT 'the data retrieved from the handle',
KEY (task_id, table_name)
KEY (task_id, table_name),
INDEX (index_name)
);
`

Expand Down Expand Up @@ -321,7 +322,7 @@ func (em *ErrorManager) RecordDataConflictError(
if em.conflictErrRemain.Sub(int64(len(conflictInfos))) < 0 {
threshold := em.configConflict.Threshold
// Still need to record this batch of conflict records, and then return this error at last.
// Otherwise, if the max-error.conflict is set a very small value, non of the conflict errors will be recorded
// Otherwise, if the max-error.conflict is set a very small value, none of the conflict errors will be recorded
gerr = errors.Errorf(
"The number of conflict errors exceeds the threshold configured by `conflict.threshold`: '%d'",
threshold)
Expand Down