GitHub user cloud-fan opened a pull request:

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

    [HOTFIX][CORE] fix a concurrence issue in NewAccumulator

    ## What changes were proposed in this pull request?
    
    `AccumulatorContext` is not thread-safe, that's why all of its methods are 
synchronized. However, there is one exception: the 
`AccumulatorContext.originals`. `NewAccumulator` use it to check if it's 
registered, which is wrong as it's not synchronized. 
    
    This PR mark `AccumulatorContext.originals` as `private` and now all access 
to `AccumulatorContext` is synchronized.
    
    
    ## How was this patch tested?
    
    I verified it locally. To be safe, we can let jenkins test it many times to 
make sure this problem is gone.


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

    $ git pull https://github.com/cloud-fan/spark debug

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

    https://github.com/apache/spark/pull/12773.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 #12773
    
----
commit bf04ffd3734c9a64a8eb4a5d4e0b24b2d199c204
Author: Wenchen Fan <wenc...@databricks.com>
Date:   2016-04-29T02:25:00Z

    fix a concurrence bug

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to