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 2023/01/01 03:51:22 UTC

[GitHub] [hudi] boneanxs commented on a diff in pull request #7582: [HUDI-5488]Make sure Discrupt queue start first, then insert records

boneanxs commented on code in PR #7582:
URL: https://github.com/apache/hudi/pull/7582#discussion_r1059702584


##########
hudi-common/src/main/java/org/apache/hudi/common/util/queue/DisruptorMessageQueue.java:
##########
@@ -60,6 +61,12 @@ public long size() {
 
   @Override
   public void insertRecord(I value) throws Exception {
+    if (!isStart) {
+      synchronized (this) {
+        wait();
+      }
+    }

Review Comment:
   Oops,forgot to add a double check here.
   
   ```java
   if(!isStart) {
     synchronized(this) {
       if(!isStart) {
         wait();
       }
     }
   }
   ```



-- 
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-unsubscribe@hudi.apache.org

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