Skip to content
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

Closed
MadLittleMods opened this issue May 23, 2023 · 1 comment
Closed

Pro-actively backfill rooms with backward extremities #15652

MadLittleMods opened this issue May 23, 2023 · 1 comment
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.

Comments

@MadLittleMods
Copy link
Contributor

MadLittleMods commented May 23, 2023

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 some event_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.

@MadLittleMods MadLittleMods added A-Federation T-Enhancement New features, changes in functionality, improvements in performance, or user-facing enhancements. A-Messages-Endpoint /messages client API endpoint (`RoomMessageListRestServlet`) (which also triggers /backfill) labels May 23, 2023
@MadLittleMods
Copy link
Contributor Author

Closing in favor of #13576

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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.
Projects
None yet
Development

No branches or pull requests

1 participant