Closed chacha912 closed 1 month ago
Here is additional information regarding this issue and potential solutions we are considering:
When the ErrClientNotActivated
error occurs, it indicates that housekeeping has taken place.
Housekeeping can occur on the server when the client loses network connection, such as when entering sleep mode. The SDK client requests watchDocument
to re-establish the watch stream and tries to sync. The server responds with ErrClientNotActivated
.
pushPullChanges
request will receive the ErrClientNotActivated
error. When the client gets the ErrClientNotActivated
error in watchDocument
or pushPullChanges
, it considers itself deactivated due to housekeeping, detaches the document, and triggers the detached event in Document.Subscribe
.
pushPullChanges
request will get the ErrClientNotActivated
response (same as A1).doc.subscribe()
:Initially, we plan to test using methods A1 and B1, and then move on to A2 and B2.
Flow for Deactivation of Outdated Clients by housekeeping:
A. Initial Setup
B. Server-side Housekeeping Processing
C. Client Re-access
D. Client-side Handling
E. Required User Actions
Description:
When a client leaves a document without properly deactivating(detaching), it remains as a zombie client, leading to inefficiencies in garbage collection. To address this issue, server deactivates clients that have been inactive for a certain period through a housekeeping process.
The default Client Deactivate Threshold is set to 24 hours, meaning that if a client has not edited the document for 24 hours, it will be deactivated and no longer considered to be participating in document editing.
However, there are cases where a user leaves a document open for a long time without actively editing it, causing housekeeping to occur and disconnecting the user from document editing. In such cases, users should be notified that the document has been disconnected and instructed to re-attach in order to continue editing.
Considerations: