fix: provide remote servers a way to find out about an event created during the remote join handshake#19390
Conversation
e29abe1 to
688aca5
Compare
|
I am submitting this PR as an employee of Famedly, who has signed the corporate CLA, and used my company email in the commit. |
during the remote join handshake
688aca5 to
9483291
Compare
anoadragon453
left a comment
There was a problem hiding this comment.
Hi @FrenchGithubUser. As far as the Element Backend team is aware, Famedly has not yet signed the CCLA. However this is apparently currently in progress.
Holding off on review until that's resolved. Regardless, thank you for submitting your work upstream!
|
famedly has now signed the ccla :) |
|
@FrenchGithubUser I think to allow the CLA bot to let you through, your membership to the famedly organisation must be public If you don't want that to be the case, I can add you specifically to the list of allowed users, but making the org membership public is easier for us :) |
|
@sandhose I just updated the membership, should be public now! I didn't know this visibility could be changed :) |
Pull Request Checklist
EventStoretoEventWorkerStore.".code blocks.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_eventof 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
/syncor 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:
make_joinfrom remote server, response sentsend_joinfrom 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.A. Creates a
org.matrix.dummy_eventthat hasprev_eventscontaining both the join and message A.B. Sends this dummy event to all servers in the room.
/sendendpoint, saves it in a queue until the partial state join begins syncing additional room state