Conversation
Create a database and delete the database out from underneath. Without this fix, cluster compat manager will be consistently polling this unreachable bucket.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR prevents the cluster compatibility manager from repeatedly polling bucket registries for buckets that have been deleted externally, by detecting “bucket no longer exists” conditions and untracking those buckets.
Changes:
- Add a bucket-existence check during registry fetch failures and wrap confirmed “bucket deleted” cases in a sentinel error (
errBucketDoesNotExist) forerrors.Ishandling. - Update cluster compat refresh logic to untrack buckets when that sentinel error is encountered.
- Add a regression test covering refresh behavior with a tracked bucket that does not exist (with special handling for Rosmar auto-create behavior).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| rest/config_manager.go | Adds bucketExists helper + sentinel error wrapping so callers can distinguish deleted buckets from transient I/O failures. |
| rest/cluster_compat.go | Untracks buckets when registration fails due to confirmed bucket deletion. |
| rest/cluster_compat_test.go | Adds test coverage for refresh behavior when a tracked bucket vanishes (and Rosmar-specific cleanup). |
Comment on lines
+492
to
+495
| if errors.Is(err, errBucketDoesNotExist) { | ||
| base.InfofCtx(ctx, base.KeyConfig, "Bucket %s no longer exists in cluster, removing from cluster compatibility manager %v", base.MD(bucket), err) | ||
| m.releaseBucket(bucket) | ||
| continue |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
bbrks
approved these changes
Jul 13, 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-5539 make sure to untrack deleted buckets
Create a database and delete the database out from underneath. Without this fix, cluster compat manager will be consistently polling this unreachable bucket.
I will have an upcoming PR that actually has an integration test to delete a bucket in an integration test using code #8371 but this test code won't work until this and some other issues are fixed.
Pre-review checklist
fmt.Print,log.Print, ...)base.UD(docID),base.MD(dbName))docs/apiIntegration Tests