Db txn set isolation level (#11799)

Co-authored-by: Brendan Abolivier <babolivier@matrix.org>
This commit is contained in:
Nick Barrett 2022-01-25 14:14:46 +00:00 committed by GitHub
parent fc8598bc87
commit b59d285f7c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 61 additions and 5 deletions

View file

@ -15,6 +15,7 @@ import platform
import struct
import threading
import typing
from typing import Optional
from synapse.storage.engines import BaseDatabaseEngine
from synapse.storage.types import Connection
@ -122,6 +123,12 @@ class Sqlite3Engine(BaseDatabaseEngine["sqlite3.Connection"]):
# set the connection to autocommit mode.
pass
def attempt_to_set_isolation_level(
self, conn: Connection, isolation_level: Optional[int]
):
# All transactions are SERIALIZABLE by default in sqllite
pass
# Following functions taken from: https://github.com/coleifer/peewee