diff options
author | Erik Johnston <erikj@jki.re> | 2018-07-24 09:57:05 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-24 09:57:05 +0100 |
commit | 536bc63a4e6833be9c8700f4382949238f8a4bf4 (patch) | |
tree | 5f804ee05b6472691cd12c5cb51d56453d5a367a /synapse/storage/events.py | |
parent | Merge branch 'develop' of github.com:matrix-org/synapse into erikj/client_api... (diff) | |
parent | Merge pull request #3584 from matrix-org/erikj/use_cached (diff) | |
download | synapse-536bc63a4e6833be9c8700f4382949238f8a4bf4.tar.xz |
Merge branch 'develop' into erikj/client_apis_move
Diffstat (limited to 'synapse/storage/events.py')
-rw-r--r-- | synapse/storage/events.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/synapse/storage/events.py b/synapse/storage/events.py index 4ff0fdc4ab..c2910094d0 100644 --- a/synapse/storage/events.py +++ b/synapse/storage/events.py @@ -549,7 +549,12 @@ class EventsStore(EventsWorkerStore): if ctx.state_group in state_groups_map: continue - state_groups_map[ctx.state_group] = ctx.current_state_ids + # We're only interested in pulling out state that has already + # been cached in the context. We'll pull stuff out of the DB later + # if necessary. + current_state_ids = ctx.get_cached_current_state_ids() + if current_state_ids is not None: + state_groups_map[ctx.state_group] = current_state_ids # We need to map the event_ids to their state groups. First, let's # check if the event is one we're persisting, in which case we can |