jteagles commented on pull request #162:
URL: https://github.com/apache/tez/pull/162#issuecomment-1005955961


   @abstractdog, the findbugs above is showing the inconsistent 
synchronization. I am trying to imagine scenarios where the synchronization is 
needed, but let me describe generally what _could_ happen. In multi-threaded 
apps, assignments are lazy and in a busy time, java may choose not to 
immediately propagate value change or assignment across to all threads. Then 
Other threads accessing will find an outdated value or old or unassigned 
object. So it's always safer to synchronize all accesses. However, it's rare to 
have an "init" or initial object assignment not get propagated to all other 
threads. My knowledge about this might be a little bit incorrect, so correct me 
if I'm wrong. The question to me is really, what is the cost of having the 
synchronization there? My guess would be a millisecond max, which in the grand 
scheme of things, isn't much. Do have think this change will have a bigger 
impact?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to