diff options
author | Hubert Chathi <hubert@uhoreg.ca> | 2019-07-19 17:13:22 -0400 |
---|---|---|
committer | Hubert Chathi <hubert@uhoreg.ca> | 2019-07-19 17:14:40 -0400 |
commit | 0a8d70eff292bb9f08d082d718f1cd77906ed685 (patch) | |
tree | 56c2b61a6084e93d3f148b33c7967b8bcdc93e77 /synapse/storage/state.py | |
parent | make hidden field nullable (diff) | |
parent | Revert "Remove deprecated 'verbose' cli arg" (diff) | |
download | synapse-0a8d70eff292bb9f08d082d718f1cd77906ed685.tar.xz |
Merge branch 'develop' into cross-signing
Diffstat (limited to 'synapse/storage/state.py')
-rw-r--r-- | synapse/storage/state.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/synapse/storage/state.py b/synapse/storage/state.py index 0bfe1b4550..a35289876d 100644 --- a/synapse/storage/state.py +++ b/synapse/storage/state.py @@ -510,6 +510,12 @@ class StateGroupWorkerStore(EventsWorkerStore, SQLBaseStore): event ID. """ + where_clause, where_args = state_filter.make_sql_filter_clause() + + if not where_clause: + # We delegate to the cached version + return self.get_current_state_ids(room_id) + def _get_filtered_current_state_ids_txn(txn): results = {} sql = """ @@ -517,8 +523,6 @@ class StateGroupWorkerStore(EventsWorkerStore, SQLBaseStore): WHERE room_id = ? """ - where_clause, where_args = state_filter.make_sql_filter_clause() - if where_clause: sql += " AND (%s)" % (where_clause,) |