yorkie-js-sdk
yorkie-js-sdk copied to clipboard
Error `document not attached` occurs when Detach and Sync race
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:
- Operating system:
- Browser and version:
- Yorkie version (use
yorkie version): - Yorkie JS SDK version:
I'm interested in this issue. Can I give it a shot?
Sure :)
@jeonghye-choi I've unassigned you from this issue to allow others to contribute. If you're still interested in it, please let me know.
@gwbaik9717 Hi. Are you still working on this issue yourself? If not, we'd like to unassign so that other contributors can work on it.
Oh sure! Ive been busy working on other stuff.. Feel free to do so :)
I'm interested in this issue, but is it still unresolved? I'm trying to reproduce the problem, but it's not easy. While I was typing in the document to reproduce the push-pull situation in a deactivated state, I hit the back button and noticed that instead of a "document not attached" error, I got a "client not activated" error. If this is an unresolved issue, could you tell me how to reproduce it?