summary refs log tree commit diff
path: root/synapse/storage/state.py
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2019-07-22 10:19:16 +0100
committerAndrew Morgan <andrew@amorgan.xyz>2019-07-22 10:19:16 +0100
commitfdd182870c6eddacf314f9526aadbb153786c263 (patch)
tree6f76d293aa8c6ed884f13658c2b6680eb83158b1 /synapse/storage/state.py
parentMerge branch 'release-v1.2.0' into matrix-org-hotfixes (diff)
parentRevert "Remove deprecated 'verbose' cli arg" (diff)
downloadsynapse-fdd182870c6eddacf314f9526aadbb153786c263.tar.xz
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
Diffstat (limited to 'synapse/storage/state.py')
-rw-r--r--synapse/storage/state.py8
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,)