mirror of https://github.com/zulip/zulip.git
message_flags: Update transactions to be durable in do_mark_all_as_read.
In 'do_mark_all_as_read', the transactions which mark the messages as read in batches should be marked as durable to avoid addition of any outer atomic block as we support marking a few batches (not all messages) as read in the case of a timeout.
This commit is contained in:
parent
64beea2765
commit
62eb850423
|
@ -55,7 +55,7 @@ def do_mark_all_as_read(user_profile: UserProfile, *, timeout: float | None = No
|
|||
if timeout is not None and time.monotonic() >= start_time + timeout:
|
||||
return None
|
||||
|
||||
with transaction.atomic(savepoint=False):
|
||||
with transaction.atomic(durable=True):
|
||||
query = (
|
||||
UserMessage.select_for_update_query()
|
||||
.filter(user_profile=user_profile)
|
||||
|
|
Loading…
Reference in New Issue