diff options
author | Erik Johnston <erikj@jki.re> | 2016-09-07 09:39:58 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-07 09:39:58 +0100 |
commit | 94a83b534f0c482a4faa6f33433126615f14401a (patch) | |
tree | fd9f61ff3907fba599d387b5b70c5b6ec16ce9c6 /synapse/events | |
parent | Merge pull request #1073 from matrix-org/erikj/presence_fiddle (diff) | |
parent | Scale the batch size so that we're not bitten by the minimum (diff) | |
download | synapse-94a83b534f0c482a4faa6f33433126615f14401a.tar.xz |
Merge pull request #1065 from matrix-org/erikj/state_storage
Move to storing state_groups_state as deltas
Diffstat (limited to 'synapse/events')
-rw-r--r-- | synapse/events/snapshot.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/synapse/events/snapshot.py b/synapse/events/snapshot.py index e895b1c450..11605b34a3 100644 --- a/synapse/events/snapshot.py +++ b/synapse/events/snapshot.py @@ -15,9 +15,30 @@ class EventContext(object): + __slots__ = [ + "current_state_ids", + "prev_state_ids", + "state_group", + "rejected", + "push_actions", + "prev_group", + "delta_ids", + "prev_state_events", + ] + def __init__(self): + # The current state including the current event self.current_state_ids = None + # The current state excluding the current event self.prev_state_ids = None self.state_group = None + self.rejected = False self.push_actions = [] + + # A previously persisted state group and a delta between that + # and this state. + self.prev_group = None + self.delta_ids = None + + self.prev_state_events = None |