Skip to content

Commit

Permalink
Also retry on transaction serialization errors
Browse files Browse the repository at this point in the history
A lot of them popped up in the tests in the last two days, and we
should have been retrying them.

This is kind of weird, though because until quite recently we *never*
retried queries in `TRANSACTION_ISOLATION = False` tests and they
didn't fail *this* often.

The failures are all on things that interact with worker tasks
operating on the tables, though, so there is a lot of scope for timing
trouble.
  • Loading branch information
msullivan committed Feb 7, 2025
1 parent 4fbff1b commit 0df446e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion edb/testbase/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,10 @@ async def _retry_operation(self, func):
# since that *ought* to be done at the transaction level.
# Though in reality in the test suite it is usually done at the
# test runner level.
except errors.TransactionConflictError:
except (
errors.TransactionConflictError,
errors.TransactionSerializationError,
):
if i >= 5 or self.is_in_transaction():
raise
await asyncio.sleep(
Expand Down

0 comments on commit 0df446e

Please sign in to comment.