Skip to content

[4.1.1 Backport] CBG-5541: Explicitly ignore collection-scoped 'non-metadata' _sync docs from metadata migration#8428

Merged
bbrks merged 1 commit into
release/4.1.1from
CBG-5541
Jul 6, 2026
Merged

[4.1.1 Backport] CBG-5541: Explicitly ignore collection-scoped 'non-metadata' _sync docs from metadata migration#8428
bbrks merged 1 commit into
release/4.1.1from
CBG-5541

Conversation

…cs from metadata migration (#8409)

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 6, 2026 16:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@bbrks bbrks merged commit a1a3132 into release/4.1.1 Jul 6, 2026
43 checks passed
@bbrks bbrks deleted the CBG-5541 branch July 6, 2026 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants