diff options
author | Erik Johnston <erik@matrix.org> | 2020-09-29 21:48:33 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-29 21:48:33 +0100 |
commit | ea70f1c362dc4bd6c0f8a67e16ed0971fe095e5b (patch) | |
tree | 83a37ad1ffa3e1432dc4ca281a0cfec5ed600445 /synapse/storage/persist_events.py | |
parent | Update description of server_name config option (#8415) (diff) | |
download | synapse-ea70f1c362dc4bd6c0f8a67e16ed0971fe095e5b.tar.xz |
Various clean ups to room stream tokens. (#8423)
Diffstat (limited to 'synapse/storage/persist_events.py')
-rw-r--r-- | synapse/storage/persist_events.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/synapse/storage/persist_events.py b/synapse/storage/persist_events.py index ded6cf9655..72939f3984 100644 --- a/synapse/storage/persist_events.py +++ b/synapse/storage/persist_events.py @@ -229,7 +229,7 @@ class EventsPersistenceStorage: defer.gatherResults(deferreds, consumeErrors=True) ) - return RoomStreamToken(None, self.main_store.get_current_events_token()) + return self.main_store.get_room_max_token() async def persist_event( self, event: EventBase, context: EventContext, backfilled: bool = False @@ -247,11 +247,10 @@ class EventsPersistenceStorage: await make_deferred_yieldable(deferred) - max_persisted_id = self.main_store.get_current_events_token() event_stream_id = event.internal_metadata.stream_ordering pos = PersistedEventPosition(self._instance_name, event_stream_id) - return pos, RoomStreamToken(None, max_persisted_id) + return pos, self.main_store.get_room_max_token() def _maybe_start_persisting(self, room_id: str): async def persisting_queue(item): |