Revert named-blob client-disconnect guard (#3279, #3281) - #3284
Merged
nicolaslopezbravo merged 2 commits intoAug 18, 2026
Conversation
linkedin#3279)" This reverts commit 367375c. Conflicts in AmbryIdConverterFactory and its test came from linkedin#3281, which refined the guard block this commit introduced. The block is removed along with the java.io.IOException / ClosedChannelException imports linkedin#3281 added for it. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…500 (linkedin#3281)" This reverts commit bf4d122. linkedin#3281 refined the disconnect guard added by linkedin#3279, so reverting linkedin#3279 orphans it. This removes the leftover java.io.IOException import and the IOException on convertId's throws clause, which nothing can throw now. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
nicolaslopezbravo
marked this pull request as ready for review
August 18, 2026 21:44
SophieGuo410
approved these changes
Aug 18, 2026
Codecov Report✅ All modified and coverable lines are covered by tests.
Additional details and impacted files@@ Coverage Diff @@
## master #3284 +/- ##
=============================================
- Coverage 64.24% 38.19% -26.05%
+ Complexity 10398 6479 -3919
=============================================
Files 840 938 +98
Lines 71755 80374 +8619
Branches 8611 9672 +1061
=============================================
- Hits 46099 30700 -15399
- Misses 23004 47197 +24193
+ Partials 2652 2477 -175 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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
Reverts #3279 (
Cancel named-blob metadata commit when client has disconnected) and its dependent follow-up #3281 (Classify client-disconnect during named-blob PUT as 400, not 500).#3279 added a best-effort
restRequest.isOpen()guard inAmbryIdConverterFactory.NamedBlobIdConverter#convertIdthat skips the named-blob metadata commit and throws when the client has already disconnected. #3281 then changed that throw fromRestServiceException(RequestChannelClosed)to a client-terminationIOExceptionso it classified as 400 rather than 500.The guard can race with other exception paths on the same request, so the error a disconnected named-blob PUT reports is not deterministic. The correct fix for the underlying PUT retry race landed separately, so the guard is redundant.
Why both PRs
#3281 only refines the guard block #3279 introduced, so it has no remaining subject once #3279 is gone. Reverting #3279 alone would leave
import java.io.IOExceptionand theIOExceptiononconvertId's throws clause with nothing able to throw it.Changes
Revert of #3279:
AmbryIdConverterFactory: remove theisOpen()guard.FrontendMetrics: removeidConverterClientAbortedCount.NettyMessageProcessor.channelInactive(): remove therequest.close()call added beforeonRequestAborted(...).ambryIdConverterNamedBlobPutClientDisconnectTestand theNettyMessageProcessorTestcases added alongside it.Revert of #3281:
AmbryIdConverterFactory: drop thejava.io.IOExceptionimport and theIOExceptiononconvertId's throws clause.This restores a duplicate
import com.github.ambry.utils.Utils;(lines 36 and 45). #3281's description attributed that duplicate to #3279, but it is present in367375cd6^, so it predates both PRs; it is left in place to keep the revert faithful.Verification
git diff 367375cd6^ HEADover all five touched files is empty, so the branch is master with both PRs removed and nothing else.Testing Done
./gradlew :ambry-frontend:compileTestJava :ambry-rest:compileTestJava— BUILD SUCCESSFUL./gradlew :ambry-frontend:test --tests '*AmbryIdConverterFactoryTest'— 2 tests, 2 passed, 0 failed./gradlew :ambry-rest:test --tests '*NettyMessageProcessorTest'— 9 tests, 9 passed, 0 failedBuilt with JDK 11; the repo's
sourceCompatibility = 1.8does not compile under JDK 25.Risk / ops impact
Low — a revert to previously-shipped behavior. No interface, wire, or schema changes. The
idConverterClientAbortedCountmetric is removed, and classification of client disconnects during named-blob PUT returns to its pre-#3279 behavior. Backout is a revert of this PR.AI usage
Revert prepared and verified with GitHub Copilot CLI.