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.
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):
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.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:
yorkie version
):