Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sliding sync pollers should use set_presence=offline when requesting oldschool /sync #217

Closed
reivilibre opened this issue Jul 24, 2023 · 1 comment · Fixed by #290
Closed
Assignees
Labels

Comments

@reivilibre
Copy link

reivilibre commented Jul 24, 2023

/sync currently bumps the user's presence timeout. Since SS pollers are active even when the device is offline, this is undesired as the users will be marked as online when they are not. Further, this causes a bit more load on Synapse and also as a consequence causes other sync loop within Synapse to wake up to emit this unwanted presence data to other users who may be syncing.

I suspect this may be contributing to the high CPU usage reported at matrix-org/synapse#15980.

(or, with extra involved effort: find some way to pass the right state through from the client)

Related code:

func (v *HTTPClient) DoSyncV2(ctx context.Context, accessToken, since string, isFirst, toDeviceOnly bool) (*SyncResponse, int, error) {
func (v *HTTPClient) createSyncURL(since string, isFirst, toDeviceOnly bool) string {

@DMRobertson
Copy link
Contributor

DMRobertson commented Aug 1, 2023

What we really want is a way to express "don't alter presence based on this /sync call". It seems like set_presence=offline does this for Synapse, but not for Dendrite. The spec is ambiguous. See matrix-org/matrix-spec#1609.

I don't have any strong opinions about what the right thing to do is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants