diff --git a/synapse/replication/tcp/streams/_base.py b/synapse/replication/tcp/streams/_base.py index a73f767add..2969719597 100644 --- a/synapse/replication/tcp/streams/_base.py +++ b/synapse/replication/tcp/streams/_base.py @@ -26,6 +26,7 @@ from typing import ( Any, Awaitable, Callable, + NewType, TypeVar, ) @@ -765,6 +766,13 @@ class ThreadSubscriptionsStream(_StreamFromIdGen): return rows, rows[-1][0], len(updates) == limit +StickyEventStreamPosition = NewType("StickyEventStreamPosition", int) +""" +Integer corresponding to the stream position (`stream_id`) +of a sticky event in the `sticky_events` table. +""" + + @attr.s(slots=True, auto_attribs=True) class StickyEventsStreamRow: """Stream to inform workers about changes to sticky events."""