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


##########
be/src/cloud/cloud_schema_change_job.cpp:
##########
@@ -386,7 +386,16 @@ Status 
CloudSchemaChangeJob::_convert_historical_rowsets(const SchemaChangeParam
 
     DBUG_EXECUTE_IF("CloudSchemaChangeJob.process_alter_tablet.sleep", 
DBUG_BLOCK);
     // process delete bitmap if the table is MOW
+    bool has_stop_token {false};
+    bool should_clear_stop_token {true};
+    Defer defer {[&]() {
+        if (has_stop_token) {
+            
static_cast<void>(_cloud_storage_engine.unregister_compaction_stop_token(
+                    _new_tablet, should_clear_stop_token));
+        }
+    }};
     if (_new_tablet->enable_unique_key_merge_on_write()) {
+        has_stop_token = true;

Review Comment:
   should move `register_compaction_stop_token()` here
   the register and unregister operation should request in same sope?



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