Skip to content

Commit

Permalink
Remove retry loop for transaction commit after removing use of Optimi…
Browse files Browse the repository at this point in the history
…sticTransactionDB
  • Loading branch information
clemahieu committed Jul 5, 2024
1 parent 76b07b7 commit 68a9018
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions nano/store/rocksdb/transaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,20 +56,7 @@ void nano::store::rocksdb::write_transaction_impl::commit ()
if (active)
{
auto status = txn->Commit ();

// If there are no available memtables try again a few more times
constexpr auto num_attempts = 10;
auto attempt_num = 0;
while (status.IsTryAgain () && attempt_num < num_attempts)
{
status = txn->Commit ();
++attempt_num;
}

if (!status.ok ())
{
release_assert (false && "Unable to write to the RocksDB database", status.ToString ());
}
release_assert (status.ok () && "Unable to write to the RocksDB database", status.ToString ());
active = false;
}
}
Expand Down

0 comments on commit 68a9018

Please sign in to comment.