diff options
author | Erik Johnston <erik@matrix.org> | 2016-01-27 17:06:52 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2016-01-27 17:33:27 +0000 |
commit | aca3193efb8c5f9f20049f61c96e5ff12f328b05 (patch) | |
tree | 979356ffced93dc3e672e66b4f43ae82fc4ae132 /synapse/storage | |
parent | Add cache to room stream (diff) | |
download | synapse-aca3193efb8c5f9f20049f61c96e5ff12f328b05.tar.xz |
Use the same path for incremental with gap or without gap
Diffstat (limited to '')
-rw-r--r-- | synapse/storage/events.py | 1 | ||||
-rw-r--r-- | synapse/storage/stream.py | 6 |
2 files changed, 3 insertions, 4 deletions
diff --git a/synapse/storage/events.py b/synapse/storage/events.py index d96ea3a30e..0dd1daaa2e 100644 --- a/synapse/storage/events.py +++ b/synapse/storage/events.py @@ -128,7 +128,6 @@ class EventsStore(SQLBaseStore): is_new_state=is_new_state, current_state=current_state, ) - logger.info("Invalidating %r at %r", event.room_id, stream_ordering) self._events_stream_cache.room_has_changed(None, event.room_id, stream_ordering) except _RollbackButIsFineException: pass diff --git a/synapse/storage/stream.py b/synapse/storage/stream.py index 3a32a0019a..563e289c4e 100644 --- a/synapse/storage/stream.py +++ b/synapse/storage/stream.py @@ -179,7 +179,7 @@ class StreamStore(SQLBaseStore): room_ids = list(room_ids) for rm_ids in (room_ids[i:i+20] for i in xrange(0, len(room_ids), 20)): res = yield defer.gatherResults([ - self.get_recent_room_events_stream_for_room( + self.get_room_events_stream_for_room( room_id, from_key, to_key, limit ).addCallback(lambda r, rm: (rm, r), room_id) for room_id in room_ids @@ -189,7 +189,7 @@ class StreamStore(SQLBaseStore): defer.returnValue(results) @defer.inlineCallbacks - def get_recent_room_events_stream_for_room(self, room_id, from_key, to_key, limit=0): + def get_room_events_stream_for_room(self, room_id, from_key, to_key, limit=0): if from_key is not None: from_id = RoomStreamToken.parse_stream_token(from_key).stream else: @@ -246,7 +246,7 @@ class StreamStore(SQLBaseStore): key = from_key return ret, key - res = yield self.runInteraction("get_recent_room_events_stream_for_room", f) + res = yield self.runInteraction("get_room_events_stream_for_room", f) defer.returnValue(res) def get_room_changes_for_user(self, user_id, from_key, to_key): |