fix(federation): incoming messages dropped when saving fails - #41989
fix(federation): incoming messages dropped when saving fails#41989cardoso wants to merge 1 commit into
Conversation
|
Looks like this PR is not ready to merge, because of the following issues:
Please fix the issues and try again If you have any trouble, please check the PR guidelines |
|
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #41989 +/- ##
===========================================
- Coverage 69.47% 69.43% -0.04%
===========================================
Files 4286 4288 +2
Lines 170241 170336 +95
Branches 30372 30310 -62
===========================================
- Hits 118269 118268 -1
- Misses 46772 46866 +94
- Partials 5200 5202 +2
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
The homeserver.matrix.message listener caught every error from
saveFederationMessage and returned normally. The SDK's staging area
removes an event from staging only once the emitted handler resolves, so
swallowing the error told it the event had been processed and the message
was lost with no retry.
This is most visible for media: the origin can still be committing a
large upload when the event arrives, and every download endpoint answers
404 until it finishes. Rethrowing leaves the event staged so the staging
area can retry it.
RocketChat/homeserver#410 adds the backoff that makes
those retries outlast the upload.
Issue(s)
CORE-2617
Steps to test or reproduce
Further comments