Skip to content

Commit

Permalink
lightning: revise the structure of table conflict_error_v1 and add …
Browse files Browse the repository at this point in the history
…index for faster search (#45799)

ref #45774
  • Loading branch information
lyzx2001 committed Aug 4, 2023
1 parent 522a008 commit 57d778f
Showing 1 changed file with 3 additions and 2 deletions.
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

0 comments on commit 57d778f

Please sign in to comment.