chaoyli commented on a change in pull request #2182: Sending clear txn task 
explicitly after transaction being aborted
URL: https://github.com/apache/incubator-doris/pull/2182#discussion_r345176889
 
 

 ##########
 File path: be/src/olap/txn_manager.cpp
 ##########
 @@ -500,4 +514,32 @@ bool TxnManager::get_expire_txns(TTabletId tablet_id, 
SchemaHash schema_hash, Ta
     return true;
 }
 
+void TxnManager::get_partition_ids(const TTransactionId transaction_id, 
std::vector<TPartitionId>* partition_ids) {
+    ReadLock txn_rdlock(&_txn_map_lock);
+    auto it = _txn_partition_map.find(transaction_id);
+    if (it != _txn_partition_map.end()) {
+        for(int64_t partition_id : it->second) {
+            partition_ids->push_back(partition_id);
+        }
+    }
+}
+
+void TxnManager::_insert_txn_partition_map(int64_t transaction_id, int64_t 
partition_id) {
 
 Review comment:
   _insert_txn_partition_map_unlock may be better, can indicate there is no 
lock in it.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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

Reply via email to