Skip to content

CBG-5227: background metadata migration task#8299

Merged
bbrks merged 4 commits into
mainfrom
CBG-5227
May 27, 2026
Merged

CBG-5227: background metadata migration task#8299
bbrks merged 4 commits into
mainfrom
CBG-5227

Conversation

@gregns1
Copy link
Copy Markdown
Contributor

@gregns1 gregns1 commented May 27, 2026

CBG-5227

Add the legwork for a background task to manage metadata migration from the default collection to the mobile system collection.

  • New MetadataMigrationManager which implements BackgroundManagerProcessI interface which follows other background managers
  • Opt-in config on the db config level. New use_system_metadata_collection field on DbConfig which defaults to false
  • StartOnlineProcesses will run armMetadataMigrationTask which will poll every 10 seconds the function tryStartMetadataMigration until all nodes in the cluster have applied the same db config version this node has if the dbconfig has the use_system_metadata_collection option set to true OR the bootstrap level option is true.
  • tryStartMetadataMigration handles all the logic for starting migration and backs out when a node has already started the task.
  • Bundles in the CCV refactor out of CBG-5406 too

Pre-review checklist

  • Removed debug logging (fmt.Print, log.Print, ...)
  • Logging sensitive data? Make sure it's tagged (e.g. base.UD(docID), base.MD(dbName))
  • Updated relevant information in the API specifications (such as endpoint descriptions, schemas, ...) in docs/api

Dependencies (if applicable)

  • Link upstream PRs
  • Update Go module dependencies when merged

Integration Tests

Copilot AI review requested due to automatic review settings May 27, 2026 12:03
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot wasn't able to review any files in this pull request.

@github-actions
Copy link
Copy Markdown

Redocly previews

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link
Copy Markdown
Member

@bbrks bbrks left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@bbrks bbrks enabled auto-merge (squash) May 27, 2026 13:18
@bbrks bbrks merged commit e20683b into main May 27, 2026
57 of 61 checks passed
@bbrks bbrks deleted the CBG-5227 branch May 27, 2026 13:25
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