jiangxb1987 commented on a change in pull request #27395: [SPARK-30667][CORE] Add allGather method to BarrierTaskContext URL: https://github.com/apache/spark/pull/27395#discussion_r377394231
########## File path: core/src/main/scala/org/apache/spark/BarrierCoordinator.scala ########## @@ -199,14 +268,20 @@ private[spark] class BarrierCoordinator( } override def receiveAndReply(context: RpcCallContext): PartialFunction[Any, Unit] = { - case request @ RequestToSync(numTasks, stageId, stageAttemptId, _, _) => + case request @ BarrierRequestToSync(numTasks, stageId, stageAttemptId, _, _, _) => // Get or init the ContextBarrierState correspond to the stage attempt. val barrierId = ContextBarrierId(stageId, stageAttemptId) states.computeIfAbsent(barrierId, (key: ContextBarrierId) => new ContextBarrierState(key, numTasks)) val barrierState = states.get(barrierId) - - barrierState.handleRequest(context, request) + barrierState.handleBarrierRequest(context, request) + case request @ AllGatherRequestToSync(numTasks, stageId, stageAttemptId, _, _, _, _) => Review comment: The case is not necessary here, we only need to switch the case when we are to fetch allGather messages. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org