[infinispan-dev] put with SKIP_REMOTE_LOOKUP loads from the cache store

Sanne Grinovero sanne.grinovero at gmail.com
Wed Oct 6 09:37:47 EDT 2010


2010/10/6 Galder Zamarreño <galder at redhat.com>:
> Flag.SKIP_REMOTE_LOOKUP has a meaning already and it's bound to distributed caching, so -1 to reusing it.
>
> SKIP_CACHE_STORE cannot be used since it already has a meaning which is, skipping store
>
> I'd suggest a different flag as well but will give it the name of SKIP_STORE_LOAD
>
> This is public API, so we need agreement from everyone on this before 4.2.0.Final

Sure, I'll wait for more feedback; Btw I'm using it locally already,
seems to work pretty well.

+1 for the new flag name

Regards,
Sanne

>
> On Oct 5, 2010, at 12:29 PM, Sanne Grinovero wrote:
>
>> Hi,
>> I summarized this in a feature request ISPN-693;
>> please comment as I need to implement this urgently, or alternative
>> suggestions are very welcome.
>>
>> Cheers,
>> Sanne
>>
>> 2010/10/5 Sanne Grinovero <sanne.grinovero at gmail.com>:
>>> Hello,
>>> while investigating why building an index is very slow when a
>>> CacheStore is enabled, I just discovered that if I'm using
>>>
>>> cache.withFlags(Flag.SKIP_REMOTE_LOOKUP).put( key, value )
>>>
>>> it will load the previous value from the CacheStore;
>>> I really don't need the previous value, especially annoying as either
>>> there is no data to load, making it pointless, or it will load huge
>>> BLOBs which aren't needed.
>>>
>>>        at org.infinispan.loaders.LockSupportCacheStore.load(LockSupportCacheStore.java:100)
>>>        at org.infinispan.interceptors.CacheLoaderInterceptor.loadIfNeeded(CacheLoaderInterceptor.java:138)
>>>        at org.infinispan.interceptors.CacheLoaderInterceptor.visitPutKeyValueCommand(CacheLoaderInterceptor.java:78)
>>>        at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:76)
>>>        at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118)
>>>        at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:132)
>>>        at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:57)
>>>        at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:76)
>>>        at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118)
>>>        at org.infinispan.interceptors.TxInterceptor.enlistWriteAndInvokeNext(TxInterceptor.java:172)
>>>        at org.infinispan.interceptors.TxInterceptor.visitPutKeyValueCommand(TxInterceptor.java:120)
>>>        at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:76)
>>>        at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118)
>>>        at org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:87)
>>>        at org.infinispan.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:58)
>>>        at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:57)
>>>        at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:76)
>>>        at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118)
>>>        at org.infinispan.interceptors.BatchingInterceptor.handleDefault(BatchingInterceptor.java:76)
>>>        at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:57)
>>>        at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:76)
>>>        at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:273)
>>>        at org.infinispan.CacheDelegate.put(CacheDelegate.java:427)
>>>        at org.infinispan.CacheSupport.put(CacheSupport.java:28)
>>>        at org.infinispan.lucene.InfinispanIndexOutput.storeCurrentBuffer(InfinispanIndexOutput.java:167)
>>>
>>> InfinispanIndexOutput.java:167 reads:
>>> metadataCache.withFlags(Flag.SKIP_REMOTE_LOOKUP,
>>> Flag.SKIP_LOCKING).put(fileKey, file);
>>>
>>> So I'd like to add a check for SKIP_REMOTE_LOOKUP in
>>> org.infinispan.interceptors.CacheLoaderInterceptor.loadIfNeeded:116
>>>
>>> Other tests appear to pass, but I'm wondering if the flag name is
>>> appropriate for this change, or if a new flag should be added
>>> "SKIP_STORE_READ"
>>> to make a difference between skipping a RPC call or a CacheLoader call.
>>> What do you think?
>>>
>>> Regards,
>>> 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