[SPARK-31651][CORE] Improve handling the case where different barrier sync types in a single sync#28462
Closed
Ngone51 wants to merge 4 commits intoapache:masterfrom
Closed
[SPARK-31651][CORE] Improve handling the case where different barrier sync types in a single sync#28462Ngone51 wants to merge 4 commits intoapache:masterfrom
Ngone51 wants to merge 4 commits intoapache:masterfrom
Conversation
Member
Author
Ngone51
commented
May 6, 2020
| 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 " + |
Member
Author
There was a problem hiding this 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.
|
Test build #122354 has finished for PR 28462 at commit
|
|
Test build #122362 has finished for PR 28462 at commit
|
dilipbiswal
reviewed
May 7, 2020
| @@ -108,7 +108,7 @@ private[spark] class BarrierCoordinator( | |||
|
|
|||
| // The request method which is called inside this barrier sync. All tasks should make sure | |||
Contributor
There was a problem hiding this comment.
@Ngone51 Super Nit: Perhaps change the comment here to reflect the change ?
|
Test build #122404 has finished for PR 28462 at commit
|
Member
Author
|
ping @jiangxb1987 @dilipbiswal |
Contributor
|
retest this please |
|
Test build #122823 has finished for PR 28462 at commit
|
jiangxb1987
pushed a commit
that referenced
this pull request
May 19, 2020
… sync types in a single sync ### What changes were proposed in this pull request? This PR improves handling the case where different barrier sync types in a single sync: - use `clear` instead of `cleanupBarrierStage ` - make sure all requesters are failed because of "different barrier sync types" ### Why are the changes needed? Currently, we use `cleanupBarrierStage` to clean up a barrier stage when we detecting the case of "different barrier sync types". But this leads to a problem that we could create new a `ContextBarrierState` for the same stage again if there're on-way requests from tasks. As a result, those task will fail because of killing instead of "different barrier sync types". Besides, we don't handle the current request which is being handling properly as it will fail due to epoch mismatch instead of "different barrier sync types". ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Updated a existed test. Closes #28462 from Ngone51/impr_barrier_req. Authored-by: yi.wu <yi.wu@databricks.com> Signed-off-by: Xingbo Jiang <xingbo.jiang@databricks.com> (cherry picked from commit 653ca19) Signed-off-by: Xingbo Jiang <xingbo.jiang@databricks.com>
Contributor
|
Thanks, merged to master/3.0 ! |
Member
Author
|
thanks all! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
This PR improves handling the case where different barrier sync types in a single sync:
use
clearinstead ofcleanupBarrierStagemake sure all requesters are failed because of "different barrier sync types"
Why are the changes needed?
Currently, we use
cleanupBarrierStageto clean up a barrier stage when we detecting the case of "different barrier sync types". But this leads to a problem that we could create new aContextBarrierStatefor the same stage again if there're on-way requests from tasks. As a result, those task will fail because of killing instead of "different barrier sync types".Besides, we don't handle the current request which is being handling properly as it will fail due to epoch mismatch instead of "different barrier sync types".
Does this PR introduce any user-facing change?
No.
How was this patch tested?
Updated a existed test.