You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: docs/development/room-dag-concepts.md
+14-10Lines changed: 14 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,9 @@ A (oldest) <---- B <---- C (most recent)
13
13
14
14
## Depth and stream ordering
15
15
16
-
Events are sorted by `(topological_ordering, stream_ordering)` where `topological_ordering` is just `depth`. Normally, `stream_ordering` is an auto incrementing integer but for `backfilled=true` events, it decrements.
16
+
Events are sorted by `(topological_ordering, stream_ordering)` where
17
+
`topological_ordering` is just `depth`. Normally, `stream_ordering` is an auto
18
+
incrementing integer but for `backfilled=true` events, it decrements.
17
19
18
20
`depth` is not re-calculated when messages are inserted into the DAG.
19
21
@@ -33,27 +35,29 @@ A backwards extremity is a place where the oldest-in-time events of the DAG
33
35
34
36
This is an event where we haven't fetched all of the `prev_events` for.
35
37
36
-
Once we have fetched all of it's `prev_events`, it's unmarked as backwards extremity
37
-
and those `prev_events` become the new backwards extremities.
38
+
Once we have fetched all of it's `prev_events`, it's unmarked as backwards
39
+
extremity and those `prev_events` become the new backwards extremities.
38
40
39
41
40
42
## Outliers
41
43
42
44
We mark an event as an `outlier` when we haven't figured out the state for the
43
45
room at that point in the DAG yet.
44
46
45
-
We won't *necessarily* have the `prev_events` of an `outlier` in the database, but it's entirely possible that we *might*. The status of whether we have all of the `prev_events` is marked as
46
-
a [backwards extremity](#backwards-extremity).
47
+
We won't *necessarily* have the `prev_events` of an `outlier` in the database,
48
+
but it's entirely possible that we *might*. The status of whether we have all of
49
+
the `prev_events` is marked as a [backwards extremity](#backwards-extremity).
47
50
48
-
For example, when we fetch the event auth chain or state for a given event, we mark all of those
49
-
claimed auth events as outliers because we haven't done the state calculation ourself.
51
+
For example, when we fetch the event auth chain or state for a given event, we
52
+
mark all of those claimed auth events as outliers because we haven't done the
53
+
state calculation ourself.
50
54
51
55
52
56
### Floating outlier
53
57
54
-
A floating `outlier` is an arbitrary floating event in the DAG (as opposed to being
55
-
inline with the current DAG). This happens when it the event doesn't have any `prev_events`
56
-
or fake `prev_events` that don't exist.
58
+
A floating `outlier` is an arbitrary floating event in the DAG (as opposed to
59
+
being inline with the current DAG). This happens when it the event doesn't have
60
+
any `prev_events`or fake `prev_events` that don't exist.
0 commit comments