RexXiong commented on code in PR #3059: URL: https://github.com/apache/celeborn/pull/3059#discussion_r1912605140
########## worker/src/main/scala/org/apache/celeborn/service/deploy/worker/Controller.scala: ########## @@ -730,6 +740,44 @@ private[deploy] class Controller( } } + private def checkCommitTimeout(shuffleCommitTime: ConcurrentHashMap[ Review Comment: AddUt for checkCommitTimeout ########## worker/src/main/scala/org/apache/celeborn/service/deploy/worker/Controller.scala: ########## @@ -730,6 +740,44 @@ private[deploy] class Controller( } } + private def checkCommitTimeout(shuffleCommitTime: ConcurrentHashMap[ + String, + ConcurrentHashMap[Long, (Int, RpcCallContext)]]): Unit = { + val delta = 100 + val shuffleCommitTimeout = conf.workerShuffleCommitTimeout Review Comment: `conf.workerShuffleCommitTimeout` can be used as property of the class ########## worker/src/main/scala/org/apache/celeborn/service/deploy/worker/Controller.scala: ########## @@ -439,12 +447,14 @@ private[deploy] class Controller( return } else if (commitInfo.status == CommitInfo.COMMIT_INPROCESS) { logInfo(s"$shuffleKey CommitFiles inprogress, wait for finish") - // should not use commitThreadPool in case of block by commit files. - waitThreadPool.submit(new Runnable { - override def run(): Unit = { - waitForCommitFinish() - } - }) + // replace ThreadPool to avoid blocking + shuffleCommitTime.putIfAbsent( + shuffleKey, + JavaUtils.newConcurrentHashMap[Long, (Int, RpcCallContext)]()) + val epochWaitTimeMap = shuffleCommitTime.get(shuffleKey) + epochWaitTimeMap.synchronized { Review Comment: deadlock exists when lock both commitInfo and epochWaitTimeMap -- 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: issues-unsubscr...@celeborn.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org