Skip to content

Commit

Permalink
Handle exceptions when attempting rollback
Browse files Browse the repository at this point in the history
  • Loading branch information
geoffxy committed May 12, 2024
1 parent a081664 commit 24fb2c1
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion workloads/chbenchmark/py-tpcc/pytpcc/runtime/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,14 @@ def execute(
if self.stop_on_error:
raise
r.abortTransaction(txn_id)
self.driver.ensureRollback()

try:
self.driver.ensureRollback()
except: # pylint: disable=bare-except
# This may happen if we try to issue a rollback when the connection has dropped.
verbose_logger.exception(
"[T %d] Ran into error when running rollback.", worker_index
)

# Back off slightly.
if backoff is None:
Expand Down

0 comments on commit 24fb2c1

Please sign in to comment.