-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Preserve step queue during reconnect #5126
Conversation
830c0d4
to
2db66d5
Compare
2db66d5
to
caec8f0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, thanks!
caec8f0
to
111c5d1
Compare
During a network disconnect Yjs-websocket notices missing awareness messages and closes the connection. In this case the remaining steps can also not be send out and the request fails. Preserve the queue so we can use it once the network is back up. Signed-off-by: Max <[email protected]>
When yjs does not receive awareness updates it will close and reopen the websocket. Keep the content of the queue, i.e. the outgoing steps so they can be send out once the connection is back. Signed-off-by: Max <[email protected]>
Change the content of `queue` with `queue.splice` rather than setting `queue` to another array. Signed-off-by: Max <[email protected]>
Also add a unit test for the websocket polyfill Signed-off-by: Max <[email protected]>
111c5d1
to
1911a14
Compare
avoids the old provider leaking error events. Signed-off-by: Max <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and works
/backport to stable28 |
/backport to stable27 |
/backport to stable26 |
The backport to stable26 failed. Please do this backport manually. # Switch to the target branch and update it
git checkout stable26
git pull origin stable26
# Create the new backport branch
git checkout -b fix/foo-stable26
# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts. Resolve them.
git cherry-pick abc123
# Push the cherry pick commit to the remote repository and open a pull request
git push origin fix/foo-stable26 Error: Unknown error More info at https://docs.nextcloud.com/server/latest/developer_manual/getting_started/development_process.html#manual-backport |
The backport to stable27 failed. Please do this backport manually. # Switch to the target branch and update it
git checkout stable27
git pull origin stable27
# Create the new backport branch
git checkout -b fix/foo-stable27
# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts. Resolve them.
git cherry-pick abc123
# Push the cherry pick commit to the remote repository and open a pull request
git push origin fix/foo-stable27 Error: Unknown error More info at https://docs.nextcloud.com/server/latest/developer_manual/getting_started/development_process.html#manual-backport |
📝 Summary
During a network disconnect
Yjs-websocket notices missing awareness messages and closes the connection.
In this case the remaining steps can also not be send out and the request fails.
Preserve the queue so we can use it once the network is back up.
🏁 Checklist
npm run lint
/npm run stylelint
/composer run cs:check
)