Support account-level entries in named-blob cleanup exclusion list - #3289
Draft
zichengl wants to merge 2 commits into
Draft
Support account-level entries in named-blob cleanup exclusion list#3289zichengl wants to merge 2 commits into
zichengl wants to merge 2 commits into
Conversation
Extend the exclusion list so an entry may be a bare "accountName" (which exempts every container in that account) in addition to a fully-qualified "accountName/containerName" (a single container). NamedBlobsCleanupRunner's isExcludedFromCleanup now matches either form; FrontendConfig docs updated. Backward compatible -- existing accountName/containerName entries are unchanged. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3289 +/- ##
=============================================
- Coverage 64.24% 50.75% -13.49%
+ Complexity 10398 8682 -1716
=============================================
Files 840 938 +98
Lines 71755 80493 +8738
Branches 8611 9690 +1079
=============================================
- Hits 46099 40855 -5244
- Misses 23004 36241 +13237
- Partials 2652 3397 +745 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Drives the real NamedBlobsCleanupRunner against a real InMemNamedBlobDb with real superseded versions and asserts that a bare accountName exclusion entry retains the stale versions of every container in that account while a container in a different account is still cleaned. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Summary
Extends the named-blob cleanup exclusion list (added in #3286) to support account-level entries.
An entry in
frontend.named.blob.cleanup.excluded.containersmay now be:accountName— exempts every container in that account, oraccountName/containerName— exempts a single container (unchanged).NamedBlobsCleanupRunner.isExcludedFromCleanupmatches either form; theFrontendConfigdoc is updated. Backward compatible — existingaccountName/containerNameentries are unchanged, and it remains durability-safe (retain-only: it can only ever cause the cleaner to delete less).Motivation: some consumers need a whole account exempted — including containers created later — which the per-container form can't express.
Testing Done
Run under JDK 11:
./gradlew :ambry-frontend:test --tests com.github.ambry.frontend.NamedBlobsCleanupRunnerTest— 12/12 pass, including the newtestAccountLevelExclusionSkipsEveryContainerInTheAccount: a bare account name skips every container in that account, while a container in a different account is still cleaned../gradlew :ambry-api:test --tests com.github.ambry.config.FrontendConfigTest— pass.Risk
Additive and backward compatible; retain-only. Reversible by removing entries.
Notes
Design choice: this reuses the existing
excluded.containersconfig (an entry is eitheraccountNameoraccountName/containerName) rather than introducing a separateexcluded.accountsproperty — minimal change, and downstream cfg2 bridges need no new field. Happy to switch to a dedicated account-list property if reviewers prefer the explicit split.