Skip to content

Support account-level exclusions from named-blob cleanup - #3290

Merged
zichengl merged 1 commit into
linkedin:masterfrom
zichengl:zichengl/nb-cleanup-exclude-accounts
Aug 20, 2026
Merged

Support account-level exclusions from named-blob cleanup#3290
zichengl merged 1 commit into
linkedin:masterfrom
zichengl:zichengl/nb-cleanup-exclude-accounts

Conversation

@zichengl

Copy link
Copy Markdown
Contributor

Summary

Adds an account-level exclusion to the named-blob stale-data cleanup runner, complementing the container-level exclusion added in #3286.

A new config property frontend.named.blob.cleanup.excluded.accounts takes a comma-separated list of accountName entries. Every container under a listed account is skipped by the cleanup runner, so its superseded (stale) named-blob versions are retained rather than deleted — useful for exempting an entire account without enumerating each of its containers.

Design

  • Separate property rather than overloading ...excluded.containers with slash-less entries. Keeping them distinct means a missing "/containerName" (a typo) can never silently widen a single-container exclusion into a whole-account one.
  • The runner checks the account-level set first, then the container-level set. The existing fail-open behavior on an unresolvable account is unchanged (an account that can't be resolved never suppresses cleanup).
  • Same parsing rules as the container list: per-entry whitespace is trimmed, blank entries dropped, and whitespace within a name stays significant.

Testing

  • FrontendConfigTest: parsing/trimming of the new accounts list.
  • NamedBlobsCleanupRunnerTest: an account-level exclusion skips every container under that account while a container in another account is still cleaned.

Adds frontend.named.blob.cleanup.excluded.accounts alongside the existing
excluded.containers list. An entry is an accountName; every container under a
listed account is skipped. Kept as a separate property (rather than overloading
the containers list with slash-less entries) so a missing "/containerName" can
never silently widen a container exclusion into a whole-account one.

Runner checks the account-level set first, then the container-level set; the
unresolvable-account fail-open behavior is unchanged. Same trim/parse rules as
the container list. Adds FrontendConfigTest + runner test coverage.

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 50.00000% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 50.81%. Comparing base (52ba813) to head (f35c0c3).
⚠️ Report is 411 commits behind head on master.

Files with missing lines Patch % Lines
...github/ambry/frontend/NamedBlobsCleanupRunner.java 30.76% 8 Missing and 1 partial ⚠️
...n/java/com/github/ambry/config/FrontendConfig.java 83.33% 1 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             master    #3290       +/-   ##
=============================================
- Coverage     64.24%   50.81%   -13.43%     
+ Complexity    10398     8704     -1694     
=============================================
  Files           840      938       +98     
  Lines         71755    80505     +8750     
  Branches       8611     9691     +1080     
=============================================
- Hits          46099    40912     -5187     
- Misses        23004    36205    +13201     
- Partials       2652     3388      +736     

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

@zichengl
zichengl merged commit fe455b7 into linkedin:master Aug 20, 2026
11 checks passed
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