You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by vi...@apache.org on 2021/06/25 00:58:08 UTC

[hudi] branch master updated: [HUDI-2068] Skip the assign state for SmallFileAssign when the state can not assign initially (#3148)

This is an automated email from the ASF dual-hosted git repository.

vinoyang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hudi.git


The following commit(s) were added to refs/heads/master by this push:
     new e64fe55  [HUDI-2068] Skip the assign state for SmallFileAssign when the state can not assign initially (#3148)
e64fe55 is described below

commit e64fe5505487f3ee591b2b5d044c2c57989f8991
Author: Danny Chan <yu...@gmail.com>
AuthorDate: Fri Jun 25 08:57:56 2021 +0800

    [HUDI-2068] Skip the assign state for SmallFileAssign when the state can not assign initially (#3148)
---
 .../src/main/java/org/apache/hudi/sink/partitioner/BucketAssigner.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/hudi-flink/src/main/java/org/apache/hudi/sink/partitioner/BucketAssigner.java b/hudi-flink/src/main/java/org/apache/hudi/sink/partitioner/BucketAssigner.java
index e2f3293..6d805ce 100644
--- a/hudi-flink/src/main/java/org/apache/hudi/sink/partitioner/BucketAssigner.java
+++ b/hudi-flink/src/main/java/org/apache/hudi/sink/partitioner/BucketAssigner.java
@@ -228,7 +228,7 @@ public class BucketAssigner implements AutoCloseable {
         return false;
       }
       SmallFileAssignState state = states[assignIdx];
-      if (!state.canAssign()) {
+      while (!state.canAssign()) {
         assignIdx += 1;
         if (assignIdx >= states.length) {
           noSpace = true;
@@ -236,7 +236,6 @@ public class BucketAssigner implements AutoCloseable {
         }
         // move to next slot if possible
         state = states[assignIdx];
-        assert state.canAssign();
       }
       state.assign();
       return true;