cshuo commented on code in PR #18348:
URL: https://github.com/apache/hudi/pull/18348#discussion_r3044216810


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/metadata/HoodieBackedTableMetadataWriter.java:
##########
@@ -417,7 +401,16 @@ private boolean initializeFromFilesystem(String 
dataTableInstantTime, List<Metad
     }
 
     // Already initialized partitions can be ignored
-    partitionsToInit.removeIf(metadataPartition -> 
dataMetaClient.getTableConfig().isMetadataPartitionAvailable((metadataPartition)));
+    indexerMapForPartitionsToInit.keySet().removeIf(
+        metadataPartition -> 
dataMetaClient.getTableConfig().isMetadataPartitionAvailable(metadataPartition));
+
+    // For a fresh table, defer RLI initialization
+    if (dataWriteConfig.getMetadataConfig().shouldDeferRliInitForFreshTable()
+        && this.enabledIndexerMap.containsKey(RECORD_INDEX)
+        && 
dataMetaClient.getActiveTimeline().filterCompletedInstants().countInstants() == 
0) {
+      this.enabledIndexerMap.remove(RECORD_INDEX);
+      indexerMapForPartitionsToInit.remove(RECORD_INDEX);
+    }
 

Review Comment:
   Fixed, now RECORD_INDEX partition will be filtered during initializing 
`enabledIndexerMap`.



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