zaynt4606 commented on code in PR #2989:
URL: https://github.com/apache/celeborn/pull/2989#discussion_r1895553981


##########
worker/src/main/scala/org/apache/celeborn/service/deploy/worker/PushDataHandler.scala:
##########
@@ -582,27 +603,32 @@ class PushDataHandler(val workerSource: WorkerSource) 
extends BaseMessageHandler
     val writePromise = Promise[Array[StatusCode]]()
     // for primary, send data to replica
     if (doReplicate) {
+      val location = partitionIdToLocations.head._2
+      val peer = location.getPeer
+      val peerWorker = new WorkerInfo(
+        peer.getHost,
+        peer.getRpcPort,
+        peer.getPushPort,
+        peer.getFetchPort,
+        peer.getReplicatePort)
+      if (unavailablePeers.containsKey(peerWorker)) {
+        for (fileWriterIndex <- 0 until totalFileWriters) {
+          val fileWriter = fileWriters(fileWriterIndex)
+          if (fileWriter != null && 
!pushMergedDataCallback.isHardSplitPartition(fileWriterIndex)) {
+            fileWriter.decrementPendingWrites()
+          }
+        }

Review Comment:
   `fileWriter.decrementPendingWrites()` here is to make up the operation in 
`writeLocalData` within the `Runnable` .



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