summary refs log tree commit diff
path: root/synapse/storage
diff options
context:
space:
mode:
authorErik Johnston <erikj@jki.re>2018-02-15 14:09:42 +0000
committerGitHub <noreply@github.com>2018-02-15 14:09:42 +0000
commit6ed9ff69c23923b1b69f609a56991974bfb1cf4c (patch)
tree4a96b7e56243b2f695a84a44e27a7f146c119468 /synapse/storage
parentMerge pull request #2872 from matrix-org/erikj/event_worker_dont_log (diff)
parentDon't serialize current state over replication (diff)
downloadsynapse-6ed9ff69c23923b1b69f609a56991974bfb1cf4c.tar.xz
Merge pull request #2873 from matrix-org/erikj/event_creator_no_state
Don't serialize current state over replication
Diffstat (limited to 'synapse/storage')
-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