rjvkr2021 commented on code in PR #3844:
URL: https://github.com/apache/celeborn/pull/3844#discussion_r3970820831


##########
client/src/main/java/org/apache/celeborn/client/write/DataPusher.java:
##########
@@ -170,20 +191,46 @@ public void addTask(int partitionId, byte[] buffer, int 
size)
       logger.error("DataPusher thread interrupted while adding push task.");
       pushThread.interrupt();
       throw e;
+    } finally {
+      lifecycleLock.lock();
+      try {
+        activeProducers--;
+        if (activeProducers == 0) {
+          producersDrained.signalAll();
+        }
+      } finally {
+        lifecycleLock.unlock();
+      }
     }
   }
 
   public void waitOnTermination() throws IOException, InterruptedException {
+    lifecycleLock.lockInterruptibly();
     try {
-      idleLock.lockInterruptibly();
-      waitIdleQueueFullWithLock();
+      if (lifecycleState == LifecycleState.RUNNING) {
+        lifecycleState = LifecycleState.CLOSING;
+      }

Review Comment:
   updated the pr description accordingly



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