diff options
author | Sean Quah <8349537+squahtx@users.noreply.github.com> | 2023-01-25 13:38:53 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-25 13:38:53 +0000 |
commit | a63d4cc9e96c1f5bb9c5bb9fc9119fb137de3b1b (patch) | |
tree | 664de7b53d6e04cc31428f015752fc32ee840192 /synapse/storage/engines/_base.py | |
parent | Document the export user data command. (#14883) (diff) | |
download | synapse-a63d4cc9e96c1f5bb9c5bb9fc9119fb137de3b1b.tar.xz |
Make sqlite database migrations transactional again (#14910)
#13873 introduced a regression which causes sqlite database migrations to no longer run inside a transaction. Wrap them in a transaction again, to avoid database corruption when migrations are interrupted. Fixes #14909. Signed-off-by: Sean Quah <seanq@matrix.org>
Diffstat (limited to 'synapse/storage/engines/_base.py')
-rw-r--r-- | synapse/storage/engines/_base.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/synapse/storage/engines/_base.py b/synapse/storage/engines/_base.py index 70e594a68f..bc9ca3a53c 100644 --- a/synapse/storage/engines/_base.py +++ b/synapse/storage/engines/_base.py @@ -132,6 +132,9 @@ class BaseDatabaseEngine(Generic[ConnectionType, CursorType], metaclass=abc.ABCM """Execute a chunk of SQL containing multiple semicolon-delimited statements. This is not provided by DBAPI2, and so needs engine-specific support. + + Some database engines may automatically COMMIT the ongoing transaction both + before and after executing the script. """ ... |