fix: [2.4] Check the correct return error in MultiRemove (#33926) (#33966)

Cherry-pick from master
pr: #33926
See also #33925

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
This commit is contained in:
congqixia 2024-06-20 11:28:02 +08:00 committed by GitHub
parent 032685239f
commit c28b69384a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -398,7 +398,7 @@ func (kv *txnTiKV) MultiRemove(keys []string) error {
for _, key := range keys {
key = path.Join(kv.rootPath, key)
loggingErr = txn.Delete([]byte(key))
err = txn.Delete([]byte(key))
if err != nil {
loggingErr = errors.Wrap(err, fmt.Sprintf("Failed to delete %s for MultiRemove", key))
return loggingErr