diff options
author | Brian S. O'Neill <bronee@gmail.com> | 2008-08-21 01:19:03 +0000 |
---|---|---|
committer | Brian S. O'Neill <bronee@gmail.com> | 2008-08-21 01:19:03 +0000 |
commit | 2d19f5e828adc55b238e4dff64ca62868c1bcc83 (patch) | |
tree | 56b91da9491c4c29bbeabacd56090c3d07011ad5 /src | |
parent | 1b49ba901499d0bd7e05da231c12b932c4e6c9e4 (diff) |
Removed broken nested transaction optimization.
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/com/amazon/carbonado/txn/TransactionScope.java | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/src/main/java/com/amazon/carbonado/txn/TransactionScope.java b/src/main/java/com/amazon/carbonado/txn/TransactionScope.java index 62b62a3..daf4992 100644 --- a/src/main/java/com/amazon/carbonado/txn/TransactionScope.java +++ b/src/main/java/com/amazon/carbonado/txn/TransactionScope.java @@ -445,20 +445,7 @@ public class TransactionScope<Txn> { if (mTxn != null) {
scope.mTxnMgr.reuseTxn(mTxn);
} else {
- Txn parentTxn;
- if (mParent == null || mTop) {
- parentTxn = null;
- } else if ((parentTxn = mParent.mTxn) == null) {
- // No point in creating nested transaction if parent
- // has never been used. Create parent transaction
- // and use it in child transaction, just like a fake
- // nested transaction.
- if ((parentTxn = mParent.getTxn()) != null) {
- return mTxn = parentTxn;
- }
- // Isolation level of parent is none, so proceed to create
- // a real transaction.
- }
+ Txn parentTxn = (mParent == null || mTop) ? null : mParent.getTxn();
if (mTimeoutUnit == null) {
mTxn = scope.mTxnMgr.createTxn(parentTxn, mLevel);
} else {
|