airborne12 commented on code in PR #71130:
URL: https://github.com/apache/doris/pull/71130#discussion_r4734551995


##########
fe/fe-core/src/main/java/org/apache/doris/alter/SchemaChangeHandler.java:
##########
@@ -2740,6 +2752,9 @@ public int getAsInt() {
                 // For light index changes, directly modify table metadata 
first.
                 modifyTableLightSchemaChange(rawSql, db, olapTable, 
indexSchemaMap, newIndexes,
                         alterIndexes, isDropIndex, jobId, false, propertyMap);
+                if (!indexesToBuild.isEmpty()) {
+                    submitBuildJobs(db, olapTable, indexSchemaMap, 
indexesToBuild);

Review Comment:
   Addressed in #71137, stacked on this PR so that this one keeps its scope.
   
   The metadata record now carries the ids of the indexes that BUILD IMMEDIATE 
builds (`buildIndexIds`, an optional field that older records read as empty). 
Every FE that applies the record remembers the partitions of those indexes that 
have no build job yet, every build job (submitted or replayed) clears its 
partition, and the master submits the jobs that are still missing after a 
failover, skipping dropped tables, indexes and partitions. 
`SchemaChangeHandlerTest#testBuildImmediateJobsRecoveredAfterFailover` replays 
the metadata record and only the first partition's build job, then checks that 
the master submits exactly the missing one.
   



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