fix: Record device list changes before syncs can read their count #2443
No reviewers
Labels
No labels
Abandoned
Blocked
Bug
Changelog
Added
Changelog
Missing
Changelog
None
Cherry-picking
Database
Dependencies
Dependencies/Renovate
Difficulty
Easy
Difficulty
Hard
Difficulty
Medium
Documentation
Enhancement
Good first issue
Help wanted
Inherited
Matrix/Administration
Matrix/Appservices
Matrix/Auth
Matrix/Client
Matrix/Core
Matrix/E2EE
Matrix/Federation
Matrix/Hydra
Matrix/MSC
Matrix/Media
Matrix/T&S
Merge
Merge/Manual
Merge/Squash
Meta
Meta/CI
Meta/Packaging
Priority
Blocking
Priority
High
Priority
Low
Security
Status
Confirmed
Status
Duplicate
Status
Invalid
Status
Needs Investigation
Support
bob the builder
No milestone
No assignees
4 participants
Notifications
Due date
No due date set.
Blocks
#2455 fix: Store to-device messages before syncs can read their count
continuwuation/continuwuity
Reference
continuwuation/continuwuity!2443
Loading…
Reference in a new issue
No description provided.
Delete branch "eleboucher/continuwuity:fix/device-list-count-race"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
mark_device_key_update took a count before writing its device-list markers, so a sync that read that count in between skipped the change for good and the new device never reached other users. The markers are now written while the counter lock is held, and in a reproduction under load the misses went from 2–7 per 1000 new devices to 0.
Pull request checklist:
mainbranch, and the branch is named something other thanmain.myself, if applicable. This includes ensuring code compiles.
eacd1c45e199daa74f85(light review)