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

zhangchen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 625a8bcb05 [fix](merge-on-write) fix that 
set_txn_related_delete_bitmap may coredump (#20300)
625a8bcb05 is described below

commit 625a8bcb05e37eebbde178aa7694998307db641a
Author: Xin Liao <liaoxin...@126.com>
AuthorDate: Tue Jun 6 17:49:01 2023 +0800

    [fix](merge-on-write) fix that set_txn_related_delete_bitmap may coredump 
(#20300)
---
 be/src/olap/txn_manager.cpp | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/be/src/olap/txn_manager.cpp b/be/src/olap/txn_manager.cpp
index 37fc94bd23..65562e1408 100644
--- a/be/src/olap/txn_manager.cpp
+++ b/be/src/olap/txn_manager.cpp
@@ -198,14 +198,18 @@ void 
TxnManager::set_txn_related_delete_bitmap(TPartitionId partition_id,
         std::lock_guard<std::shared_mutex> 
wrlock(_get_txn_map_lock(transaction_id));
         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());
+        if (load_itr == it->second.end()) {
+            LOG(WARNING) << "transaction_id: " << transaction_id
+                         << " partition_id: " << partition_id << " tablet_id: 
" << tablet_id
+                         << " may be cleared";
+            return;
+        }
         TabletTxnInfo& load_info = load_itr->second;
         load_info.unique_key_merge_on_write = unique_key_merge_on_write;
         load_info.delete_bitmap = delete_bitmap;


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

Reply via email to