From ad8faedac455ae497924b2100ed17a012edbb080 Mon Sep 17 00:00:00 2001 From: bobhan1 Date: Sat, 16 Dec 2023 14:50:46 +0800 Subject: [PATCH] [fix](txn_manager) Fix wrong use of std::map::erase in TxnManager::delete_txn #28507 --- be/src/olap/txn_manager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/be/src/olap/txn_manager.cpp b/be/src/olap/txn_manager.cpp index 6ed2f98a32..e4bf4191f7 100644 --- a/be/src/olap/txn_manager.cpp +++ b/be/src/olap/txn_manager.cpp @@ -652,8 +652,8 @@ Status TxnManager::delete_txn(OlapMeta* meta, TPartitionId partition_id, << (rowset != nullptr ? rowset->rowset_id().to_string() : "0"); } } + it->second.erase(load_itr); } - it->second.erase(load_itr); if (it->second.empty()) { txn_tablet_map.erase(it); _clear_txn_partition_map_unlocked(transaction_id, partition_id);