codope commented on code in PR #10860:
URL: https://github.com/apache/hudi/pull/10860#discussion_r1535126995


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/metadata/HoodieBackedTableMetadataWriter.java:
##########
@@ -434,7 +433,12 @@ private boolean initializeFromFilesystem(String 
initializationTime, List<Metadat
             fileGroupCountAndRecordsPair = initializeRecordIndexPartition();
             break;
           case FUNCTIONAL_INDEX:
-            fileGroupCountAndRecordsPair = 
initializeFunctionalIndexPartition();
+            Set<String> functionalIndexPartitionsToInit = 
getFunctionalIndexPartitionsToInit();
+            if (functionalIndexPartitionsToInit.isEmpty()) {
+              continue;

Review Comment:
   No, i changed the logic slightly. `isMetadataPartitionAvailable` in line 392 
only checks for func_index prefix in the metadata partition name. By that 
check, even an old functional index will pass for which we don't need to 
initialize. So, we get the uninitialized functional index partitions based on 
index definition in `getFunctionalIndexPartitionsToInit`. 



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

Reply via email to