Gargi-jais11 opened a new pull request, #11790: URL: https://github.com/apache/ozone/pull/11790
## What changes were proposed in this pull request? The domain socket **Receiver** assumes that every response has a block file, but only a GetBlock that is granted short-circuit access has one. `sendResponse` closes `entry.getFile()` without a **null check.** For an Echo, a failed GetBlock (for example UNKNOWN_BCSID), or an UNSUPPORTED_REQUEST reply, this throws an NPE after the response is sent. The datanode logs Failed to **processRequest** at ERROR with a stack trace and skips the local latency metric. `ProcessRequestTask.run` fetches the block file for every successful GetBlock. If the response does not grant access, for example because requestShortCircuitAccess is not set, requireNonNull throws, no reply is sent, and the client waits for its read timeout. This change makes Receiver fetch the block file only when the response grants short-circuit access, and close the file only when there is one. Successful short-circuit reads are unchanged. ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-17443 ## How was this patch tested? Added `testResponseWithoutBlockFile` and `testGetBlockWithoutShortCircuitAccess` to `TestXceiverServerDomainSocket`. Without the fix, the first fails because Receiver logs Failed to processRequest, and the second fails with SocketTimeoutException. -- 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]
