From 7c47ea181f8fc3349adbae0547d5ddb65e9e01ba Mon Sep 17 00:00:00 2001 From: Andrew Hutchings Date: Thu, 20 Dec 2018 15:32:32 +0000 Subject: [PATCH] MCOL-1726 Make cleartablelock remove txn from BRM With an API txn (and likely other scenarios) cleartablelock will roll back the txn and lock but leave a stale txn pointer in the BRM. This causes restart/shutdown to warn that transactions are still open. This patch makes sure BRM removes the txn from the list. --- tools/cleartablelock/cleartablelock.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/cleartablelock/cleartablelock.cpp b/tools/cleartablelock/cleartablelock.cpp index 1a907510e..8c08ea224 100644 --- a/tools/cleartablelock/cleartablelock.cpp +++ b/tools/cleartablelock/cleartablelock.cpp @@ -620,6 +620,12 @@ int main(int argc, char** argv) rc = execBulkRollbackReq( msgQueClts, pmList, &brm, tInfo, tblName.toString(), rollbackOnly, errMsg ); + + BRM::TxnID txn; + txn.id = tInfo.ownerTxnID; + txn.valid = true; + brm.rolledback(txn); + if (rc != 0) { logFinalStatus( tblName.toString(), lockID, errMsg );