summary refs log tree commit diff
path: root/synapse/replication
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2020-09-29 21:48:33 +0100
committerGitHub <noreply@github.com>2020-09-29 21:48:33 +0100
commitea70f1c362dc4bd6c0f8a67e16ed0971fe095e5b (patch)
tree83a37ad1ffa3e1432dc4ca281a0cfec5ed600445 /synapse/replication
parentUpdate description of server_name config option (#8415) (diff)
downloadsynapse-ea70f1c362dc4bd6c0f8a67e16ed0971fe095e5b.tar.xz
Various clean ups to room stream tokens. (#8423)
Diffstat (limited to 'synapse/replication')
-rw-r--r--synapse/replication/tcp/client.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/synapse/replication/tcp/client.py b/synapse/replication/tcp/client.py
index 55af3d41ea..e165429cad 100644
--- a/synapse/replication/tcp/client.py
+++ b/synapse/replication/tcp/client.py
@@ -29,7 +29,7 @@ from synapse.replication.tcp.streams.events import (
     EventsStreamEventRow,
     EventsStreamRow,
 )
-from synapse.types import PersistedEventPosition, RoomStreamToken, UserID
+from synapse.types import PersistedEventPosition, UserID
 from synapse.util.async_helpers import timeout_deferred
 from synapse.util.metrics import Measure
 
@@ -152,9 +152,7 @@ class ReplicationDataHandler:
                 if event.type == EventTypes.Member:
                     extra_users = (UserID.from_string(event.state_key),)
 
-                max_token = RoomStreamToken(
-                    None, self.store.get_room_max_stream_ordering()
-                )
+                max_token = self.store.get_room_max_token()
                 event_pos = PersistedEventPosition(instance_name, token)
                 self.notifier.on_new_room_event(
                     event, event_pos, max_token, extra_users