[infinispan-dev] Tree cache listeners

Galder Zamarreño galder at redhat.com
Thu Mar 29 06:04:12 EDT 2012


I've added a section in https://docs.jboss.org/author/x/1gU5

Cheers,

On Mar 27, 2012, at 4:39 PM, Manik Surtani wrote:

> Well, listeners and events were designed independent to AHMs.  And hence the weird behaviour when the two collide.
> 
> I think, from a 5.1.3 perspective, we should document that the values passed in to listeners when using AHMs and the TreeCache will be unreliable.  And then we need to think about what this should ideally look like before attempting a fix.
> 
> On 27 Mar 2012, at 12:11, Galder Zamarreño wrote:
> 
>> Hi all,
>> 
>> Re: https://issues.jboss.org/browse/ISPN-1935
>> 
>> I don't see an easy solution for this. See test in https://github.com/galderz/infinispan/blob/t_1935_m/tree/src/test/java/org/infinispan/api/tree/TreeListenerTest.java
>> 
>> The problem is the cache.put() from where the cache entry modified event is thrown comes from when the AtomicHashMap is created, which at that point is empty.
>> 
>> Once the AHM is created, we then modify the map which does not generate any events, it just generates the deltas.
>> 
>> Finally, when the operation is completed, a prepare replicates the actual deltas in the cluster (not in the test, but in a clustered test).
>> 
>> But a user can't listen for @TransactionCompleted and expect to see the list of modifications.
>> 
>> Any other ideas?
>> 
>> Cheers,
>> --
>> Galder Zamarreño
>> Sr. Software Engineer
>> Infinispan, JBoss Cache
>> 
>> 
>> _______________________________________________
>> infinispan-dev mailing list
>> infinispan-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
> 
> --
> Manik Surtani
> manik at jboss.org
> twitter.com/maniksurtani
> 
> Lead, Infinispan
> http://www.infinispan.org
> 
> 
> 
> 
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev

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




More information about the infinispan-dev mailing list