Repository navigation
Conversation
This was referenced Dec 2, 2026
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #3322 +/- ##
=============================================
- Coverage 64.24% 51.01% -13.24%
+ Complexity 10398 8908 -1490
=============================================
Files 840 944 +104
Lines 71755 81697 +9942
Branches 8611 9948 +1337
=============================================
- Hits 46099 41677 -4422
- Misses 23004 36504 +13500
- Partials 2652 3516 +864 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
jitheshtr
marked this pull request as ready for review
December 3, 2026 01:31
Include the writer, named DELETE wiring, and startup pause. Close admission before waiting for the retirement worker and terminal HTTP write. Bound preparation without interrupting publication or receipt recovery. Expose a pre-stop drain for deployment integration. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
jitheshtr
force-pushed
the
jirajan/drain-named-retirement
branch
from
December 3, 2026 01:33
1cc43e0 to
7d30b4f
Compare
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
Add
RestServer.drainNamedBlobRetirement(timeout, unit)for a future deployment gate. It closes retirement admission on the running frontend before waiting for admitted requests to finish work that can still publish a retirement or recover its receipt, and to reach a terminal HTTP write. A read-only descriptor operation that outlives the preparation deadline cannot lead to publication; drain neither cancels nor waits for it. Timeout or interruption leaves admission closed and does not cancel work. A terminal write failure is logged; draining does not prove that the client received the outcome and must not trigger replay.Register terminal-write tracking only on the retirement admission path. Use a shared 30-second preparation budget across descriptor waits, checking both before writer checkout and after session setup. Expiry before the manifest transaction body is a known no-write outcome. This does not interrupt an in-progress JDBC call or constrain publication and receipt recovery after publication starts. Keep retirement off until the deployment hook can invoke the blocking drain on a deployment control thread, veto shutdown on timeout or interruption, and complete a rollout rehearsal. Do not call it on a Netty event loop or a worker needed to finish admitted requests. The startup pause remains the setting for replacement frontends.
Land the writer, DELETE wiring, and startup pause first. Review the drain-only diff (before squash) while the dependencies are open.
Testing Done
Local code review completed
On
1cc43e08,./gradlew --offline --no-daemon --max-workers=2 --console=plain :ambry-frontend:intTest --tests '*S3NamedBlobRetirementIntegrationTest'passed (9 HTTP tests). Both held-write tests wait for the worker task to return. As a negative control, each failed at the held-write assertion when drain temporarily ignored transport completion.On
39b7d6cf,./gradlew --offline --no-daemon --max-workers=2 --console=plain :ambry-frontend:test --tests '*NamedBlobDeleteHandlerTest' :ambry-frontend:intTest --tests '*S3NamedBlobRetirementIntegrationTest'passed (7 unit and 9 HTTP tests).On
d309be9d,./gradlew --offline --no-daemon --max-workers=2 --console=plain :ambry-named-mysql:intTest --tests '*NamedBlobManifestStoreIntegrationTest.testRetirementPreservesCommitAndEvictsWhenTimeoutRestoreFails' --tests '*NamedBlobManifestStoreIntegrationTest.testWiredRetirement*'passed (5 tests on isolated MySQL 8.0: timeout-restore eviction, pre- and post-checkout expiry, replacement rejection, and receipt recovery after a lost commit reply). The fixture fix is carried from the writer PR.On
a43bb013:./gradlew --offline --no-daemon --max-workers=2 --console=plain :ambry-frontend:test --tests '*NamedBlobDeleteHandlerTest' --tests '*S3BatchDeleteHandlerTest' :ambry-rest:test --tests '*NettyResponseChannelTest'(66 selected tests)../gradlew --offline --no-daemon --max-workers=2 --console=plain :ambry-frontend:intTest --tests '*S3NamedBlobRetirementIntegrationTest' :ambry-named-mysql:compileIntTestJava(9 HTTP tests, including held 204 and 503 writes and a real socket disconnect while the worker is active; MySQL integration sources compiled).The deployment hook is not wired or rehearsed by this PR.
Generated with GitHub Copilot CLI