Skip to content

fix(federation): incoming messages dropped when saving fails - #41989

Draft
cardoso wants to merge 1 commit into
developfrom
fix/CORE-2671
Draft

fix(federation): incoming messages dropped when saving fails#41989
cardoso wants to merge 1 commit into
developfrom
fix/CORE-2671

Conversation

@cardoso

@cardoso cardoso commented Aug 28, 2026

Copy link
Copy Markdown
Member

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

Review in cubic

@dionisio-bot

dionisio-bot Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Looks like this PR is not ready to merge, because of the following issues:

  • This PR is missing the 'stat: QA assured' label
  • This PR is missing the required milestone or project

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

@changeset-bot

changeset-bot Bot commented Aug 28, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 71b3adc

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Aug 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.43%. Comparing base (13806e6) to head (71b3adc).

Additional details and impacted files

Impacted file tree graph

@@             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     
Flag Coverage Δ
e2e 59.03% <ø> (+0.03%) ⬆️
e2e-api 45.99% <ø> (-0.28%) ⬇️
unit 71.20% <100.00%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant