GitHub user vanzin opened a pull request:

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

    [SPARK-24631][tests] Avoid cross-job pollution in TestUtils / SpillListener.

    There is a narrow race in this code that is caused when the code being
    run in assertSpilled / assertNotSpilled runs more than a single job.
    
    SpillListener assumed that only a single job was run, and so would only
    block waiting for that single job to finish when `numSpilledStages` was
    called. But some tests (like SQL tests that call `checkAnswer`) run more
    than one job, and so that wait was basically a no-op.
    
    This could cause the next test to install a listener to receive events
    from the previous job. Which could cause test failures in certain cases.
    
    The change fixes that race, and also uninstalls listeners after the
    test runs, so they don't accumulate when the SparkContext is shared
    among multiple tests.

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

    $ git pull https://github.com/vanzin/spark SPARK-24653

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

    https://github.com/apache/spark/pull/21639.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 #21639
    
----
commit 9f0a9c4a37f55d0e9591bb59957afcdf745a678d
Author: Marcelo Vanzin <vanzin@...>
Date:   2018-06-25T21:46:12Z

    [SPARK-24631][tests] Avoid cross-job pollution in TestUtils / SpillListener.
    
    There is a narrow race in this code that is caused when the code being
    run in assertSpilled / assertNotSpilled runs more than a single job.
    
    SpillListener assumed that only a single job was run, and so would only
    block waiting for that single job to finish when `numSpilledStages` was
    called. But some tests (like SQL tests that call `checkAnswer`) run more
    than one job, and so that wait was basically a no-op.
    
    This could cause the next test to install a listener to receive events
    from the previous job. Which could cause test failures in certain cases.
    
    The change fixes that race, and also uninstalls listeners after the
    test runs, so they don't accumulate when the SparkContext is shared
    among multiple tests.

----


---

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

Reply via email to