[SPARK-25910][CORE] accumulator updates from previous stage attempt should not log error#22923
Closed
cloud-fan wants to merge 2 commits intoapache:masterfrom
Closed
[SPARK-25910][CORE] accumulator updates from previous stage attempt should not log error#22923cloud-fan wants to merge 2 commits intoapache:masterfrom
cloud-fan wants to merge 2 commits intoapache:masterfrom
Conversation
Contributor
Author
|
Test build #98355 has finished for PR 22923 at commit
|
Member
|
retest this please |
|
Test build #98416 has finished for PR 22923 at commit
|
Member
|
We need to always update user accumulators. Right now such task metrics just cause some annoying error logs, seems not worth to fix. |
Contributor
Author
Ah that's a good point. I'm going to close it. I missed one thing: the So this bug should already have been fixed. |
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?
For shuffle map stages, we may have multiple attempts, while only the latest attempt is active. However, the scheduler still accepts successful tasks from previous attempts, to speed up the execution.
Each stage attempt has a
StageInfoinstance, which containsTaskMetrics.TaskMetricshas a bunch of accumulators to track the metrics like CPU time, etc. However, a stage only keeps theStageInfoof the latest attempt, which means theStageInfoof previous attempts will be GCed, and their accumulators ofTaskMetricswill be cleaned.This causes a problem: When the scheduler accepts a successful task from a previous attempt, and tries to update accumulators, we may fail to get the accumulators from
AccumulatorContext, as they are already cleaned. And we may hit error log likeThis PR proposes a simple fix: When the scheduler receives successful tasks from previous attempts, don't update accumulators. Accumulators of previous stage attemps are not tracked anymore, so we don't need to update them.
How was this patch tested?
a new test.