You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@zookeeper.apache.org by GitBox <gi...@apache.org> on 2020/01/11 17:27:48 UTC

[GitHub] [zookeeper] belugabehr commented on issue #1218: ZOOKEEPER-3694: Use Map computeIfAbsent in AvgMinMaxCounterSet Class

belugabehr commented on issue #1218: ZOOKEEPER-3694: Use Map computeIfAbsent in AvgMinMaxCounterSet Class
URL: https://github.com/apache/zookeeper/pull/1218#issuecomment-573336516
 
 
   Hey,
   
   I don't think there is a race condition here.  Two threads may see the Map
   as being empty, but they will synchronize on the putIfAbsent method.
   
   Just less code.
   
   Thanks for your continued support!
   
   On Sat, Jan 11, 2020, 12:12 PM Enrico Olivelli <no...@github.com>
   wrote:
   
   > *@eolivelli* approved this pull request.
   >
   > Good catch.
   > It is not only an improvement but also a fix for a potential race condition
   >
   > +1
   >
   > —
   > You are receiving this because you authored the thread.
   > Reply to this email directly, view it on GitHub
   > <https://github.com/apache/zookeeper/pull/1218?email_source=notifications&email_token=AC766EYWW6SJVC5QGL6YWNDQ5H4XZA5CNFSM4KFSYGS2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCRNV2SI#pullrequestreview-341531977>,
   > or unsubscribe
   > <https://github.com/notifications/unsubscribe-auth/AC766E4SAN523PACGXWLGWDQ5H4XZANCNFSM4KFSYGSQ>
   > .
   >
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services