mirror of https://github.com/zulip/zulip.git
7720d362ba
By default, `SELECT FOR UPDATE` will also lock any rows which are `JOIN`ed into the selected rows; in the case of UserMessage rows, this can mean arbitrary Message rows. Since the messages themselves are not being changed, it is not necessary to lock them -- and doing so may lead to deadlocks, in the case that the UserMessage row is locked for update before the Message, and some other request has already taken a read lock on the Message and is blocked on the UserMessage write lock. Change `select_for_update_query` to explicitly only lock UserMessage. |
||
---|---|---|
.. | ||
__init__.py | ||
alert_words.py | ||
bots.py | ||
clients.py | ||
constants.py | ||
custom_profile_fields.py | ||
drafts.py | ||
groups.py | ||
linkifiers.py | ||
lookups.py | ||
messages.py | ||
muted_users.py | ||
onboarding_steps.py | ||
prereg_users.py | ||
presence.py | ||
push_notifications.py | ||
realm_audit_logs.py | ||
realm_emoji.py | ||
realm_playgrounds.py | ||
realms.py | ||
recipients.py | ||
scheduled_jobs.py | ||
streams.py | ||
user_activity.py | ||
user_topics.py | ||
users.py |