[infinispan-dev] [ISPN-116] Async cache store: aggregation of multiple changes on a single key

Jason T. Greene jason.greene at redhat.com
Wed Jul 8 14:53:37 EDT 2009


Manik Surtani wrote:
> * Make the concurrent map volatile
> * When iterating, first create a new ConcurrentMap and replace the old 
> one with the new one so all concurrent threads write to the new Map
> * Iterate over the old map

That would lead to race conditions since a concurrent writing thread 
could write to the "old" map, either by getting a recent yet incorrect 
read off the volatile, or reading it right before it changes.

-- 
Jason T. Greene
JBoss, a division of Red Hat



More information about the infinispan-dev mailing list