MSC4242: State DAGs (storage) - #19718
Merged
Merged
Conversation
3 tasks
kegsay
commented
Apr 24, 2026
MadLittleMods
approved these changes
Aug 24, 2026
| Executes as a single recursive CTE in both SQLite and Postgres. | ||
| """ | ||
| earliest_set = set(earliest_event_ids) | ||
| seed_ids = sorted(set(latest_event_ids) - earliest_set) |
Contributor
There was a problem hiding this comment.
Updated to the following
synapse/synapse/storage/databases/main/event_federation.py
Lines 1313 to 1316 in 3bf561e
We should point to MSC4242 that explains this behavior
kegsay
force-pushed
the
kegan/4242-storage
branch
from
September 1, 2026 14:16
5a708b9 to
64a291f
Compare
Add storage functions needed for federation support. - `get_missing_events_state_dag`: will be used to satisfy `/get_missing_events` requests. - `get_state_dag`: will be used to satisfy `/send_join` requests.
Co-authored-by: Eric Eastwood <madlittlemods@gmail.com>
Works in both sqlite and postgres.
kegsay
force-pushed
the
kegan/4242-storage
branch
from
September 2, 2026 07:19
64a291f to
d847335
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Split out from #19425
Add storage functions needed for federation support for MSC4242:
get_missing_events_state_dag: will be used to satisfy/get_missing_eventsrequests.get_state_dag: will be used to satisfy/send_joinrequests.Part of a series of 5x PRs to land the federation part of MSC4242 (storage, fedclient, serving, inbound-joins, inbound-pulls).
Pull Request Checklist
EventStoretoEventWorkerStore.".code blocks.