[infinispan-issues] [JBoss JIRA] (ISPN-3063) Data Inconsistency when Recovery + syncCommitPhase=false
Mircea Markus (JIRA)
jira-events at lists.jboss.org
Tue Apr 30 14:14:53 EDT 2013
[ https://issues.jboss.org/browse/ISPN-3063?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12771142#comment-12771142 ]
Mircea Markus commented on ISPN-3063:
-------------------------------------
answering myself: when recovery is enabled, it's the tx completion notification cleans up the recovery information from cluster. As the commit is async, the transaction manager has no way to know if the transaction failed during the commit - situation in which it would use the recovery mechanism. So I don't see much sense for having syncCommitPhase=false && recovery enabled, hence I suggest taking your first solution and not allowing "syncCommitPhase=false && recovery enabled".
> Data Inconsistency when Recovery + syncCommitPhase=false
> --------------------------------------------------------
>
> Key: ISPN-3063
> URL: https://issues.jboss.org/browse/ISPN-3063
> Project: Infinispan
> Issue Type: Bug
> Components: Transactions
> Affects Versions: 5.2.5.Final, 5.3.0.Alpha1
> Reporter: Pedro Ruivo
> Assignee: Mircea Markus
> Labels: recovery, transaction
>
> with syncCommitPhase=false, the CommitCommand is sent asynchronously. the TransactionCoordinator sends immediately the TxCompletionNotificationCommand that can be deliver first than the CommitCommand. The CommitCommand fails silently:
> {code}
> if (transaction == null) {
> if (trace) log.tracef("Did not find a RemoteTransaction for %s", globalTx);
> return invalidRemoteTxReturnValue();
> }
> }
> {code}
> This bug affects the 5.3 and 5.2.5. I've made one test case to catch this bug:
> 5.3 => https://github.com/pruivo/infinispan/blob/rec-async/core/src/test/java/org/infinispan/tx/recovery/RecoveryWithAsyncCommitPhase.java
> 5.2 => https://github.com/pruivo/infinispan/blob/rec-async-5.2/core/src/test/java/org/infinispan/tx/recovery/RecoveryWithAsyncCommitPhase.java
> Note: this bug may happen if you use async communication (prepare in 1PC)
> Note2: this may be related to https://issues.jboss.org/browse/ISPN-2719
> Possible solutions:
> * do not allow to configure the cache with syncCommitPhase=false && recovery enabled;
> * force syncCommitPhase=true when recovery is enabled;
> * send the CommitCommand and the TxCompletionNotificationCommand as Regular Messages (they will be deliver in FIFO order)
> Thanks to Diego Didona that spotted this bug.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the infinispan-issues
mailing list