diff options
author | Mark Haines <mjark@negativecurvature.net> | 2016-04-07 16:49:34 +0100 |
---|---|---|
committer | Mark Haines <mjark@negativecurvature.net> | 2016-04-07 16:49:34 +0100 |
commit | 8c82b06904d50c3f0a916daa87f3995fc8070ce8 (patch) | |
tree | fa386f2579fc9b666cdf75b4089e084454986e11 /synapse/replication/slave | |
parent | Merge pull request #700 from matrix-org/erikj/deduplicate_joins (diff) | |
parent | Add sensible __eq__ operators inside the tests. (diff) | |
download | synapse-8c82b06904d50c3f0a916daa87f3995fc8070ce8.tar.xz |
Merge pull request #704 from matrix-org/markh/slaveIII
Add tests for get_latest_event_ids_in_room and get_current_state
Diffstat (limited to 'synapse/replication/slave')
-rw-r--r-- | synapse/replication/slave/storage/events.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/synapse/replication/slave/storage/events.py b/synapse/replication/slave/storage/events.py index 680dc89536..707ddd248a 100644 --- a/synapse/replication/slave/storage/events.py +++ b/synapse/replication/slave/storage/events.py @@ -89,8 +89,11 @@ class SlavedEventStore(BaseSlavedStore): _invalidate_get_event_cache = DataStore._invalidate_get_event_cache.__func__ _parse_events_txn = DataStore._parse_events_txn.__func__ _get_events_txn = DataStore._get_events_txn.__func__ + _enqueue_events = DataStore._enqueue_events.__func__ + _do_fetch = DataStore._do_fetch.__func__ _fetch_events_txn = DataStore._fetch_events_txn.__func__ _fetch_event_rows = DataStore._fetch_event_rows.__func__ + _get_event_from_row = DataStore._get_event_from_row.__func__ _get_event_from_row_txn = DataStore._get_event_from_row_txn.__func__ _get_rooms_for_user_where_membership_is_txn = ( DataStore._get_rooms_for_user_where_membership_is_txn.__func__ @@ -158,6 +161,8 @@ class SlavedEventStore(BaseSlavedStore): self._invalidate_get_event_cache(event.event_id) + self.get_latest_event_ids_in_room.invalidate((event.room_id,)) + if not backfilled: self._events_stream_cache.entity_has_changed( event.room_id, event.internal_metadata.stream_ordering |