diff --git a/synapse/storage/databases/state/store.py b/synapse/storage/databases/state/store.py index d09419b218..356f79090c 100644 --- a/synapse/storage/databases/state/store.py +++ b/synapse/storage/databases/state/store.py @@ -335,8 +335,6 @@ class StateGroupDataStore(StateBackgroundUpdateStore, SQLBaseStore): ) AND (type = ? AND state_key = ?) ORDER BY - type, - state_key, -- Use the lastest state in the chain (highest numbered state_group in the chain) state_group DESC LIMIT 1