From 0e3e947bd644df5ce6a6af35f4b63ba3dfaaa26b Mon Sep 17 00:00:00 2001 From: Eric Eastwood Date: Fri, 10 Apr 2026 13:58:30 -0500 Subject: [PATCH] Fix docstring for `limit` argument in `_maybe_backfill_inner(...)` (#19630) Incorrectly labeled in https://github.com/matrix-org/synapse/pull/13535. `maybe_backfill` already accurately describes `limit` (introduced in https://github.com/matrix-org/synapse/pull/8349) Spotted in https://github.com/element-hq/synapse/pull/19611#discussion_r3011259710 --- changelog.d/19630.misc | 1 + synapse/handlers/federation.py | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 changelog.d/19630.misc diff --git a/changelog.d/19630.misc b/changelog.d/19630.misc new file mode 100644 index 0000000000..3d2b787f5f --- /dev/null +++ b/changelog.d/19630.misc @@ -0,0 +1 @@ +Fix docstring for `limit` argument in `_maybe_backfill_inner(...)`. diff --git a/synapse/handlers/federation.py b/synapse/handlers/federation.py index 14805ac80f..ffff89c29c 100644 --- a/synapse/handlers/federation.py +++ b/synapse/handlers/federation.py @@ -242,7 +242,9 @@ class FederationHandler: Args: room_id: The room to backfill in. current_depth: The depth to check at for any upcoming backfill points. - limit: The max number of events to request from the remote federated server. + limit: The number of events that the pagination request will + return. This is used as part of the heuristic to decide if we + should back paginate. processing_start_time: The time when `maybe_backfill` started processing. Only used for timing. If `None`, no timing observation will be made.