diff options
author | Erik Johnston <erik@matrix.org> | 2017-04-07 13:47:04 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2017-04-07 13:47:04 +0100 |
commit | 2a3e822f4494e42c1b118c2fa0132b3a2f13bbfb (patch) | |
tree | 645d3af09d61b013ec44fbd9e6c8682fb0fd2722 /synapse/storage/state.py | |
parent | Speed up get_current_state_ids (diff) | |
download | synapse-2a3e822f4494e42c1b118c2fa0132b3a2f13bbfb.tar.xz |
Comment
Diffstat (limited to 'synapse/storage/state.py')
-rw-r--r-- | synapse/storage/state.py | 9 |
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 |