Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Add missing txn.execute on FOR UPDATE statement
Browse files Browse the repository at this point in the history
  • Loading branch information
Fizzadar committed Nov 8, 2023
1 parent 576605e commit 376313e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions synapse/storage/databases/main/push_rule.py
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,7 @@ def _add_push_rule_highest_priority_txn(
WHERE user_name = ? and priority_class = ?
FOR UPDATE
"""
txn.execute(sql, (user_id, priority_class))
else:
# Annoyingly SQLite doesn't support row level locking, so lock the whole table
self.database_engine.lock_table(txn, "push_rules")
Expand Down

0 comments on commit 376313e

Please sign in to comment.