hudi-agent commented on code in PR #19717:
URL: https://github.com/apache/hudi/pull/19717#discussion_r3845637430


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/metadata/HoodieBackedTableMetadataWriter.java:
##########
@@ -435,8 +453,16 @@ private void initializeMetadataPartition(
       Indexer indexer,
       String dataTableInstantTime,
       Map<String, List<FileInfo>> partitionToAllFilesMap,
-      Lazy<List<FileSliceAndPartition>> lazyMergedFileSlices) throws 
IOException {
-    String instantTimeForPartition = 
generateUniqueInstantTime(dataTableInstantTime);
+      Lazy<List<FileSliceAndPartition>> lazyMergedFileSlices,
+      Option<String> requestedIndexPartition) throws IOException {
+    // A requested partition initializes under a fresh solo-family instant, 
never the indexing
+    // action's own instant. The action's completion applies its data commit 
to the metadata table
+    // too, and finding that instant already completed there reads as a 
partial earlier application:
+    // it is rolled back and re-applied, destroying the initialization records 
while leaving the
+    // file groups. The solo family is the established shape for 
metadata-table-only bootstrap
+    // commits and survives that reconciliation.
+    String instantTimeForPartition = requestedIndexPartition.isPresent()

Review Comment:
   🤖 buildMetadataPartitions sets requestedPartitionPaths for any SI or EI 
plan, so a normal single-index CREATE INDEX or HoodieIndexer run now bootstraps 
under a solo instant here rather than the indexing instant it used via 
generateUniqueInstantTime before. Is that switch intended, and do existing 
single-index tests cover the solo-instant path? @nsivabalan could you 
sanity-check the instant choice?
   
   <sub><i>⚠️ AI-generated; verify before applying. React 👍/👎 to flag 
quality.</i></sub>



##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/metadata/HoodieBackedTableMetadataWriter.java:
##########
@@ -435,8 +453,16 @@ private void initializeMetadataPartition(
       Indexer indexer,
       String dataTableInstantTime,
       Map<String, List<FileInfo>> partitionToAllFilesMap,

Review Comment:
   🤖 nit: 'reads as a partial earlier application' is a bit hard to parse — 
maybe 'is treated as a partially applied earlier commit' or similar? The 
surrounding reasoning is worth keeping, just that phrase trips up the read.
   
   <sub><i>⚠️ AI-generated; verify before applying. React 👍/👎 to flag 
quality.</i></sub>



##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/metadata/HoodieBackedTableMetadataWriter.java:
##########
@@ -820,6 +861,10 @@ public void buildMetadataPartitions(HoodieEngineContext 
engineContext, List<Hood
     String indexUptoInstantTime = 
indexPartitionInfos.get(0).getIndexUptoInstant();
     List<String> partitionPaths = new ArrayList<>();
     List<MetadataPartitionType> partitionTypes = new ArrayList<>();
+    // The plan names partition paths; for the index types that cover many 
partitions that is the only thing

Review Comment:
   🤖 nit: this comment is a single run-on sentence that's hard to parse on 
first read — could you split it? Something like: `// For index types that cover 
many partitions, the plan names the specific partition path to build. // Carry 
it through by type so each initialization can pick up its own instant.`
   
   <sub><i>⚠️ AI-generated; verify before applying. React 👍/👎 to flag 
quality.</i></sub>



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