mirror of
https://mau.dev/maunium/synapse.git
synced 2024-11-12 13:01:34 +01:00
Don't always lock "user_ips" table when performing non-native upsert (#15788)
This commit is contained in:
parent
0618bf94cd
commit
2ac6c3bbb5
2 changed files with 2 additions and 1 deletions
1
changelog.d/15788.bugfix
Normal file
1
changelog.d/15788.bugfix
Normal file
|
@ -0,0 +1 @@
|
|||
Fix a bug introduced in 1.57.0 where the wrong table would be locked on updating database rows when using SQLite as the database backend.
|
|
@ -1529,7 +1529,7 @@ class DatabasePool:
|
|||
# Lock the table just once, to prevent it being done once per row.
|
||||
# Note that, according to Postgres' documentation, once obtained,
|
||||
# the lock is held for the remainder of the current transaction.
|
||||
self.engine.lock_table(txn, "user_ips")
|
||||
self.engine.lock_table(txn, table)
|
||||
|
||||
for keyv, valv in zip(key_values, value_values):
|
||||
_keys = dict(zip(key_names, keyv))
|
||||
|
|
Loading…
Reference in a new issue