[infinispan-issues] [JBoss JIRA] (ISPN-61) Dynamically switch between single and two phase commit based on cluster size
Mircea Markus (JIRA)
issues at jboss.org
Fri Jan 24 14:20:28 EST 2014
[ https://issues.jboss.org/browse/ISPN-61?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mircea Markus resolved ISPN-61.
-------------------------------
Resolution: Rejected
total order is a better alternative
> Dynamically switch between single and two phase commit based on cluster size
> ----------------------------------------------------------------------------
>
> Key: ISPN-61
> URL: https://issues.jboss.org/browse/ISPN-61
> Project: Infinispan
> Issue Type: Feature Request
> Affects Versions: 4.0.0.ALPHA4
> Reporter: Mircea Markus
> Assignee: Mircea Markus
>
> Following 2 optimizations might be implemented with respect to transactions.
> 1) From an email on infinispan-dev (horizon-dev actually):
> if there are only two members int the cluster always use an 1PC. If the 1st phase fails remotely, then also rollback locally. This would reduce one network roundtrip.
> While this is an interesting thought, it does raise the potential for race conditions - since this decision will have to be taken in the TxInterceptor in the beforeCompletion phase of a transaction, and by the time the call gets to the interceptor for replication, the topology may have changed such that you need to replicate to 2 instead of 1 other peer. Which would mean a 2PC again. So it does need some thought.
> 2) when asked to prepare, a participant might return a value indicating that no changes were made (read-only participant), so this one won't need an commit message, so less roundtrip.
--
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