[
https://jira.jboss.org/browse/ISPN-565?page=com.atlassian.jira.plugin.sys...
]
Galder Zamarreno updated ISPN-565:
----------------------------------
Comment: was deleted
(was: Is not using a transaction manager a valid use case? It is cos another cache
operation, even if it's a single one, might be competing for the lock. So, skipping
locking means that for that single invocation no locks are acquired.)
SKIP_LOCKING with cache loader and calling remove results in
java.lang.ClassCastException
-----------------------------------------------------------------------------------------
Key: ISPN-565
URL:
https://jira.jboss.org/browse/ISPN-565
Project: Infinispan
Issue Type: Bug
Components: Locking and Concurrency, Lucene Directory
Affects Versions: 4.1.0.CR2
Reporter: Paul Nardone
Assignee: Galder Zamarreno
Priority: Critical
Fix For: 4.1.0.Final
Attachments: InfinispanTest3.java
When using SKIP_LOCKING and removing from Cache with a cache loader a ClassCaseException
is thrown
java.lang.ClassCastException: org.infinispan.container.entries.ImmortalCacheEntry cannot
be cast to org.infinispan.container.entries.MVCCEntry
at org.infinispan.commands.write.RemoveCommand.perform(RemoveCommand.java:74)
at org.infinispan.interceptors.CallInterceptor.handleDefault(CallInterceptor.java:72)
at org.infinispan.commands.AbstractVisitor.visitRemoveCommand(AbstractVisitor.java:61)
at org.infinispan.commands.write.RemoveCommand.acceptVisitor(RemoveCommand.java:70)
at
org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118)
at
org.infinispan.interceptors.LockingInterceptor.visitRemoveCommand(LockingInterceptor.java:221)
at org.infinispan.commands.write.RemoveCommand.acceptVisitor(RemoveCommand.java:70)
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.visitRemoveCommand(AbstractVisitor.java:61)
at org.infinispan.commands.write.RemoveCommand.acceptVisitor(RemoveCommand.java:70)
at
org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118)
at
org.infinispan.interceptors.CacheLoaderInterceptor.visitRemoveCommand(CacheLoaderInterceptor.java:103)
at
org.infinispan.interceptors.ActivationInterceptor.visitRemoveCommand(ActivationInterceptor.java:44)
at org.infinispan.commands.write.RemoveCommand.acceptVisitor(RemoveCommand.java:70)
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.visitRemoveCommand(AbstractVisitor.java:61)
at org.infinispan.commands.write.RemoveCommand.acceptVisitor(RemoveCommand.java:70)
at
org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118)
at
org.infinispan.interceptors.TxInterceptor.enlistWriteAndInvokeNext(TxInterceptor.java:183)
at org.infinispan.interceptors.TxInterceptor.visitRemoveCommand(TxInterceptor.java:137)
at org.infinispan.commands.write.RemoveCommand.acceptVisitor(RemoveCommand.java:70)
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.visitRemoveCommand(AbstractVisitor.java:61)
at org.infinispan.commands.write.RemoveCommand.acceptVisitor(RemoveCommand.java:70)
at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:271)
at org.infinispan.CacheDelegate.remove(CacheDelegate.java:207)
at
uk.co.cosmic_solutions.mdtest2.infinispan.test.InfinispanTest3.runTest(InfinispanTest3.java:87)
This issue was first encountered while using Infinispan as a Lucene store via the
InfinispanDirectory as that module makes extensive use of Flag.SKIP_LOCKING, attempting to
use Directory.copy on cache with cacheloader produced this error
The issue appears to relate to
org.infinispan.container.EntryFactoryImpl#wrapEntryForWriting which doesn't appear to
wrap the entry if it exists in the context when locking is skipped, this results in an
ImmortalCacheEntry being returned in the
org.infinispan.commands.write.RemoveCommand#perform
Test case attached
--
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