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

Commit 53834bb

Browse files
authored
Run remove_push_actions_from_staging in foreground (#8081)
If we got an error persisting an event, we would try to remove the push actions asynchronously, which would lead to a 'Re-starting finished log context' warning. I don't think there's any need for this to be asynchronous.
1 parent ff0e894 commit 53834bb

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

changelog.d/8081.bugfix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix `Re-starting finished log context PUT-nnnn` warning when event persistence failed.

synapse/handlers/message.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -891,9 +891,7 @@ async def handle_new_client_event(
891891
except Exception:
892892
# Ensure that we actually remove the entries in the push actions
893893
# staging area, if we calculated them.
894-
run_in_background(
895-
self.store.remove_push_actions_from_staging, event.event_id
896-
)
894+
await self.store.remove_push_actions_from_staging(event.event_id)
897895
raise
898896

899897
async def _validate_canonical_alias(

0 commit comments

Comments
 (0)