Skip to content

Commit

Permalink
missing tx handler part added
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmetmircik committed Oct 20, 2014
1 parent 48f0c0b commit 7a40e93
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
import com.hazelcast.transaction.TransactionOptions;
import com.hazelcast.util.Clock;
import com.hazelcast.util.ExceptionUtil;
import com.hazelcast.util.FutureUtil;
import com.hazelcast.util.UuidUtil;

import java.util.ArrayList;
Expand All @@ -52,6 +51,7 @@
import static com.hazelcast.transaction.impl.Transaction.State.ROLLED_BACK;
import static com.hazelcast.transaction.impl.Transaction.State.ROLLING_BACK;
import static com.hazelcast.util.FutureUtil.ExceptionHandler;
import static com.hazelcast.util.FutureUtil.RETHROW_TRANSACTION_EXCEPTION;
import static com.hazelcast.util.FutureUtil.logAllExceptions;
import static com.hazelcast.util.FutureUtil.waitWithDeadline;

Expand Down Expand Up @@ -216,7 +216,7 @@ private void awaitTxBackupCompletion(List<Future> futures) {
if (e instanceof TargetNotMemberException) {
nodeEngine.getLogger(Transaction.class).warning("Member left while replicating tx begin: " + e);
} else {
throw ExceptionUtil.rethrow(e);
RETHROW_TRANSACTION_EXCEPTION.handleException(e);
}
}
}
Expand Down Expand Up @@ -253,7 +253,7 @@ public void prepare() throws TransactionException {
for (TransactionLog txLog : txLogs) {
futures.add(txLog.prepare(nodeEngine));
}
waitWithDeadline(futures, timeoutMillis, TimeUnit.MILLISECONDS, FutureUtil.RETHROW_TRANSACTION_EXCEPTION);
waitWithDeadline(futures, timeoutMillis, TimeUnit.MILLISECONDS, RETHROW_TRANSACTION_EXCEPTION);
futures.clear();
state = PREPARED;
if (durability > 0) {
Expand All @@ -275,7 +275,7 @@ private void replicateTxnLog() throws InterruptedException, ExecutionException,
futures.add(f);
}
}
waitWithDeadline(futures, timeoutMillis, TimeUnit.MILLISECONDS, FutureUtil.RETHROW_TRANSACTION_EXCEPTION);
waitWithDeadline(futures, timeoutMillis, TimeUnit.MILLISECONDS, RETHROW_TRANSACTION_EXCEPTION);
futures.clear();
}

Expand Down

0 comments on commit 7a40e93

Please sign in to comment.