fix: may exceed max tnx in etcd operations (#36775)

issue: #36772

Signed-off-by: jaime <yun.zhang@zilliz.com>
pull/37141/head^2
jaime 2024-10-28 15:37:30 +08:00 committed by GitHub
parent 86687bd8ed
commit 33b0b8df80
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -643,7 +643,7 @@ func (ss *SuffixSnapshot) batchRemoveExpiredKvs(keyGroup []string, originalKey s
// to protect txn finished with ascend order, reverse the latest kv with tombstone to tail of array
sort.Strings(keyGroup)
removeFn := func(partialKeys []string) error {
return ss.MetaKv.MultiRemove(keyGroup)
return ss.MetaKv.MultiRemove(partialKeys)
}
return etcd.RemoveByBatchWithLimit(keyGroup, util.MaxEtcdTxnNum, removeFn)
}