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


##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/sink/StreamWriteFunction.java:
##########
@@ -463,16 +439,15 @@ private void registerMetrics() {
     writeMetrics.registerMetrics();
   }
 
-  protected List<WriteStatus> writeBucket(String instant, DataBucket bucket, 
List<HoodieRecord> records) {
-    bucket.preWrite(records);
+  protected List<WriteStatus> writeRecords(String instant, List<HoodieRecord> 
records) {
     writeMetrics.startFileFlush();
-    List<WriteStatus> statuses = writeFunction.apply(records, instant);
+    List<WriteStatus> statuses = 
writeFunction.apply(deduplicateRecordsIfNeeded(records), instant);

Review Comment:
   The record loc of the first record to write must be ensured, how can we 
avoid the wrong loc if the first record has been dropped through deduplication.



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