summary refs log tree commit diff
path: root/synapse/storage/state.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2018-02-15 13:53:18 +0000
committerErik Johnston <erik@matrix.org>2018-02-15 13:53:18 +0000
commit106906a65e647d94a9d2faf1b3a626bc1f608a25 (patch)
tree4a96b7e56243b2f695a84a44e27a7f146c119468 /synapse/storage/state.py
parentMerge pull request #2872 from matrix-org/erikj/event_worker_dont_log (diff)
downloadsynapse-106906a65e647d94a9d2faf1b3a626bc1f608a25.tar.xz
Don't serialize current state over replication
Diffstat (limited to '')
-rw-r--r--synapse/storage/state.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/synapse/storage/state.py b/synapse/storage/state.py
index d0a840456a..2b325e1c1f 100644
--- a/synapse/storage/state.py
+++ b/synapse/storage/state.py
@@ -140,6 +140,20 @@ class StateGroupWorkerStore(SQLBaseStore):
         defer.returnValue(group_to_state)
 
     @defer.inlineCallbacks
+    def get_state_ids_for_group(self, state_group):
+        """Get the state IDs for the given state group
+
+        Args:
+            state_group (int)
+
+        Returns:
+            Deferred[dict]: Resolves to a map of (type, state_key) -> event_id
+        """
+        group_to_state = yield self._get_state_for_groups((state_group,))
+
+        defer.returnValue(group_to_state[state_group])
+
+    @defer.inlineCallbacks
     def get_state_groups(self, room_id, event_ids):
         """ Get the state groups for the given list of event_ids