Skip to content
Snippets Groups Projects
Unverified Commit 2ac6c3bb authored by Andrew Morgan's avatar Andrew Morgan Committed by GitHub
Browse files

Don't always lock "user_ips" table when performing non-native upsert (#15788)

parent 0618bf94
No related branches found
No related tags found
No related merge requests found
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.
\ No newline at end of file
...@@ -1529,7 +1529,7 @@ class DatabasePool: ...@@ -1529,7 +1529,7 @@ class DatabasePool:
# Lock the table just once, to prevent it being done once per row. # Lock the table just once, to prevent it being done once per row.
# Note that, according to Postgres' documentation, once obtained, # Note that, according to Postgres' documentation, once obtained,
# the lock is held for the remainder of the current transaction. # 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): for keyv, valv in zip(key_values, value_values):
_keys = dict(zip(key_names, keyv)) _keys = dict(zip(key_names, keyv))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment