yiguolei commented on code in PR #8855:
URL: https://github.com/apache/incubator-doris/pull/8855#discussion_r849388087


##########
be/src/http/action/compaction_action.cpp:
##########
@@ -207,44 +207,42 @@ OLAPStatus 
CompactionAction::_execute_compaction_callback(TabletSharedPtr tablet
         tablet->set_cumulative_compaction_policy(cumulative_compaction_policy);
     }
 
-    OLAPStatus status = OLAP_SUCCESS;
+    Status res = Status::OK();
     if (compaction_type == PARAM_COMPACTION_BASE) {
         BaseCompaction base_compaction(tablet);
-        OLAPStatus res = base_compaction.compact();
-        if (res != OLAP_SUCCESS) {
-            if (res == OLAP_ERR_BE_NO_SUITABLE_VERSION) {
+        res = base_compaction.compact();
+        if (!res) {
+            if (res == 
Status::OLAPInternalError(OLAP_ERR_BE_NO_SUITABLE_VERSION)) {

Review Comment:
   Yes. We'd better not change logic here. And there are many code like this 
because I use search and replace to change the code. Maybe we could use some 
code like isNoSuitableVersionError here to check 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.

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