arp7 commented on issue #1174: HDDS-1856. Make required changes for Non-HA to 
use new HA code in OM.
URL: https://github.com/apache/hadoop/pull/1174#issuecomment-516615672
 
 
   Basically +1 from me. A few minor comments.
   
   I thought about the potential synchronization issue @anuengineer pointed out 
offline and am not convinced it exists. Because we hold/release the lock when 
flushTransactions calls setReadyBuffer. So that is the synchronization point. 
All later access from the same thread should see the correct value of the 
futureQueue.
   
   Couple of ways remove the ambiguity:
   1. Make the queues volatile.
   1. Return the queue from setReadyBuffer. Since the returned pointer was 
sampled with the lock held, the caller is guaranteed to see the correct value. 
This solution should also make findbugs happy.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

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

Reply via email to