summary refs log tree commit diff
path: root/synapse/events
diff options
context:
space:
mode:
authorErik Johnston <erikj@jki.re>2018-02-06 14:31:24 +0000
committerGitHub <noreply@github.com>2018-02-06 14:31:24 +0000
commit3d33eef6fcbba474664a9bccdcb8822c6f72ee8c (patch)
treead7a2201514be1acebc9ef72a10e9cbcc7f6696c /synapse/events
parentMerge pull request #2849 from matrix-org/rav/clean_up_state_delta (diff)
downloadsynapse-3d33eef6fcbba474664a9bccdcb8822c6f72ee8c.tar.xz
Store state groups separately from events (#2784)
* Split state group persist into seperate storage func

* Add per database engine code for state group id gen

* Move store_state_group to StateReadStore

This allows other workers to use it, and so resolve state.

* Hook up store_state_group

* Fix tests

* Rename _store_mult_state_groups_txn

* Rename StateGroupReadStore

* Remove redundant _have_persisted_state_group_txn

* Update comments

* Comment compute_event_context

* Set start val for state_group_id_seq

... otherwise we try to recreate old state groups

* Update comments

* Don't store state for outliers

* Update comment

* Update docstring as state groups are ints
Diffstat (limited to 'synapse/events')
-rw-r--r--synapse/events/snapshot.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/events/snapshot.py b/synapse/events/snapshot.py
index e9a732ff03..87e3fe7b97 100644
--- a/synapse/events/snapshot.py
+++ b/synapse/events/snapshot.py
@@ -25,7 +25,9 @@ class EventContext(object):
             The current state map excluding the current event.
             (type, state_key) -> event_id
 
-        state_group (int): state group id
+        state_group (int|None): state group id, if the state has been stored
+            as a state group. This is usually only None if e.g. the event is
+            an outlier.
         rejected (bool|str): A rejection reason if the event was rejected, else
             False