Skip to content

Revert named-blob client-disconnect guard (#3279, #3281) - #3284

Merged
nicolaslopezbravo merged 2 commits into
linkedin:masterfrom
nicolaslopezbravo:nbravo-linkedin-revert-named-blob-disconnect-guard
Aug 18, 2026
Merged

Revert named-blob client-disconnect guard (#3279, #3281)#3284
nicolaslopezbravo merged 2 commits into
linkedin:masterfrom
nicolaslopezbravo:nbravo-linkedin-revert-named-blob-disconnect-guard

Conversation

@nicolaslopezbravo

Copy link
Copy Markdown
Contributor

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 in AmbryIdConverterFactory.NamedBlobIdConverter#convertId that skips the named-blob metadata commit and throws when the client has already disconnected. #3281 then changed that throw from RestServiceException(RequestChannelClosed) to a client-termination IOException so 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.IOException and the IOException on convertId's throws clause with nothing able to throw it.

Changes

Revert of #3279:

  • AmbryIdConverterFactory: remove the isOpen() guard.
  • FrontendMetrics: remove idConverterClientAbortedCount.
  • NettyMessageProcessor.channelInactive(): remove the request.close() call added before onRequestAborted(...).
  • Remove ambryIdConverterNamedBlobPutClientDisconnectTest and the NettyMessageProcessorTest cases added alongside it.

Revert of #3281:

  • AmbryIdConverterFactory: drop the java.io.IOException import and the IOException on convertId'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 in 367375cd6^, so it predates both PRs; it is left in place to keep the revert faithful.

Verification

git diff 367375cd6^ HEAD over 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 failed

Built with JDK 11; the repo's sourceCompatibility = 1.8 does not compile under JDK 25.

Risk / ops impact

Low — a revert to previously-shipped behavior. No interface, wire, or schema changes. The idConverterClientAbortedCount metric 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.

nbravo and others added 2 commits August 18, 2026 14:35
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
nicolaslopezbravo marked this pull request as ready for review August 18, 2026 21:44
@codecov-commenter

codecov-commenter commented Aug 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 38.19%. Comparing base (52ba813) to head (9f05834).
⚠️ Report is 408 commits behind head on master.

❗ There is a different number of reports uploaded between BASE (52ba813) and HEAD (9f05834). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (52ba813) HEAD (9f05834)
3 2
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.
📢 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.

@nicolaslopezbravo
nicolaslopezbravo merged commit 1233232 into linkedin:master Aug 18, 2026
10 of 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