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


##########
hudi-client/hudi-flink-client/src/main/java/org/apache/hudi/client/HoodieFlinkWriteClient.java:
##########
@@ -94,7 +94,7 @@
    * FileID to write handle mapping in order to record the write handles for 
each file group,
    * so that we can append the mini-batch data buffer incrementally.
    */
-  private final Map<String, HoodieWriteHandle<?, ?, ?, ?>> bucketToHandles;
+  private final Map<String, MiniBatchHandle> bucketToHandles;
 

Review Comment:
   Can we just cache the write path instead of write handles to not introduce 
too many unnecessary changes.



##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/sink/StreamWriteFunction.java:
##########
@@ -449,6 +450,7 @@ private boolean flushBucket(DataBucket bucket) {
 
     this.eventGateway.sendEventToCoordinator(event);
     writeStatuses.addAll(writeStatus);
+    writeClient.cleanHandle(bucket.fileID);
     return true;
   }

Review Comment:
   Do we need to clean the handles eagerly for `#flushRemaining` ?



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