Menu

#2 1PC Optimization Broke

open
nobody
None
5
2002-11-07
2002-11-07
Ted Poole
No

In tyrex.tm.impl.TransactionImpl, the
canUseOnePhaseCommit() method performs a
sequence of tests to see if the TM can get away
with doing a 1PC instead of a 2PC.

I believe the following test is wrong:

// if there is only one enlisted resource then
yes
if ( ( null != _enlisted ) &&
( _enlisted._nextHolder != null ) &&
( null == _delisted ) )
return true;

I agree with comment but the test itself is wrong. It
does in fact check that there is more than one
enlisted resources.

Discussion


Log in to post a comment.