summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2017-04-07 13:47:04 +0100
committerErik Johnston <erik@matrix.org>2017-04-07 13:47:04 +0100
commit2a3e822f4494e42c1b118c2fa0132b3a2f13bbfb (patch)
tree645d3af09d61b013ec44fbd9e6c8682fb0fd2722 /synapse
parentSpeed up get_current_state_ids (diff)
downloadsynapse-2a3e822f4494e42c1b118c2fa0132b3a2f13bbfb.tar.xz
Comment
Diffstat (limited to 'synapse')
-rw-r--r--synapse/storage/state.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/synapse/storage/state.py b/synapse/storage/state.py

index 86e5fdb76b..acd69944c4 100644 --- a/synapse/storage/state.py +++ b/synapse/storage/state.py
@@ -71,6 +71,15 @@ class StateStore(SQLBaseStore): @cached(max_entries=100000, iterable=True) def get_current_state_ids(self, room_id): + """Get the current state event ids for a room based on the + current_state_events table. + + Args: + room_id (str) + + Returns: + deferred: dict of (type, state_key) -> event_id + """ def _get_current_state_ids_txn(txn): txn.execute( """SELECT type, state_key, event_id FROM current_state_events