suvodeep-pyne opened a new pull request, #17845:
URL: https://github.com/apache/pinot/pull/17845

   ## Summary
   - When `writeAndFlush()` fails on the server (e.g. direct memory OOM), Netty 
half-closes the channel via `shutdownOutput()` but `channelInactive()` never 
fires, creating a zombie channel that accepts queries but never sends responses
   - The broker sees silent timeouts and keeps routing queries to the broken 
channel
   - Add `f.isSuccess()` check in the `writeAndFlush` listener in 
`InstanceRequestHandler.sendResponse()`. On failure: log the error, increment 
`NETTY_CONNECTION_SEND_RESPONSE_EXCEPTIONS` metric, and close the channel via 
`ctx.close()` to trigger proper cleanup
   - Since `sendErrorResponse()` delegates to `sendResponse()`, this single 
change covers all outbound writes
   
   ## Test plan
   - [x] Added `testWriteFailureClosesChannel` unit test that captures the 
write listener, invokes it with a failed future, and verifies `ctx.close()` is 
called
   - [x] Existing `testCancelQuery` test passes (no regression)
   - [x] `InstanceRequestHandlerTest`: 2 tests, 0 failures


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to