Skip to content

Error document not attached occurs when Detach and Sync race #856

@chacha912

Description

@chacha912

What happened:

Error document not attached occurs when going backwards in codepair.
This error occurs due to a race condition between Detach and Sync requests.
Since a sync loop is performed independently of a detach, the client may send a sync request while the document is still considered attached before receiving a response to the detach request. This causes an error on the server because it has already processed the detach request and considers the document detached.

image

What you expected to happen:

The Detach and Sync requests should not race to avoid the document not attached error.

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

Environment:

  • Operating system:
  • Browser and version:
  • Yorkie version (use yorkie version):
  • Yorkie JS SDK version:

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🐞Something isn't working

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions