[concurrency-interest] Bug in ConcurrentHashMap

Doug Lea dl@cs.oswego.edu
Fri, 21 Nov 2003 06:48:58 -0500


Thanks very much!! 

> An idea for a fix is to implement setValue by doing a put directly
> on the map in addition to setting the value in the entry, however
> HashEntry is a static inner class and does not have a reference to
> the map. Making it non-static would add additional overhead to each
> entry object that I would prefer to avoid.

I think we can do better by reworking Entry node links so that
setValue will need to traverse a little to find what map it is in,
which would be a good tradeoff of keeping node overhead low at the
expense of slightly slower performance of setValue. In any case, we
will get a fix out soon.

-Doug