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

Commit

Permalink
Run remove_push_actions_from_staging in foreground
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
richvdh committed Aug 13, 2020
1 parent ff0e894 commit e1faf7f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 1 addition & 0 deletions changelog.d/8081.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix `Re-starting finished log context PUT-nnnn` warning when event persistence failed.
4 changes: 1 addition & 3 deletions synapse/handlers/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -891,9 +891,7 @@ async def handle_new_client_event(
except Exception:
# Ensure that we actually remove the entries in the push actions
# staging area, if we calculated them.
run_in_background(
self.store.remove_push_actions_from_staging, event.event_id
)
await self.store.remove_push_actions_from_staging(event.event_id)
raise

async def _validate_canonical_alias(
Expand Down

0 comments on commit e1faf7f

Please sign in to comment.