zhannngchen commented on code in PR #23047:
URL: https://github.com/apache/doris/pull/23047#discussion_r1297935134


##########
be/src/olap/task/index_builder.cpp:
##########
@@ -443,11 +443,26 @@ Status IndexBuilder::modify_rowsets(const 
Merger::Statistics* stats) {
 
     if (_tablet->keys_type() == KeysType::UNIQUE_KEYS &&
         _tablet->enable_unique_key_merge_on_write()) {
-        std::lock_guard<std::mutex> rwlock(_tablet->get_rowset_update_lock());
-        std::shared_lock<std::shared_mutex> wrlock(_tablet->get_header_lock());
-        for (auto rowset_ptr : _output_rowsets) {
-            
RETURN_IF_ERROR(_tablet->update_delete_bitmap_without_lock(rowset_ptr));
+        std::lock_guard<std::mutex> wlock(_tablet->get_rowset_update_lock());
+        std::shared_lock<std::shared_mutex> rlock(_tablet->get_header_lock());

Review Comment:
   Should use lock_guard here



-- 
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