dataroaring commented on code in PR #19161:
URL: https://github.com/apache/doris/pull/19161#discussion_r1178986630


##########
be/src/olap/txn_manager.cpp:
##########
@@ -172,7 +172,7 @@ void TxnManager::set_txn_related_delete_bitmap(
     std::unique_lock<std::mutex> txn_lock(_get_txn_lock(transaction_id));
     {
         // get tx
-        std::shared_lock rdlock(_get_txn_map_lock(transaction_id));
+        std::lock_guard<std::shared_mutex> 
wrlock(_get_txn_map_lock(transaction_id));

Review Comment:
   map_lock is used to protect the txn map while txn lock is used to protect 
txn. It seems that, here we should acquire map read lock and released. then 
acquire txn read lock?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

Reply via email to