Don't serialize current state over replication

This commit is contained in:
Erik Johnston 2018-02-15 13:53:18 +00:00
parent 5fb347fc41
commit 106906a65e
3 changed files with 51 additions and 8 deletions

View file

@ -139,6 +139,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