Skip to content

fix: provide remote servers a way to find out about an event created during the remote join handshake#71

Merged
FrenchGithubUser merged 1 commit intomasterfrom
jason/gedisa-exp-3
Nov 26, 2025
Merged

fix: provide remote servers a way to find out about an event created during the remote join handshake#71
FrenchGithubUser merged 1 commit intomasterfrom
jason/gedisa-exp-3

Conversation

@jason-famedly
Copy link
Copy Markdown
Member

@jason-famedly jason-famedly commented Jul 24, 2025

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 #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 #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

@jason-famedly jason-famedly force-pushed the jason/gedisa-exp-3 branch 3 times, most recently from 100cb81 to 3ece1dc Compare July 24, 2025 18:03
@FrenchGithubUser FrenchGithubUser marked this pull request as ready for review November 24, 2025 16:06
@FrenchGithubUser FrenchGithubUser requested a review from a team as a code owner November 24, 2025 16:06
@jason-famedly jason-famedly changed the title Example 3 for gedisa missing messages fix: provide remote servers a way to find out about an event created during the remote join handshake Nov 24, 2025
@FrenchGithubUser FrenchGithubUser merged commit 9872c3c into master Nov 26, 2025
23 checks passed
@FrenchGithubUser FrenchGithubUser deleted the jason/gedisa-exp-3 branch November 26, 2025 08:51
@jason-famedly jason-famedly mentioned this pull request Dec 16, 2025
3 tasks
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.

3 participants