Skip to content

Commit

Permalink
modify error test for conflicts across engines
Browse files Browse the repository at this point in the history
  • Loading branch information
lyzx2001 committed Feb 18, 2024
1 parent 0dadb83 commit df67d8d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion br/pkg/lightning/errormanager/errormanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -794,7 +794,9 @@ func (em *ErrorManager) ResolveConflictKeysError(
if err := kvRows.Scan(&kvRowsCount); err != nil {
return errors.Trace(err)
}

}
if err := kvRows.Err(); err != nil {
return errors.Trace(err)
}

em.logger.Debug("got kv rows count from table",
Expand All @@ -817,6 +819,9 @@ func (em *ErrorManager) ResolveConflictKeysError(
logutil.Key("raw_key", rawKey),
zap.Binary("raw_row", rawRow))
}
if err := rows.Err(); err != nil {
return errors.Trace(err)
}
return common.ErrFoundDuplicateKeys.FastGenByArgs(rawKey, rawRow)
}
return nil
Expand Down

0 comments on commit df67d8d

Please sign in to comment.