diff options
author | Erik Johnston <erik@matrix.org> | 2015-08-21 14:30:34 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2015-08-21 14:30:34 +0100 |
commit | 1bd1a43073f2b1f657f4c9a5bab8326c1aa19c53 (patch) | |
tree | b6a99363a8f2b27453b54b525584dd2212809091 /synapse/storage/state.py | |
parent | Upate changelog (diff) | |
download | synapse-1bd1a43073f2b1f657f4c9a5bab8326c1aa19c53.tar.xz |
Actually check if event_id isn't returned by _get_state_groups
Diffstat (limited to 'synapse/storage/state.py')
-rw-r--r-- | synapse/storage/state.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/synapse/storage/state.py b/synapse/storage/state.py index c9110e6304..9630efcfcc 100644 --- a/synapse/storage/state.py +++ b/synapse/storage/state.py @@ -403,8 +403,15 @@ class StateStore(SQLBaseStore): state_dict = results[group] for event_id in state_ids: - state_event = state_events[event_id] - state_dict[(state_event.type, state_event.state_key)] = state_event + try: + state_event = state_events[event_id] + state_dict[(state_event.type, state_event.state_key)] = state_event + except KeyError: + # Hmm. So we do don't have that state event? Interesting. + logger.warn( + "Can't find state event %r for state group %r", + event_id, group, + ) self._state_group_cache.update( cache_seq_num, |