Github user mridulm commented on the pull request:

    https://github.com/apache/spark/pull/2019#issuecomment-53149673
  
    handling tcp/ip events is by definition async, particularly when state 
changes can happen orthogonal to state within java variables.
    so there is only so much you can try to do to reduce exceptions you see in 
the logs - the important point is not to prevent issues (which is not possible 
if you want to write performent robust code), but to detect them and ensure it 
is handled properly.
    
    GIven that, the changes here look fragile : we can revisit this PR when 
they are addressed, since I think there is value in some of these.
    (For example, make closed an atomic boolean and do a getAndSet and do the 
expensive close only if previous value was false; and so on)


---
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