diff options
author | Erik Johnston <erikj@jki.re> | 2018-10-25 17:49:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-25 17:49:55 +0100 |
commit | cb53ce9d6429252d5ee012f5a476cc834251c27d (patch) | |
tree | 90be05442144fa134496da612e850855e2c84b18 /synapse/storage/events.py | |
parent | Merge remote-tracking branch 'origin/master' into develop (diff) | |
download | synapse-cb53ce9d6429252d5ee012f5a476cc834251c27d.tar.xz |
Refactor state group lookup to reduce DB hits (#4011)
Currently when fetching state groups from the data store we make two hits two the database: once for members and once for non-members (unless request is filtered to one or the other). This adds needless load to the datbase, so this PR refactors the lookup to make only a single database hit.
Diffstat (limited to 'synapse/storage/events.py')
-rw-r--r-- | synapse/storage/events.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/storage/events.py b/synapse/storage/events.py index c780f55277..8881b009df 100644 --- a/synapse/storage/events.py +++ b/synapse/storage/events.py @@ -2089,7 +2089,7 @@ class EventsStore(EventFederationStore, EventsWorkerStore, BackgroundUpdateStore for sg in remaining_state_groups: logger.info("[purge] de-delta-ing remaining state group %s", sg) curr_state = self._get_state_groups_from_groups_txn( - txn, [sg], types=None + txn, [sg], ) curr_state = curr_state[sg] |