This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
Pro-actively backfill rooms with backward extremities #15652
Labels
A-Federation
A-Messages-Endpoint
/messages client API endpoint (`RoomMessageListRestServlet`) (which also triggers /backfill)
T-Enhancement
New features, changes in functionality, improvements in performance, or user-facing enhancements.
Milestone
Background
Currently, we only backfill when we receive a
/messages?dir=b
request which means any time you want a message and we don't already have it or there is a gap at the time you're paginating over, you have to wait for the/backfill
request in the background before we can finally respond to your initial/messages
request.If we instead first attempt to backfill outstanding backward extremities before a
/messages
request comes in, we will either have the event in the best case, or recorded someevent_failed_pull_attempts
and we already be ready to backoff and skip the same event when we try to paginate around it later.Ideally, we would be able to backfill more than real-time for all of the rooms and eventually catch up with everything possible to retrieve.
Also relates to Synapse trying to make a Matrix room eventually consistent on its own.
Potential solution
Have a regular background job that picks up recently visited rooms with backward extremity and attempts to backfill those positions.
The text was updated successfully, but these errors were encountered: