[infinispan-dev] Removing AHM.commit() call in ISPN-2212

Galder Zamarreño galder at redhat.com
Thu Aug 23 06:41:36 EDT 2012


Hi,

Re: https://issues.jboss.org/browse/ISPN-2212
Re: https://github.com/infinispan/infinispan/pull/1255

The problem is that in an asynchronous set up with replication queue, ReadCommittedEntry.commit() will clear the delta before this has been replicated.

My solution has been to remove the commit() call because in a clustered environment, or an environment where there's marshalling to be done (marshalled value, or cache store storage), the delta will already be cleared as part of the delta() call. 

So I don't see any risks for clustered environments. 

For local caches (no cluster, no mrashalling), atomic hash map do not really make sense.

So, I think this is a safe solution.

The alternative would involve moving the commit() call to a step after which we're sure we've covered all bases, including repl queue and I could not see any such opportunity. Even hacking ReplicationQueueImpl to go through all modifications and check values would be wasteful.

Thoughts?

Cheers,
--
Galder Zamarreño
Sr. Software Engineer
Infinispan, JBoss Cache




More information about the infinispan-dev mailing list