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

Unnecessary device_lists.changed entry in /sync after fetching device list #13783

Open
squahtx opened this issue Sep 12, 2022 · 1 comment
Open
Labels
A-Device-List-Tracking Telling clients about other devices. Often related to E2EE. A-Sync defects related to /sync O-Occasional Affects or can be seen by some users regularly or most users rarely S-Tolerable Minor significance, cosmetic issues, low or no impact to users. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues.

Comments

@squahtx
Copy link
Contributor

squahtx commented Sep 12, 2022

While writing matrix-org/complement#459, it was noticed that Synapse would sometimes emit an unnecessary device_lists.changed entry in the next sync after retrieving the device list for a remote user.

While it doesn't contravene the spirit of the spec, it's inefficient as well-behaved clients will ask the homeserver for device keys a second time.

@squahtx squahtx added A-Device-List-Tracking Telling clients about other devices. Often related to E2EE. A-Sync defects related to /sync S-Tolerable Minor significance, cosmetic issues, low or no impact to users. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues. O-Occasional Affects or can be seen by some users regularly or most users rarely labels Sep 12, 2022
@squahtx
Copy link
Contributor Author

squahtx commented Sep 16, 2022

This is causing complement flakes in worker mode: https://github.com/matrix-org/synapse/actions/runs/3061347613/jobs/4941055119

In the device list tests, we wait for device_lists.changed to come down /sync before querying keys. However, in worker mode, we sometimes pick up the spurious device_lists.changed entry instead and query keys too soon.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Device-List-Tracking Telling clients about other devices. Often related to E2EE. A-Sync defects related to /sync O-Occasional Affects or can be seen by some users regularly or most users rarely 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
Development

No branches or pull requests

1 participant