Github user shivaram commented on the pull request:
https://github.com/apache/spark/pull/2028#issuecomment-52586129
LGTM.Alright I looked through the code and tried to verify this change was
safe. Just summarizing what I saw while walking through the code (in case it
helps in the future)
1. The first synchronized is in the constructor which two threads cannot
call at the same time
2. `sendBroadcast` is only called from constructor, so that is safe to
remove
3. `receiveBroadcast` is only called from a synchronized block in
readObject, so that should be safe to remove (however this should be free in
java, to re-acquire an already held lock)
4. `unpersist` doesn't touch the class, so it is thread-safe (assuming
BlockManager's readBroadcast is thread-safe -- I didn't check that)
---
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]