danny0405 commented on a change in pull request #3304:
URL: https://github.com/apache/hudi/pull/3304#discussion_r672946328



##########
File path: 
hudi-flink/src/main/java/org/apache/hudi/sink/StreamWriteFunction.java
##########
@@ -534,6 +544,12 @@ private void bufferRecord(HoodieRecord<?> value) {
     DataBucket bucket = this.buckets.computeIfAbsent(bucketID,
         k -> new 
DataBucket(this.config.getDouble(FlinkOptions.WRITE_BATCH_SIZE), value));
     final DataItem item = DataItem.fromHoodieRecord(value);
+
+    if (!initialized) {
+      bucket.records.add(item);
+      return;
+    }
+

Review comment:
       That's true, we can reuse the buffer blocking logic.




-- 
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: commits-unsubscr...@hudi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to