yixiutt commented on code in PR #11557:
URL: https://github.com/apache/doris/pull/11557#discussion_r940094774


##########
be/src/olap/txn_manager.cpp:
##########
@@ -168,6 +168,32 @@ Status TxnManager::prepare_txn(TPartitionId partition_id, 
TTransactionId transac
     return Status::OK();
 }
 
+Status TxnManager::set_txn_related_delete_bitmap(TPartitionId partition_id,
+                                                 TTransactionId 
transaction_id, TTabletId tablet_id,
+                                                 SchemaHash schema_hash, 
TabletUid tablet_uid,
+                                                 bool 
unique_key_merge_on_write,
+                                                 DeleteBitmapPtr delete_bitmap,
+                                                 const RowsetIdUnorderedSet& 
rowset_ids) {
+    pair<int64_t, int64_t> key(partition_id, transaction_id);
+    TabletInfo tablet_info(tablet_id, schema_hash, tablet_uid);
+
+    std::unique_lock<std::mutex> txn_lock(_get_txn_lock(transaction_id));
+    {
+        // get tx
+        std::shared_lock rdlock(_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());
+        auto load_itr = it->second.find(tablet_info);
+        DCHECK(load_itr != it->second.end());
+        TabletTxnInfo& load_info = load_itr->second;
+        load_info.unique_key_merge_on_write = unique_key_merge_on_write;
+        load_info.delete_bitmap = delete_bitmap;
+        load_info.rowset_ids = rowset_ids;
+    }
+    return Status::OK();

Review Comment:
   fixed



##########
be/src/olap/rowset/rowset_tree.h:
##########
@@ -76,7 +76,7 @@ class RowsetTree {
     //
     // The returned pointers are guaranteed to be valid at least until this
     // RowsetTree object is Reset().

Review Comment:
   done



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to