Github user vanzin commented on the issue:

    https://github.com/apache/spark/pull/18497
  
    Your change won't work, as far as I can tell. Since multiple threads might 
be calling `mergeApplicationListing`, you need synchronization around the block 
that is doing the list merging. Immutability is not the problem here.
    
    The bug report is right in that the problem here is that synchronization is 
happening on the wrong object; since `applications` is overwritten to point to 
a different map, two threads may be synchronizing on different maps. So the 
correct change is just to use a different object as the lock here.
    
    In truth, unless you're planning to backport this to other releases, this 
will all be superseded by my code to fix SPARK-20642, which is the next bug on 
the list after #18395 goes in.


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

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

Reply via email to