danny0405 commented on code in PR #19951:
URL: https://github.com/apache/hudi/pull/19951#discussion_r4022112919


##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/sink/bucket/BucketStreamWriteFunction.java:
##########
@@ -189,6 +196,10 @@ private void bootstrapIndexIfNeed(String partition) {
     log.info("Loading Hoodie Table {}, with path {}/{}", 
this.metaClient.getTableConfig().getTableName(),
         this.metaClient.getBasePath(), partition);
 
+    // Query the coordinator for pending fileIds before loading the committed 
view.
+    // Only needed after a restore.
+    Set<String> pendingFileIds = restoredFromState ? 
requestPendingBucketFileIds(partition) : Collections.emptySet();
+
     // Load existing fileID belongs to this task
     Map<Integer, String> bucketToFileIDMap = new HashMap<>();
     
this.writeClient.getHoodieTable().getHoodieView().getLatestFileSlices(partition).forEach(fileSlice
 -> {

Review Comment:
   can we just change it to `getLatestFileSlicesIncludingInflight` to fix the 
issue?



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