From 12fd6d76888cbb79f9db472a0de47819111e5c0d Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Thu, 17 May 2018 16:07:20 +0100 Subject: Document case of unconnected chunks --- synapse/storage/chunk_ordered_table.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/synapse/storage/chunk_ordered_table.py b/synapse/storage/chunk_ordered_table.py index 4a56af759a..06257d66d8 100644 --- a/synapse/storage/chunk_ordered_table.py +++ b/synapse/storage/chunk_ordered_table.py @@ -38,6 +38,10 @@ class ChunkDBOrderedListStore(OrderedListStore): second chunk, then we say that the first chunk references the second, and thus forming a DAG. + The server may only have a subset of all events in a room, in which case + its possible for the server to have chunks that are unconnected from each + other. The ordering between unconnected chunks is arbitrary. + The class is designed for use inside transactions and so takes a transaction object in the constructor. This means that it needs to be re-instantiated in each transaction, so all state needs to be stored -- cgit 1.4.1