[infinispan-issues] [JBoss JIRA] Commented: (ISPN-601) TreeCache and CacheStore issues when adding an entry that exists in the store but not in memory
Galder Zamarreno (JIRA)
jira-events at lists.jboss.org
Mon Aug 16 06:43:58 EDT 2010
[ https://jira.jboss.org/browse/ISPN-601?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12545086#action_12545086 ]
Galder Zamarreno commented on ISPN-601:
---------------------------------------
Rather than being an issue with tree module itself, it's an issue with a sequence of standard cache events and the cache loader layer:
public void testDuplicatePersistence(Method m) throws Exception {
String key = "k-" + m.getName();
String value = "v-" + m.getName();
cache.put(key, value);
assert value.equals(cache.get(key));
cache.stop();
cache.start();
tm.begin();
cache.containsKey(key);
cache.getAdvancedCache().withFlags(Flag.FORCE_WRITE_LOCK).get(key);
cache.put(key, value);
tm.commit();
assert value.equals(cache.get(key));
}
After restart, the get call with FWL flag forces a reload and attempt to wrap it again which leads to the NPE.
> TreeCache and CacheStore issues when adding an entry that exists in the store but not in memory
> -----------------------------------------------------------------------------------------------
>
> Key: ISPN-601
> URL: https://jira.jboss.org/browse/ISPN-601
> Project: Infinispan
> Issue Type: Bug
> Components: Loaders and Stores, Tree API
> Affects Versions: 4.1.0.CR2
> Reporter: Tom Coates
> Assignee: Galder Zamarreno
> Priority: Critical
> Fix For: 4.1.0.CR3
>
>
> The pattern:
> put()
> stop()
> start()
> put()
> throws an exception when a cache store is configured and the treecache adapter is used.
> java.lang.NullPointerException
> at org.infinispan.interceptors.CacheLoaderInterceptor.recordLoadedEntry(CacheLoaderInterceptor.java:182)
> at org.infinispan.interceptors.CacheLoaderInterceptor.loadIfNeeded(CacheLoaderInterceptor.java:147)
> at org.infinispan.interceptors.CacheLoaderInterceptor.loadIfNeededAndUpdateStats(CacheLoaderInterceptor.java:200)
> at org.infinispan.interceptors.CacheLoaderInterceptor.visitGetKeyValueCommand(CacheLoaderInterceptor.java:87)
> at org.infinispan.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:58)
> 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.visitGetKeyValueCommand(AbstractVisitor.java:87)
> at org.infinispan.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:58)
> at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118)
> at org.infinispan.interceptors.TxInterceptor.enlistReadAndInvokeNext(TxInterceptor.java:171)
> at org.infinispan.interceptors.TxInterceptor.visitGetKeyValueCommand(TxInterceptor.java:162)
> at org.infinispan.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:58)
> at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118)
> at org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:58)
> at org.infinispan.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:39)
> at org.infinispan.commands.AbstractVisitor.visitGetKeyValueCommand(AbstractVisitor.java:87)
> at org.infinispan.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:58)
> at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118)
> at org.infinispan.interceptors.BatchingInterceptor.handleDefault(BatchingInterceptor.java:76)
> at org.infinispan.commands.AbstractVisitor.visitGetKeyValueCommand(AbstractVisitor.java:87)
> at org.infinispan.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:58)
> at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:271)
> at org.infinispan.CacheDelegate.get(CacheDelegate.java:200)
> at org.infinispan.atomic.AtomicHashMapProxy.getDeltaMapForRead(AtomicHashMapProxy.java:73)
> at org.infinispan.atomic.AtomicHashMapProxy.getDeltaMapForWrite(AtomicHashMapProxy.java:95)
> at org.infinispan.atomic.AtomicHashMapProxy.put(AtomicHashMapProxy.java:154)
> at org.infinispan.tree.TreeCacheImpl.put(TreeCacheImpl.java:336)
> at org.infinispan.loaders.TreeCacheWithLoaderTest.testDuplicatePersistence(TreeCacheWithLoaderTest.java:81)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the infinispan-issues
mailing list