mirror of
https://github.com/element-hq/synapse.git
synced 2024-12-14 11:57:44 +00:00
Record any exception when processing a pulled event (#13814)
Part of https://github.com/matrix-org/synapse/issues/13700 and https://github.com/matrix-org/synapse/issues/13356 Follow-up to https://github.com/matrix-org/synapse/pull/13589
This commit is contained in:
parent
b2b0c85279
commit
140af0cdb6
3 changed files with 12 additions and 1 deletions
|
@ -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
changelog.d/13814.feature
Normal file
1
changelog.d/13814.feature
Normal file
|
@ -0,0 +1 @@
|
|||
Keep track when we fail to process a pulled event over federation so we can intelligently back-off in the future.
|
|
@ -866,6 +866,11 @@ class FederationEventHandler:
|
|||
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:
|
||||
|
@ -908,6 +913,11 @@ class FederationEventHandler:
|
|||
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(
|
||||
|
|
Loading…
Reference in a new issue