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

Sync client should wait for MARK message before marking subscriptions complete #5705

Closed
sync-by-unito bot opened this issue Aug 3, 2022 · 5 comments
Closed
Assignees

Comments

@sync-by-unito
Copy link

sync-by-unito bot commented Aug 3, 2022

Due to a recent change on the server, we may not receive all changes when bootstrapping a flx realm, so a subscription may be prematurely marked as complete. We should probably send a MARK when sending a QUERY message to make sure we wait for all objects matching the subscription before marking it complete.

This has several slack threads associated with it:

https://mongodb.slack.com/archives/G0121N9LJ14/p1658977516466089
https://mongodb.slack.com/archives/C01N0DHTW9X/p1658150145232439
https://mongodb.slack.com/archives/G0121N9LJ14/p1659533132162879

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Aug 10, 2022

➤ James Stone commented:

[~jonathan.reams@mongodb.com] can you assign this to someone on your team or if it is not a high priority, place it on the backlog?

@nirinchev
Copy link
Member

nirinchev commented Aug 23, 2022

I believe this is causing issues with automatic client reset for flexible sync. I have not reviewed the actual reset code, but if it's relying on subscription synchronization without waiting for download, this would explain some timing issues we're seeing in our tests.

@ironage can you check if that may be an issue for the reset logic, particularly when recovering changes.

@ironage
Copy link
Contributor

ironage commented Aug 23, 2022

Downloading a fresh FLX Realm during client reset just waits for a completed subscription set so yes, it is a problem there as well.

@jbreams
Copy link
Contributor

jbreams commented Aug 24, 2022

Hi @nirinchev , I will drop everything to work on this right away so your tests pass! Thanks!

@jbreams
Copy link
Contributor

jbreams commented Sep 2, 2022

The long-term fix for this requires new testing infrastructure on the server side. However, I've merged a stop-gap fix for how FLX sync client resets are handled so that client resets with recovery mode always wait to be fully synchronized with the server before doing any of their recovery work. Hopefully this will unblock @nirinchev's client reset work while we build out the infrastructure to test the real fix for this problem.

@sync-by-unito sync-by-unito bot closed this as completed Nov 2, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants