Skip to content
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

Resending pending subscriptions can result in inconsistent sync progress #6966

Closed
sync-by-unito bot opened this issue Sep 11, 2023 · 0 comments · Fixed by #6965
Closed

Resending pending subscriptions can result in inconsistent sync progress #6966

sync-by-unito bot opened this issue Sep 11, 2023 · 0 comments · Fixed by #6965
Assignees

Comments

@sync-by-unito
Copy link

sync-by-unito bot commented Sep 11, 2023

When a change of query (COQ) needs to be sent to the server, the sync client first uploads the local changes up to the client version associated to the query. Sometimes, these upload messages are empty. If the the client disconnects and reconnects before the query was fully bootstrapped, the sync client re-sends the upload and COQ messages to the server. This is a problem especially if the upload message is empty. Due to history trimming, the sync client may not know anymore the last_integrated_server_version associated with the client version sent in the upload message. This results in the server issuing a Bad server version error (and a client reset) due to inconsistent sync progress (same client version is sent with two different server versions).

There are (at least) two solutions to this issue:

  1. Skip sending empty upload messages before a COQ
  2. Do not trim history past the latest client version acknowledged by the server

First solution is going to be implemented (this is also an optimization since the server does not really need these empty messages).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant