[JBoss JIRA] Created: (ISPN-903) CacheStore throws a NPE when preparing a transaction which includes a key it doesn't own
by Manik Surtani (JIRA)
CacheStore throws a NPE when preparing a transaction which includes a key it doesn't own
----------------------------------------------------------------------------------------
Key: ISPN-903
URL: https://issues.jboss.org/browse/ISPN-903
Project: Infinispan
Issue Type: Bug
Components: Distributed Cache, Loaders and Stores, Transactions
Affects Versions: 4.2.0.Final
Reporter: Manik Surtani
Assignee: Manik Surtani
Priority: Critical
Fix For: 4.2.1.Final
When a transaction is prepared, the {{PrepareCommand}} is broadcast to all participants in the transaction. However, recipients only replay Commands whose keys map to their node (by consulting the {{DistributionManager}}). When the {{PrepareCommand}} reaches the {{CacheStoreInterceptor}}, however, the {{CacheStoreInterceptor}} is unable to handle all of the modifications in the prepare as it doesn't filter out modifications based on what is mapped to the node in question. This results in a {{NullPointerExceptoion}} on the receiving node, which causes the transaction to abort:
{code}
java.lang.NullPointerException
at org.infinispan.interceptors.CacheStoreInterceptor.getStoredEntry(CacheStoreInterceptor.java:337)
at org.infinispan.interceptors.CacheStoreInterceptor$StoreModificationsBuilder.visitPutKeyValueCommand(CacheStoreInterceptor.java:288)
at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:72)
at org.infinispan.interceptors.CacheStoreInterceptor.prepareCacheLoader(CacheStoreInterceptor.java:255)
at org.infinispan.interceptors.CacheStoreInterceptor.visitPrepareCommand(CacheStoreInterceptor.java:175)
at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:116)
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.visitPrepareCommand(AbstractVisitor.java:106)
at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:116)
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118)
at org.infinispan.interceptors.NotificationInterceptor.visitPrepareCommand(NotificationInterceptor.java:48)
at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:116)
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118)
at org.infinispan.interceptors.TxInterceptor.visitPrepareCommand(TxInterceptor.java:103)
at org.infinispan.interceptors.DistTxInterceptor.visitPrepareCommand(DistTxInterceptor.java:59)
at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:116)
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.visitPrepareCommand(AbstractVisitor.java:106)
at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:116)
at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:273)
at org.infinispan.commands.tx.PrepareCommand.perform(PrepareCommand.java:107)
at org.infinispan.remoting.InboundInvocationHandlerImpl.handle(InboundInvocationHandlerImpl.java:94)
at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.executeCommand(CommandAwareRpcDispatcher.java:179)
at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.handle(CommandAwareRpcDispatcher.java:153)
at org.jgroups.blocks.RequestCorrelator.handleRequest(RequestCorrelator.java:577)
at org.jgroups.blocks.RequestCorrelator.receiveMessage(RequestCorrelator.java:488)
at org.jgroups.blocks.RequestCorrelator.receive(RequestCorrelator.java:364)
at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.up(MessageDispatcher.java:770)
at org.jgroups.JChannel.up(JChannel.java:1467)
{code}
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
9 years, 11 months
[JBoss JIRA] Created: (ISPN-912) Transactional replace calls maybe not propagated to cache store
by Galder Zamarreño (JIRA)
Transactional replace calls maybe not propagated to cache store
---------------------------------------------------------------
Key: ISPN-912
URL: https://issues.jboss.org/browse/ISPN-912
Project: Infinispan
Issue Type: Bug
Components: Loaders and Stores
Affects Versions: 5.0.0.ALPHA2, 4.2.1.CR1, 4.2.0.Final
Reporter: Galder Zamarreño
Assignee: Galder Zamarreño
Fix For: 4.2.1.Final, 5.0.0.ALPHA3
Why doesn't StoreModificationsBuilder in CacheStoreInterceptor override visitReplaceCommand()?
A replace is a modification which should be converted into a Store() command when executed within a transaction.
Should be easy to create a unit test to verify whether this is working, or check the testsuite for one.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
9 years, 11 months
[JBoss JIRA] Created: (ISPN-915) Cache.stop() should wait for on-going txs to finish
by Galder Zamarreño (JIRA)
Cache.stop() should wait for on-going txs to finish
---------------------------------------------------
Key: ISPN-915
URL: https://issues.jboss.org/browse/ISPN-915
Project: Infinispan
Issue Type: Bug
Affects Versions: 5.0.0.ALPHA2, 4.2.1.CR1, 4.2.0.Final
Reporter: Galder Zamarreño
Assignee: Galder Zamarreño
Fix For: 4.2.1.Final, 5.0.0.ALPHA3
At first glance, this should be relatively easy to achieve by making sure TransactionTable.stop() waits for local and remote transaction collections to be empty. Clearly, waiting for txs to finish would be configurable with a timeout. This timeout should not be bigger than the transaction timeout, otherwise you're wasting time cos even if a transaction started just before Cache.stop() was called, it could only last as long as the TM says.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
9 years, 11 months
[JBoss JIRA] Created: (ISPN-913) Cache store modification types Prepare and Commit and related classes should be removed
by Galder Zamarreño (JIRA)
Cache store modification types Prepare and Commit and related classes should be removed
---------------------------------------------------------------------------------------
Key: ISPN-913
URL: https://issues.jboss.org/browse/ISPN-913
Project: Infinispan
Issue Type: Bug
Components: Loaders and Stores
Reporter: Galder Zamarreño
Assignee: Sanne Grinovero
Fix For: 4.2.1.Final, 5.0.0.ALPHA3, 5.0.0.Final
What are the roles of Modification.Type: PREPARE, COMMIT ? These are no longer used for anything, including their correspondent org.infinispan.loaders.modifications.Prepare and org.infinispan.loaders.modifications.Commit classes. Since these are internal classes, we should get rid of them directly.
It appears that since Sanne added ModificationList as type of modification in 4.1 (ISPN-618), Prepare/Commit are no longer in use.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
9 years, 11 months
[JBoss JIRA] Created: (ISPN-917) ComponentsJMXRegistration.registerMBeans() throws when logging is enabled and a bean ws already registered
by Octavian Florescu (JIRA)
ComponentsJMXRegistration.registerMBeans() throws when logging is enabled and a bean ws already registered
----------------------------------------------------------------------------------------------------------
Key: ISPN-917
URL: https://issues.jboss.org/browse/ISPN-917
Project: Infinispan
Issue Type: Bug
Components: Core API
Affects Versions: 4.2.1.CR1
Reporter: Octavian Florescu
Assignee: Manik Surtani
Line 99 throws, as String.format is NOT passed the objectName:
public void registerMBeans() throws CacheException {
try {
List<ResourceDMBean> resourceDMBeans = getResourceDMBeansFromComponents();
boolean trace = log.isTraceEnabled();
for (ResourceDMBean resource : resourceDMBeans) {
ObjectName objectName = getObjectName(resource);
if (!mBeanServer.isRegistered(objectName)) {
try {
mBeanServer.registerMBean(resource, objectName);
if (trace) log.trace(String.format("Registered %s under %s", resource, objectName));
} catch (InstanceAlreadyExistsException e) {
//this might happen if multiple instances are trying to concurrently register same objectName
log.info("Could not register object with name:" + objectName + "(" + e.getMessage() + ")");
}
} else {
if (log.isDebugEnabled())
line 99: log.debug(String.format("Object name %s already registered"), objectName);
}
}
}
catch (Exception e) {
throw new CacheException("Failure while registering mbeans", e);
}
}
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
9 years, 11 months