[4.1.1 Backport] CBG-5541: Explicitly ignore collection-scoped 'non-metadata' _sync docs from metadata migration#8428
Merged
Merged
Conversation
…cs from metadata migration (#8409) Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This backport fixes metadata migration in legacy default-collection deployments by explicitly classifying certain collection-scoped _sync: “data” documents (attachments, revision-body backups, local docs/checkpoints) as out-of-scope so they don’t count as “remaining” and wedge the migration loop.
Changes:
- Treat
_sync:att:,_sync:att2:,_sync:rev:,_sync:rb:, and_sync:local:keys as out-of-scope during metadata migration range scans. - Add a regression test that seeds these collection-scoped keys into the fallback datastore and asserts the migration completes while leaving them in place.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| db/metadata_migration.go | Classifies collection-scoped _sync: data-doc prefixes as out-of-scope so they don’t block migration completion. |
| db/background_mgr_metadata_migration_test.go | Adds regression coverage ensuring migration completes when fallback contains collection-scoped data docs and only migrates true metadata. |
adamcfraser
approved these changes
Jul 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CBG-5541
release/4.1.1based onrelease/4.1.0.1(containing [4.1.0.1 backport] CBG-5550: Revert "CBG-5262 fix missing changes with active_only=true and limit=" #8418)Integration Tests