You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2021/06/04 02:15:24 UTC

[GitHub] [hudi] yuzhaojing commented on a change in pull request #3029: [HUDI-1954] Only reset bucket when flush bucket success

yuzhaojing commented on a change in pull request #3029:
URL: https://github.com/apache/hudi/pull/3029#discussion_r645243751



##########
File path: hudi-flink/src/main/java/org/apache/hudi/sink/StreamWriteFunction.java
##########
@@ -470,30 +470,36 @@ private void bufferRecord(HoodieRecord<?> value) {
     boolean flushBucket = bucket.detector.detect(item);
     boolean flushBuffer = this.tracer.trace(bucket.detector.lastRecordSize);
     if (flushBucket) {
-      flushBucket(bucket);
-      this.tracer.countDown(bucket.detector.totalSize);
-      bucket.reset();
+      boolean flush = flushBucket(bucket);
+      if (flush) {
+        this.tracer.countDown(bucket.detector.totalSize);

Review comment:
       fix




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

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