bigdata4u / spymemcached

Automatically exported from code.google.com/p/spymemcached
0 stars 0 forks source link

DefaultKetamaNodeLocatorConfiguration race condition #244

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
The class DefaultKetamaNodeLocatorConfiguration uses a HashMap in an 
unsynchronized concurrent context.  The comments note the risk.

http://mailinator.blogspot.com/2009/06/beautiful-race-condition.html

Even though the likelihood is small, the fix is also small.  Perhaps the author 
could quickly switch to ConcurrentHashMap?

Original issue reported on code.google.com by gil...@gmail.com on 10 Apr 2012 at 4:20

GoogleCodeExporter commented 8 years ago
Will have a look, but are you certain it's used concurrently?

Original comment by ingen...@gmail.com on 10 Apr 2012 at 5:05

GoogleCodeExporter commented 8 years ago
I am not certain it is used concurrently.  I just happened to notice the 
comments there saying it was.  They could easily be wrong or out-of-date.

Original comment by gil...@gmail.com on 10 Apr 2012 at 6:07