Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Change isolation level on upsert transcation for receipts_graph to RE…
Browse files Browse the repository at this point in the history
…AD_COMMITTED from REPEATABLE_READ
  • Loading branch information
realtyem committed Sep 11, 2023
1 parent edd83f2 commit 908b908
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions synapse/storage/databases/main/receipts.py
Original file line number Diff line number Diff line change
Expand Up @@ -804,6 +804,9 @@ async def insert_receipt(
event_ids,
thread_id,
data,
# Use READ_COMMITTED to avoid 'could not serialize access due to concurrent
# update' Postgres errors which lead to rollbacks and re-dos.
isolation_level=IsolationLevel.READ_COMMITTED,
)

max_persisted_id = self._receipts_id_gen.get_current_token()
Expand Down

0 comments on commit 908b908

Please sign in to comment.