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

Commit 140af0c

Browse files
Record any exception when processing a pulled event (#13814)
Part of #13700 and #13356 Follow-up to #13589
1 parent b2b0c85 commit 140af0c

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

changelog.d/13589.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Keep track when we attempt to backfill an event but fail so we can intelligently back-off in the future.
1+
Keep track when we fail to process a pulled event over federation so we can intelligently back-off in the future.

changelog.d/13814.feature

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Keep track when we fail to process a pulled event over federation so we can intelligently back-off in the future.

synapse/handlers/federation_event.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -866,6 +866,11 @@ async def _process_pulled_event(
866866
event.room_id, event_id, str(err)
867867
)
868868
return
869+
except Exception as exc:
870+
await self._store.record_event_failed_pull_attempt(
871+
event.room_id, event_id, str(exc)
872+
)
873+
raise exc
869874

870875
try:
871876
try:
@@ -908,6 +913,11 @@ async def _process_pulled_event(
908913
logger.warning("Pulled event %s failed history check.", event_id)
909914
else:
910915
raise
916+
except Exception as exc:
917+
await self._store.record_event_failed_pull_attempt(
918+
event.room_id, event_id, str(exc)
919+
)
920+
raise exc
911921

912922
@trace
913923
async def _compute_event_context_with_maybe_missing_prevs(

0 commit comments

Comments
 (0)