summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/com/amazon/carbonado/txn/TransactionScope.java15
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 {