From 37ff387a2b4e90ca4f262d22181f00e889a75d41 Mon Sep 17 00:00:00 2001 From: zhangxu Date: Wed, 29 Nov 2023 16:05:54 +0800 Subject: [PATCH] fix missing reset hold locks --- pkg/lockservice/txn.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/lockservice/txn.go b/pkg/lockservice/txn.go index 7ba9b16aec09..24b975644719 100644 --- a/pkg/lockservice/txn.go +++ b/pkg/lockservice/txn.go @@ -162,7 +162,6 @@ func (txn *activeTxn) close( table, cs) cs.close() - delete(txn.holdLocks, table) } } @@ -175,10 +174,12 @@ func (txn *activeTxn) close( table, cs) cs.close() - delete(txn.holdLocks, table) } } + for table := range txn.holdLocks { + delete(txn.holdLocks, table) + } txn.txnID = nil txn.txnKey = "" txn.blockedWaiters = txn.blockedWaiters[:0]