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

Sync tightloop due to presence #5503

Closed
Closed

Description

@erikjohnston

Occasionally my /sync will tightloop, i.e. it will return immediately with a presence update, but the since token matches the next token, and so it makes no progress.

This seems to be due to:

  1. Presence handler doesn't early return if from token == current token
  2. Current token is based off the ID gen, which may not return the latest ID persisted (as ID gens don't return tokens unless all previous IDs have successfully been persisted)
  3. The stream change cache will return all results after the given token, including rows with a token greater than the current token.

The simplest solution here is probably to just early return if from token == current token. This is safe as once the persistence of pending presence updates have completed current token will increment.

Activity

  1. added a commit that references this issue on Jun 21, 2019
    8181e29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-PerformancePerformance, both client-facing and admin-facing

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions