imay commented on a change in pull request #1576: Change cumulative compaction 
for decoupling storage from compution
URL: https://github.com/apache/incubator-doris/pull/1576#discussion_r311400009
 
 

 ##########
 File path: be/src/olap/tablet_manager.cpp
 ##########
 @@ -737,18 +737,16 @@ TabletSharedPtr 
TabletManager::find_best_tablet_to_compaction(
             }
 
             if (compaction_type == CompactionType::CUMULATIVE_COMPACTION) {
-                if (!table_ptr->try_cumulative_lock()) {
+                MutexLock lock(table_ptr->get_cumulative_lock());
+                if (!lock.own_lock()) {
                     continue;
-                } else {
-                    table_ptr->release_cumulative_lock();
                 }
             }
 
             if (compaction_type == CompactionType::BASE_COMPACTION) {
-                if (!table_ptr->try_base_compaction_lock()) {
+                MutexLock lock(table_ptr->get_base_lock());
+                if (!lock.own_lock()) {
 
 Review comment:
   This is not a try-lock, what does this check mean?

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


With regards,
Apache Git Services

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

Reply via email to