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

Commit

Permalink
Record any exception when processing a pulled event (#13814)
Browse files Browse the repository at this point in the history
Part of #13700 and #13356

Follow-up to #13589
  • Loading branch information
MadLittleMods authored Sep 15, 2022
1 parent b2b0c85 commit 140af0c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion changelog.d/13589.feature
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Keep track when we attempt to backfill an event but fail so we can intelligently back-off in the future.
Keep track when we fail to process a pulled event over federation so we can intelligently back-off in the future.
1 change: 1 addition & 0 deletions changelog.d/13814.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Keep track when we fail to process a pulled event over federation so we can intelligently back-off in the future.
10 changes: 10 additions & 0 deletions synapse/handlers/federation_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -866,6 +866,11 @@ async def _process_pulled_event(
event.room_id, event_id, str(err)
)
return
except Exception as exc:
await self._store.record_event_failed_pull_attempt(
event.room_id, event_id, str(exc)
)
raise exc

try:
try:
Expand Down Expand Up @@ -908,6 +913,11 @@ async def _process_pulled_event(
logger.warning("Pulled event %s failed history check.", event_id)
else:
raise
except Exception as exc:
await self._store.record_event_failed_pull_attempt(
event.room_id, event_id, str(exc)
)
raise exc

@trace
async def _compute_event_context_with_maybe_missing_prevs(
Expand Down

0 comments on commit 140af0c

Please sign in to comment.