Skip to content
This repository has been archived by the owner on May 19, 2021. It is now read-only.

Prevent fragment links corrupting when filling a gap and server returns duplicate events #40

Merged
merged 2 commits into from
Mar 30, 2020

Conversation

bwindels
Copy link
Owner

@bwindels bwindels commented Mar 28, 2020

ignore duplicate events from synapse instead considering them an
overlapping event with the adjacent fragment

Fixes #39
Fixes #15

  • if the fragment is already linked up in the direction we're filling, look up the first event id we should encounter when filling overlaps with the adjacent fragment.
  • when looking for overlapping events, check if the event is the event id expected when overlapping. If not, it means we've hit Synapse returned event in backfill that was already returned during sync matrix-org/synapse#7164 and we ignore the event as it is already present in the timeline elsewhere, and find the next overlapping id in the remaining events. Repeat this until either finding the expected overlapping event id or we've gone through all the events in the backfill.
  • don't add fragments to the FragmentIdComparer until the transaction has been comitted. This is another case of modify-memory-state-before-commit.

…ing in dupe events

Also extra robustness while filling a gap

ignore duplicate events from synapse instead considering them an
overlapping event with the adjacent fragment
@bwindels bwindels marked this pull request as ready for review March 30, 2020 18:47
@bwindels bwindels merged commit 53f2a58 into master Mar 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

~20 messages missing from backscroll while back-paginating Filling a gap lost link between fragments
1 participant