From 9fef1186856797f2f5c101c390c69679e749625f Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Thu, 13 Aug 2026 14:54:16 +0100 Subject: [PATCH] Comment that fields_behind is equiv to is_before_or_eq --- synapse/notifier.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/synapse/notifier.py b/synapse/notifier.py index 8811be1a07..ec391f2ef7 100644 --- a/synapse/notifier.py +++ b/synapse/notifier.py @@ -903,6 +903,9 @@ class Notifier: start = self.clock.time_msec() logged = False while True: + # Check if we are caught up to the stream token, if so return early. + # Equivalent to `is_before_or_eq`, except we can get the lagging + # stream keys for logging. current_token = self.event_sources.get_current_token() lagging_stream_keys = stream_token.fields_behind(current_token) if not lagging_stream_keys: