Skip to content

Pause named DELETE retirement without restoring legacy deletion - #3321

Open
jitheshtr wants to merge 1 commit into
linkedin:masterfrom
jitheshtr:jirajan/pause-named-retirement
Open

jitheshtr wants to merge 1 commit into
linkedin:masterfrom
jitheshtr:jirajan/pause-named-retirement

Conversation

@jitheshtr

@jitheshtr jitheshtr commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor
Order PR Status Runtime effect
1 Transaction executor ✅ Merged Preserves known transaction outcomes.
2 Exact-version manifests ✅ Merged Stores manifests and fences atomically.
3a Migration safety ✅ Merged Verifies migration safeguards.
3b Retirement-aware serving ✅ Merged Gates fence-aware GET, LIST and PUT.
3c Bounded retirement Open Adds the exact-intent publication handle.
— Legacy DELETE test ✅ Merged Makes the legacy DELETE ordering fixture deterministic; no runtime effect.
4 Single-object named DELETE Open Adds the default-off frontend caller.
5 (you are here) Fail-closed pause Open Rejects selected named DELETEs without falling back to physical DELETE.
6 Planned-stop drain Open Adds a pre-stop operation; no rollout wiring or config changes.

Summary

Add a startup setting, frontend.named.blob.retirement.paused, that rejects authorized native and S3 single-object named DELETEs for the configured namespace with HTTP 405 before either delete path runs. It defaults to false and requires a namespace when set to true. Clearing the namespace would restore legacy physical DELETE; pausing keeps the namespace selected and leaves fence-aware reads and cleaner exclusions unchanged.

The pause is a frontend admission gate, not a drain or a gate for direct callers. The runbook requires blocking ingress and confirming zero in-flight retirements on each old process before restart. The per-process drain signal still needs to be implemented and rehearsed before activation.

Merge bounded retirement, then DELETE wiring, then this PR. Review the pause-only diff (before squash) while those dependencies are open.

Testing Done

  • Local code review completed

  • Passed: ./gradlew --no-daemon --max-workers=2 --console=plain :ambry-frontend:test --tests '*NamedBlobDeleteHandlerTest' :ambry-frontend:intTest --tests '*S3NamedBlobRetirementIntegrationTest' (12 tests). The HTTP fixture starts a real frontend with the pause property set, asserts 405 for native and S3 named DELETE, and verifies no named DB calls.

  • Passed on the initial pause commit: ./gradlew --no-daemon --max-workers=2 --console=plain :ambry-api:test --tests '*FrontendConfigTest' :ambry-frontend:test --tests '*NamedBlobDeleteHandlerTest' --tests '*S3BatchDeleteHandlerTest' --tests '*FrontendRestRequestServiceTest' :ambry-frontend:intTest --tests '*S3NamedBlobRetirementIntegrationTest' (91 tests). Fleet pause and drain were not rehearsed.

Generated with GitHub Copilot CLI

@codecov-commenter

codecov-commenter commented Dec 2, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 64.04199% with 137 lines in your changes missing coverage. Please review.
✅ Project coverage is 50.99%. Comparing base (52ba813) to head (c107499).
⚠️ Report is 435 commits behind head on master.

Files with missing lines Patch % Lines
.../java/com/github/ambry/named/MySqlNamedBlobDb.java 73.88% 17 Missing and 18 partials ⚠️
...hub/ambry/frontend/NamedBlobRetirementHandler.java 61.29% 15 Missing and 9 partials ⚠️
...java/com/github/ambry/router/GetBlobOperation.java 42.85% 13 Missing and 3 partials ⚠️
...com/github/ambry/named/NamedBlobManifestStore.java 82.35% 5 Missing and 10 partials ⚠️
...n/java/com/github/ambry/router/GetBlobOptions.java 26.66% 9 Missing and 2 partials ⚠️
...thub/ambry/messageformat/MetadataContentSerDe.java 9.09% 9 Missing and 1 partial ⚠️
...ithub/ambry/messageformat/MessageFormatRecord.java 18.18% 8 Missing and 1 partial ⚠️
...a/com/github/ambry/frontend/DeleteBlobHandler.java 50.00% 5 Missing and 2 partials ⚠️
...n/java/com/github/ambry/config/FrontendConfig.java 33.33% 2 Missing and 2 partials ⚠️
...com/github/ambry/router/GetBlobOptionsBuilder.java 71.42% 1 Missing and 1 partial ⚠️
... and 4 more
Additional details and impacted files
@@              Coverage Diff              @@
##             master    #3321       +/-   ##
=============================================
- Coverage     64.24%   50.99%   -13.25%     
+ Complexity    10398     8873     -1525     
=============================================
  Files           840      942      +102     
  Lines         71755    81617     +9862     
  Branches       8611     9939     +1328     
=============================================
- Hits          46099    41623     -4476     
- Misses        23004    36501    +13497     
- Partials       2652     3493      +841     

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

@jitheshtr
jitheshtr marked this pull request as ready for review December 2, 2026 21:38
Include the bounded writer and named DELETE wiring. Reject new named DELETEs in the configured namespace before either deletion path when paused, and verify pause through native and S3 HTTP requests.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jitheshtr
jitheshtr force-pushed the jirajan/pause-named-retirement branch from 8942a02 to c107499 Compare December 3, 2026 01:33
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