Skip to content

Conversation

kegsay
Copy link
Contributor

@kegsay kegsay commented Sep 2, 2025

If we are told the state before event E is S via /state_ids, we should refuse to persist E if we fail to persist all events in S, else we are knowingly diverging from that server.

This causes room state to diverge on bad federation connectivity.

Discovered via Chaos testing.

Pending Complement tests.

Pull Request Checklist

  • Pull request is based on the develop branch
  • Pull request includes a changelog file. The entry should:
    • Be a short description of your change which makes sense to users. "Fixed a bug that prevented receiving messages from other servers." instead of "Moved X method from EventStore to EventWorkerStore.".
    • Use markdown where necessary, mostly for code blocks.
    • End with either a period (.) or an exclamation mark (!).
    • Start with a capital letter.
    • Feel free to credit yourself, by adding a sentence "Contributed by @github_username." or "Contributed by [Your Name]." to the end of the entry.
  • Code style is correct (run the linters)

If we are told the state before event E is S via `/state_ids`,
we should refuse to persist E if we fail to persist _all events_
in S, else we are knowingly diverging from that server.

This causes room state to diverge on bad federation connectivity.

Discovered via Chaos testing.
@kegsay kegsay requested a review from a team as a code owner September 2, 2025 15:39
Copy link
Contributor

@reivilibre reivilibre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable, but would indeed be nice to see a Complement test for this if you have the chance — feels like a subtle yet potentially severe case.

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.

2 participants