keith-turner opened a new pull request, #5303:
URL: https://github.com/apache/accumulo/pull/5303

   Made a few changes to how ZooCache and ZooSession handle concurrency in 
order to make it easier to reason about the code.
   
   ZooCache and ZooSession had code that used Atomics to do computations in 
addition to synchronized blocks.  This adds complexity w/o an apparent benefit. 
 Stopped doing the computations in both places and moved all computations in to 
the synchronized block.
   
   ZooSession has a counter that was used by ZooCache to know when zookeeper 
changed.  ZooSession updated this counter independently from updating the 
zookeeper reference and ZooCache read the refrence and counter at different 
times.  Reorganized the code so that read and write of the counter and 
zookeeper are done at the same times by ZooSession and ZooCache.
   
   ZooSession.close() could run conucurrently with the code that created new 
ZooKeeper objects in ZooSession.  Made the close method synchronized and 
tweaked how the closed variable is checked.


-- 
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: notifications-unsubscr...@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to