diff options
author | Erik Johnston <erik@matrix.org> | 2015-04-27 13:22:30 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2015-04-27 13:22:30 +0100 |
commit | 2732be83d9e883184f4a783fb7ba15487f30c20d (patch) | |
tree | 55ca53c5d3f1c0641d65cbe040ebe32d5ee4992c /synapse/storage/engines/sqlite3.py | |
parent | Handle the fact that postgres databases can be restarted from under us (diff) | |
download | synapse-2732be83d9e883184f4a783fb7ba15487f30c20d.tar.xz |
Shuffle operations so that locking upsert happens last in the txn. This ensures the lock is held for the least amount of time possible.
Diffstat (limited to 'synapse/storage/engines/sqlite3.py')
-rw-r--r-- | synapse/storage/engines/sqlite3.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/synapse/storage/engines/sqlite3.py b/synapse/storage/engines/sqlite3.py index 39828a597c..f62d5d1205 100644 --- a/synapse/storage/engines/sqlite3.py +++ b/synapse/storage/engines/sqlite3.py @@ -38,3 +38,6 @@ class Sqlite3Engine(object): def is_connection_closed(self, conn): return False + + def lock_table(self, txn, table): + return |