Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Backfill in the background if we're doing it "just because"
Browse files Browse the repository at this point in the history
Fix #15702
  • Loading branch information
MadLittleMods committed Jun 3, 2023
1 parent e0f2429 commit e49d58f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion synapse/handlers/federation.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,9 @@ async def _maybe_backfill_inner(
logger.debug(
"_maybe_backfill_inner: all backfill points are *after* current depth. Trying again with later backfill points."
)
return await self._maybe_backfill_inner(
run_as_background_process(
"_maybe_backfill_inner_anyway_with_max_depth",
self._maybe_backfill_inner,
room_id=room_id,
# We use `MAX_DEPTH` so that we find all backfill points next
# time (all events are below the `MAX_DEPTH`)
Expand All @@ -321,6 +323,10 @@ async def _maybe_backfill_inner(
# overall otherwise the smaller one will throw off the results.
processing_start_time=None,
)
# We return `False` because we're backfilling but doing it in the background
# and is just a best effort attempt for eventual consistency's sake. The
# return value of this function isn't used for anything yet anyway.
return False

# Even after recursing with `MAX_DEPTH`, we didn't find any
# backward extremities to backfill from.
Expand Down

0 comments on commit e49d58f

Please sign in to comment.