Skip to content

Support account-level entries in named-blob cleanup exclusion list - #3289

Draft
zichengl wants to merge 2 commits into
linkedin:masterfrom
zichengl:8845012+zichengl/namedblob-cleanup-account-level
Draft

Support account-level entries in named-blob cleanup exclusion list#3289
zichengl wants to merge 2 commits into
linkedin:masterfrom
zichengl:8845012+zichengl/namedblob-cleanup-account-level

Conversation

@zichengl

Copy link
Copy Markdown
Contributor

Summary

Extends the named-blob cleanup exclusion list (added in #3286) to support account-level entries.

An entry in frontend.named.blob.cleanup.excluded.containers may now be:

  • a bare accountName — exempts every container in that account, or
  • accountName/containerName — exempts a single container (unchanged).

NamedBlobsCleanupRunner.isExcludedFromCleanup matches either form; the FrontendConfig doc is updated. Backward compatible — existing accountName/containerName entries 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.NamedBlobsCleanupRunnerTest12/12 pass, including the new testAccountLevelExclusionSkipsEveryContainerInTheAccount: 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.containers config (an entry is either accountName or accountName/containerName) rather than introducing a separate excluded.accounts property — 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.

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-commenter

codecov-commenter commented Aug 20, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 50.75%. Comparing base (52ba813) to head (8efb17b).
⚠️ Report is 412 commits behind head on master.

Files with missing lines Patch % Lines
...github/ambry/frontend/NamedBlobsCleanupRunner.java 0.00% 3 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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>
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.

2 participants