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

Initial syncs being cached means you can get an outdated view of account data #15162

Open
reivilibre opened this issue Feb 27, 2023 · 0 comments
Labels
A-Sync defects related to /sync O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Minor Blocks non-critical functionality, workarounds exist. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues.

Comments

@reivilibre
Copy link
Contributor

There are two problems with this:

  • (1) it possibly betrays client expectations, that doing an initial sync will get them to 'correct' state immediately.
  • (2) it means we don't apply the correct set of ignored users to the events received in the timeline of the initial sync. (For context: the server hides events sent by ignored users, when sending events to the client.)

This issue is causing element-hq/element-ios#7387 — we could tell them to just do a zero-timeout incremental sync immediately but that feels like a hack and it wouldn't solve (2).

For (2), I wonder if we can just fetch the latest account data stream ID for the ignored users list, when doing an initial sync, and embedding it into the sync response cache token.
That way, the sync response cache entry will automatically be invalidated when the account data changes.

It's not a perfect solution since it only helps with ignored users, but it at least solves (2).
Problem (1) might be solvable through better documentation about the fact that clients should always incrementally sync after an initial sync if they want to guarantee they have the freshest data. Sliding sync might obviate these concerns anyway.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Sync defects related to /sync O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Minor Blocks non-critical functionality, workarounds exist. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues.
Projects
None yet
Development

No branches or pull requests

1 participant