You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by mo...@apache.org on 2023/04/30 12:41:32 UTC

[doris] 05/18: [bugfix](MOW) fix core in set_txn_related_delete_bitmap (#18956)

This is an automated email from the ASF dual-hosted git repository.

morningman pushed a commit to branch branch-1.2-lts
in repository https://gitbox.apache.org/repos/asf/doris.git

commit 42ab87a754cc56edf0ec6482b02159fcfd48b126
Author: yixiutt <10...@users.noreply.github.com>
AuthorDate: Tue Apr 25 10:57:26 2023 +0800

    [bugfix](MOW) fix core in set_txn_related_delete_bitmap (#18956)
    
    Fe will clear transaction info when transaction timeout, but calc delete bitmap
    related logic in DeltaWriter::close_wait will continue. In set_txn_related_delete_bitmap,
    we return directly in such case.
---
 be/src/olap/txn_manager.cpp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/be/src/olap/txn_manager.cpp b/be/src/olap/txn_manager.cpp
index d7a4d947fe..9010e5686e 100644
--- a/be/src/olap/txn_manager.cpp
+++ b/be/src/olap/txn_manager.cpp
@@ -183,6 +183,11 @@ void TxnManager::set_txn_related_delete_bitmap(
         txn_tablet_map_t& txn_tablet_map = _get_txn_tablet_map(transaction_id);
         auto it = txn_tablet_map.find(key);
         DCHECK(it != txn_tablet_map.end());
+        if (it == txn_tablet_map.end()) {
+            LOG(WARNING) << "transaction_id: " << transaction_id
+                         << " partition_id: " << partition_id << " may be cleared";
+            return;
+        }
         auto load_itr = it->second.find(tablet_info);
         DCHECK(load_itr != it->second.end());
         TabletTxnInfo& load_info = load_itr->second;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org