bug: /v3/sync does not appropriately throttle presence changes #828
Labels
No labels
Bug
Cherry-picking
Database
Dependencies
Documentation
Enhancement
Good first issue
Help wanted
Inherited
Matrix/Administration
Matrix/Appservices
Matrix/Auth
Matrix/Client
Matrix/Core
Matrix/Federation
Matrix/MSC
Matrix/Media
Meta
Meta/Packaging
Priority
Blocking
Priority
High
Priority
Low
Security
Status
Confirmed
Status
Duplicate
Status
Invalid
Status
Needs Investigation
Wont fix
old/ci/cd
old/rust
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: continuwuation/continuwuity#828
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
In v3.rs, calling /v3/sync will only prevent new presence updates from being broadcast if the presence status remains unchanged.
hitting
/v3/sync
calls this code, which consequently callsping_presence
.Pinging presence only prevents an immediate update if the existing presence is the same as the new one.
This if statement does not apply, meaning that the new presence is sent immediately, which may result in (at best) flickering presence, or even (at worse) presence storm.
The solution here would likely be to buffer presence changes and apply the same timeout period regardless, or simply drop changes that are too quick, or even just not federate them.
The original intent was to just eat any updates within the "minimum update period" (seems like 60s, REFRESH_TIMEOUT) that did not change the status or presence value. If the logic on squelching is messed up, addressing that would be faster than a cache.