Ngone51 commented on a change in pull request #28462:
URL: https://github.com/apache/spark/pull/28462#discussion_r420670579
##########
File path: core/src/main/scala/org/apache/spark/BarrierCoordinator.scala
##########
@@ -141,17 +141,14 @@ private[spark] class BarrierCoordinator(
val taskId = request.taskAttemptId
val epoch = request.barrierEpoch
val curReqMethod = request.requestMethod
-
- if (requesters.isEmpty) {
- requestMethod = curReqMethod
- } else if (requestMethod != curReqMethod) {
- requesters.foreach(
- _.sendFailure(new SparkException(s"$barrierId tried to use
requestMethod " +
- s"`$curReqMethod` during barrier epoch $barrierEpoch, which does
not match " +
- s"the current synchronized requestMethod `$requestMethod`"
- ))
- )
- cleanupBarrierStage(barrierId)
+ requestMethods.add(curReqMethod)
+ if (requestMethods.size > 1) {
+ val error = new SparkException(s"Different barrier sync types found
for the " +
+ s"sync $barrierId: ${requestMethods.mkString(", ")}. Please use the
" +
Review comment:
I intentionally ignored barrier epoch here because it (`-1`) becomes
meaningless after `clear`. But we can update the logic of `clear` if any of you
think it's necessary here.
----------------------------------------------------------------
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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]