Skip to content

Commit

Permalink
fix: fix potential unnecessary transaction retry (#337)
Browse files Browse the repository at this point in the history
A transaction could in some circumstances be retried after an abort using the previous
transaction id. This would cause the retry to abort directly as well, and then start a
new transaction. This extra loop has now been removed.

Fixes #327
  • Loading branch information
olavloite committed Jul 14, 2020
1 parent 26be103 commit 1a4f4fd
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -654,7 +654,7 @@ private <T> T runInternal(final TransactionCallable<T> txCallable) {
new Callable<T>() {
@Override
public T call() {
if (txn.isAborted()) {
if (attempt.get() > 0) {
txn = session.newTransaction();
}
checkState(
Expand Down

0 comments on commit 1a4f4fd

Please sign in to comment.