GitHub user cxzl25 opened a pull request:

    https://github.com/apache/spark/pull/21656

    [SPARK-24677][Core]MedianHeap is empty when speculation is enabled, causing 
the SparkContext to stop

    ## What changes were proposed in this pull request?
    When speculation is enabled, 
    TaskSetManager#markPartitionCompleted should write successful task duration 
to MedianHeap, 
    not just increase tasksSuccessful.
    
    Otherwise when TaskSetManager#checkSpeculatableTasks,tasksSuccessful 
non-zero, but MedianHeap is empty.
    Then throw an exception successfulTaskDurations.median 
java.util.NoSuchElementException: MedianHeap is empty.
    Finally led to stopping SparkContext.
    ## How was this patch tested?
    manual tests


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/cxzl25/spark fix_MedianHeap_empty

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/21656.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #21656
    
----
commit 467f0bccb7d1940bed4f1b2e633c9374b0e654f2
Author: sychen <sychen@...>
Date:   2018-06-28T07:34:38Z

    MedianHeap is empty when speculation is enabled, causing the SparkContext 
to stop.

----


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to