Skip to content

Conversation

@FrenchGithubUser
Copy link

@FrenchGithubUser FrenchGithubUser commented Jan 19, 2026

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)

TLDR

Use a "dummy" event to tie together forward extremities, and proactively send it to all servers in the room. This allows recently joined servers to become aware of recent events that would otherwise have "slipped through the cracks" and thus not be retrievable.

NOTE: While this does send the "dummy" event to all servers in the room, regardless of if they should care or not, at some point a new event will reference this dummy event and require it's retrieval. Since it was proactively sent, this will now not be necessary. This assists in preventing forks in the DAG

Alternatives

Unlike famedly/synapse#51 which 'pushes' the missing event directly, this causes the event to be 'pulled' by referencing it as a prev_event of a dummy event. Since the 'dummy event' does not get passed into the client, it is effectively invisible.

Draw-backs of famedly/synapse#51 meant it was not always certain if the 'pushed event' would show up in /sync or in /messages, but usually was in /sync. This method always has the 'missing event' show up in /messages, which I feel is more technically correct as that event was(albeit just barely) created before the 'join event' is persisted.

The Process

The order of events:

  1. make_join from remote server, response sent
  2. Message A sent from local server
  3. send_join from remote server, response from local server. Message A is not in this(as it is not state and is not referenced in any events that are included). Join event is persisted on local server.
  4. Local server realizes there are two forward extremities just after persisting the join event.
    A. Creates a org.matrix.dummy_event that has prev_events containing both the join and message A.
    B. Sends this dummy event to all servers in the room.
  5. Remote server receives the dummy event via it's /send endpoint, saves it in a queue until the partial state join begins syncing additional room state

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@FrenchGithubUser FrenchGithubUser marked this pull request as ready for review January 19, 2026 11:36
@FrenchGithubUser FrenchGithubUser requested a review from a team as a code owner January 19, 2026 11:36
@FrenchGithubUser
Copy link
Author

I am submitting this PR as an employee of Famedly, who has signed the corporate CLA, and used my company email in the commit.

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