manojpec commented on a change in pull request #4114:
URL: https://github.com/apache/hudi/pull/4114#discussion_r757161168



##########
File path: 
hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/client/SparkRDDWriteClient.java
##########
@@ -450,17 +435,32 @@ private void writeTableMetadata(HoodieTable<T, 
JavaRDD<HoodieRecord<T>>, JavaRDD
       }
       metaClient.reloadActiveTimeline();
 
-      // re-bootstrap metadata table if required
       initializeMetadataTable(Option.of(instantTime));
     }
     metaClient.validateTableProperties(config.getProps(), operationType);
     return getTableAndInitCtx(metaClient, operationType, instantTime);
   }
 
+  /**
+   * Initialize the metadata table if needed. Creating the metadata table 
writer
+   * will trigger the initial bootstrapping from the data table.
+   * <p>
+   * TODO: HUDI-2862 Guard the initial bootstrapping with transaction lock so
+   * as to make the initial metadata table bootstrapping single threaded.
+   *
+   * @param inFlightInstantTimestamp - The in-flight action responsible for 
the metadata table initialization
+   */
+  private void initializeMetadataTable(Option<String> 
inFlightInstantTimestamp) {

Review comment:
       This is called from the `getTableAndInitCtx()` just after the table 
upgrade.




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