mirror of
https://github.com/element-hq/synapse.git
synced 2026-04-15 21:05:45 +00:00
Review comments
This commit is contained in:
@@ -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.
|
||||
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user