summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-08-31 14:58:11 +0100
committerErik Johnston <erik@matrix.org>2016-08-31 14:58:11 +0100
commitf51888530d25f4b4e4d40b337ee65bbace8c7d69 (patch)
treecbf8830bbdbea594870c618fcc2afe6d787f4a43
parentAdd storage function to SlaveStore (diff)
downloadsynapse-f51888530d25f4b4e4d40b337ee65bbace8c7d69.tar.xz
Always specify state_group so that its in the cache
-rw-r--r--synapse/state.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/synapse/state.py b/synapse/state.py
index a0f807e3b9..4d48cc4605 100644
--- a/synapse/state.py
+++ b/synapse/state.py
@@ -302,6 +302,8 @@ class StateHandler(object):
             if new_state_event_ids == frozenset(e_id for e_id in events):
                 state_group = sg
                 break
+        if not state_group:
+            state_group = self.store.get_next_state_group()
 
         if self._state_cache is not None:
             cache = _StateCacheEntry(