[infinispan-dev] inefficient usage of CacheLoader with REPL
Dan Berindei
dan.berindei at gmail.com
Wed Dec 21 05:35:55 EST 2011
> Dan, thanks for looking. So it ignores the return values: wouldn't it
> be more efficient to ask the remote node to not serialize it at all in
> first place?
> I mean ReplicationInterceptor should send over both
> Flag.SKIP_CACHE_LOAD (*not* X_LOAD) and Flag.SKIP_REMOTE_LOOKUP
> on any write operation.
>
Flag.SKIP_REMOTE_LOOKUP shouldn't be necessary, the ResponseGenerator
on the remote node checks the command ID before serializing the
response and sends a null instead if the command is not one of those
listed in DefaultResponseGenerator.requiresResponse (for replicated
and invalidation caches).
The ResponseGenerator does seem a bit "magic", so perhaps it would be
better to use Flag.SKIP_REMOTE_LOOKUP instead and maybe add a generic
Flag.IGNORE_REMOTE_RESPONSE if there are other commands that would
benefit from it. Definitely something for 5.2 :)
Cheers
Dan
More information about the infinispan-dev
mailing list