Review comments

This commit is contained in:
Kegan Dougal
2026-04-14 14:25:39 +01:00
parent fa6059e5de
commit 8a4fd52cae
4 changed files with 5 additions and 7 deletions

View File

@@ -1 +1 @@
Add experimental support for MSC4242: State DAGs. Excludes federation support.
Add experimental support for [MSC4242](https://github.com/matrix-org/matrix-spec-proposals/pull/4242): State DAGs. Excludes federation support.

View File

@@ -60,7 +60,7 @@ enum EventInternalMetadataData {
DelayId(Box<str>),
TokenId(i64),
DeviceId(Box<str>),
CalculatedAuthEventIDs(Vec<String>),
CalculatedAuthEventIDs(Vec<String>), // MSC4242: State DAGs
}
impl EventInternalMetadataData {

View File

@@ -2141,8 +2141,9 @@ class RoomMemberMasterHandler(RoomMemberHandler):
list(previous_membership_event.auth_event_ids()) + prev_event_ids
)
# Either one is set or the other
assert prev_state_events or auth_event_ids
# State DAG rooms should not have auth events specified
if prev_state_events:
assert auth_event_ids is None
# Try several times, it could fail with PartialStateConflictError
# in handle_new_client_event, cf comment in except block.
max_retries = 5

View File

@@ -34,8 +34,5 @@ CREATE TABLE IF NOT EXISTS msc4242_state_dag_edges(
-- one of the `prev_state_events` for this event ID. We must have it since we must have the entire state DAG.
-- can be NULL for the create event.
prev_state_event_id TEXT REFERENCES events(event_id)
-- calculated depth for this event ID. There is some denormalisation here as we're storing the depth
-- multiple times for each prev_state_event_id.
-- depth BIGINT NOT NULL
);
CREATE UNIQUE INDEX msc4242_state_dag_edges_key ON msc4242_state_dag_edges(room_id, event_id, prev_state_event_id);