This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
Backfill in the background if we're doing it "just because" #15702
Labels
A-Federation
A-Messages-Endpoint
/messages client API endpoint (`RoomMessageListRestServlet`) (which also triggers /backfill)
A-Performance
Performance, both client-facing and admin-facing
O-Occasional
Affects or can be seen by some users regularly or most users rarely
S-Minor
Blocks non-critical functionality, workarounds exist.
T-Enhancement
New features, changes in functionality, improvements in performance, or user-facing enhancements.
Milestone
With Synapse currently, if you're paginating in a section of timeline back in time without any backward extremities, Synapse will still try to backfill any backward extremities that come later in the room (where you're not even viewing). This is fine from a eventual consistency perspective but is unlikely that the extra
/backfill
will reveal any new messages to return in the/messages
request that triggered it in the first place.Instead of doing this in the foreground which causes unnecessary delay for the user, we can just do this in the background.
synapse/synapse/handlers/federation.py
Lines 306 to 312 in 874378c
I completely acknowledge that a backward extremity later in the DAG, could connect to an unknown branch in the DAG that has events at the
depth
we're scrolling through but how likely is this to happen? This would be an interesting metric to track (how many events from/backfill
actually end up in/messages
)The text was updated successfully, but these errors were encountered: