matrix-org / synapse

Synapse: Matrix homeserver written in Python/Twisted.
https://matrix-org.github.io/synapse
Apache License 2.0
11.83k stars 2.12k forks source link

stop using `REPEATABLE READ` everywhere #11567

Open richvdh opened 2 years ago

richvdh commented 2 years ago

currently, all postgres transactions are run in REPEATABLE READ isolation level, which is almost certainly more than we really need. The difficulty is the need to audit all of our transactions to check which actually need it.

richvdh commented 2 years ago

per #4473:

Maybe we could do this with an option to runInteraction which indicates whether we need to change the isolation level (defaulting to "yes"). Over time we can go through our transactions and turn the option off for transactions we are happy don't require this.

clokep commented 2 years ago

Maybe related to #4993?