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

Better handle invalid events when backfilling #8451

Closed
erikjohnston opened this issue Oct 2, 2020 · 0 comments · Fixed by #13635
Closed

Better handle invalid events when backfilling #8451

erikjohnston opened this issue Oct 2, 2020 · 0 comments · Fixed by #13635
Labels
A-Federation A-Messages-Endpoint /messages client API endpoint (`RoomMessageListRestServlet`) (which also triggers /backfill) S-Tolerable Minor significance, cosmetic issues, low or no impact to users. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues.

Comments

@erikjohnston
Copy link
Member

If we drop an event (or otherwise end up with a gap) when processing a response to a /backfill request we'll subsequently try always try and /backfill at the gap whenever a client paginates past this point. This is a bit sucky and slows things down a lot.

Potential solutions include:

  • try to backfill a few times and then mark that backwards extremity such that we don't try again
  • for v2 rooms and above we could process just the prev_events, for example if we have events C -> B -> A, where B is a dodgy event, then we can still note that B fills a gap between C and A and so there is no longer a gap there. (This is safe due to event ID as hashes)
@erikjohnston erikjohnston added S-Tolerable Minor significance, cosmetic issues, low or no impact to users. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues. labels Oct 29, 2021
@MadLittleMods MadLittleMods added the A-Messages-Endpoint /messages client API endpoint (`RoomMessageListRestServlet`) (which also triggers /backfill) label Aug 25, 2022
MadLittleMods added a commit that referenced this issue Sep 23, 2022
Only try to backfill event if we haven't tried before recently (exponential backoff). No need to keep trying the same backfill point that fails over and over.

Fix #13622
Fix #8451

Follow-up to #13589

Part of #13356
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) S-Tolerable Minor significance, cosmetic issues, low or no impact to users. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues.
Projects
None yet
2 participants