Hastyshell commented on code in PR #62272:
URL: https://github.com/apache/doris/pull/62272#discussion_r3062001822


##########
be/src/cloud/cloud_schema_change_job.cpp:
##########
@@ -118,6 +118,31 @@ Status CloudSchemaChangeJob::process_alter_tablet(const 
TAlterTabletReqV2& reque
             base_max_version = v;
         }
     });
+    // Check for cross-V1 compaction rowsets BEFORE registering SC job in 
meta-service.
+    // This must happen before prepare_tablet_job because meta-service treats
+    // same job_id + initiator as idempotent and returns the old alter_version.
+    // By checking first, we avoid registering a stale alter_version; on retry
+    // base_max_version will be higher and the crossing rowset falls within 
range.
+    // Compaction that commits AFTER prepare_tablet_job is protected by
+    // meta-service's clear_compaction + JOB_CHECK_ALTER_VERSION.
+    {

Review Comment:
   what if v1 is compacted after precheck finished and before tablet job 
prepared



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