-
Notifications
You must be signed in to change notification settings - Fork 23
Encode sync rule id in bucket id #333
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
Conversation
🦋 Changeset detectedLatest commit: 5ee6c7b The changes in this PR will be included in the next version bump. This PR includes changesets to release 17 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
We could also potentially enable this for any new sync rules deploy - in that case we'd just need to persist the state in the sync_rules storage collection/table. But not sure if that's actually worth the extra implementation effort - the approach here would eventually cover the majority of cases as we encourage users to switch to sync streams or the new defaults. |
da0954b
to
d9a8f65
Compare
4eeb885
to
d91c383
Compare
32c548a
to
1ce5d65
Compare
3f41d60
to
db8eff4
Compare
e26d1f5
to
5ee6c7b
Compare
When deploying new sync rules, the service will re-index everything from a consistent snapshot. Since it re-uses existing bucket ids for this, this means that oplog history checksums within a bucket change too. This is bad for clients, which may download new data ontop of their old oplog without deleting it right away. That increases the sync time (because clients have to wait for a consistent snapshot only to realize that their checksums are off and restart) and can be confusing (because sync progress appears to reach 1.0 before restarting).
A backwards-incompatible change is to encode the id of persisted sync rules in the created bucket ids. This means that every redeploy leads to different bucket ids, causing clients to drop their old buckets instead of trying to consider that data. Since this format would break existing deployments, it's only enabled for sync streams or with an opt-in.