[infinispan-dev] inefficient usage of CacheLoader with REPL

Dan Berindei dan.berindei at gmail.com
Wed Dec 21 03:51:05 EST 2011


Galder, Sanne, the actual implementation of ReplicationInterceptor
does ignore the values returned by the remote nodes already - it
always returns the local previous value.

We also skip serializing/deserializing the response value, see
DefaultResponseGenerator.

The only thing missing is skipping the cache loader call, and we can
do that by setting the SKIP_CACHE_LOADER flag in
ReplicationInterceptor for the replicated CRUD commands.

Cheers,
Dan


On Wed, Dec 21, 2011 at 9:53 AM, Galder Zamarreño <galder at redhat.com> wrote:
> Sanne, what if the previous value has been evicted or passivated? In case of a shared cache store, one of them could go, retrieve the old value and return it. If the cache store is not shared, they could all end up doing it.
>
> On Dec 21, 2011, at 12:16 AM, Sanne Grinovero wrote:
>
>> Hi all,
>> I just noticed writing a test using REPL that when doing a put
>> operation the other nodes do a CacheLoader LOAD as well.
>>
>> Isn't that totally unnecessary?
>>
>> In fact assuming REPL guarantees consistency across all nodes, any
>> form of remote return value should be implicitly skipped as we can
>> satisfy return values by looking at local copies.
>>
>> Sanne
>> _______________________________________________
>> 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
>
>
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev



More information about the infinispan-dev mailing list