Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR ensures bucket-level bootstrap metadata migration doesn’t remain stuck in a pending state when the last non-migrated database is removed from a bucket, by re-checking pending migrations during the bootstrap config polling loop.
Changes:
- Add a periodic recheck in the bootstrap config polling loop to attempt completion of bucket-level metadata migration when conditions change (e.g., DB deletion).
- Extend the
base.BootstrapConnectioninterface with anIsMigrationCompletefast-path helper and implement it for Couchbase/Rosmar backends. - Add a regression test covering deletion of a non-migrated DB unblocking bucket bootstrap migration completion.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
rest/server_context.go |
Adds periodic recheck logic to complete pending bucket-level metadata migrations during config polling. |
rest/metadatamigrationtest/metadata_migration_test.go |
Adds a test verifying DB deletion unblocks bootstrap migration completion. |
base/rosmar_cluster.go |
Implements IsMigrationComplete for Rosmar bootstrap connection. |
base/bootstrap.go |
Adds IsMigrationComplete to the bootstrap connection interface and implements it for Couchbase. |
| assert.Contains(t, resp.Body.String(), `"name":"bob"`, "dbnamed must remain readable after dbdefault's later migration") | ||
| } | ||
|
|
||
| func TestDeleteNonMigratedDbUnblocksBootstrapMigration(t *testing.T) { |
bbrks
previously approved these changes
Jun 17, 2026
bbrks
requested changes
Jun 30, 2026
bbrks
left a comment
Member
There was a problem hiding this comment.
A few comments - let me know if you disagree and we can discuss. Some of this is undefined behaviour (e.g. do we 'migrate' a bootstrap bucket if there are no databases - I think yes, but I could see an argument for no)
bbrks
approved these changes
Jul 1, 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-5463
When a bucket is in pending state due to a db being not migrated yet, we should poll to ensure that this is still the correct state to be in. Meaning if you delete a non migrated db from the bucket it should not hold up bootstrap level migration.
Pre-review checklist
fmt.Print,log.Print, ...)base.UD(docID),base.MD(dbName))docs/apiDependencies (if applicable)
Integration Tests