TangSiyang2001 commented on code in PR #45664:
URL: https://github.com/apache/doris/pull/45664#discussion_r1891791764


##########
be/src/olap/olap_server.cpp:
##########
@@ -1073,6 +1073,9 @@ Status 
StorageEngine::_submit_compaction_task(TabletSharedPtr tablet,
                              "task, tablet_id="
                           << tablet->tablet_id() << ", tablet_state=" << 
tablet->tablet_state();
                 _pop_tablet_from_submitted_compaction(tablet, compaction_type);
+                if (!force) {
+                  _permit_limiter.release(permits);
+                }
                 return;

Review Comment:
   And use defer to make it better:
   Defer defer {
       [&]() {
           _pop_tablet_from_submitted_compaction(tablet, compaction_type);
           tablet->compaction_stage = CompactionStage::NOT_SCHEDULED;
       }
   };
   
   And another one in if block:
   Defer defer { 
         if (!force) {
              _permit_limiter.release(permits);
         } 
   }



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