ddl: make added count correct in adding index (#6980)
This commit is contained in:
@ -587,9 +587,9 @@ func (w *addIndexWorker) fetchRowColVals(txn kv.Transaction, taskRange reorgInde
|
||||
// backfillIndexInTxn will add w.batchCnt indices once, default value of w.batchCnt is 128.
|
||||
// TODO: make w.batchCnt can be modified by system variable.
|
||||
func (w *addIndexWorker) backfillIndexInTxn(handleRange reorgIndexTask) (nextHandle int64, addedCount, scanCount int, errInTxn error) {
|
||||
addedCount = 0
|
||||
scanCount = 0
|
||||
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)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user