ss77892 opened a new pull request, #11250: URL: https://github.com/apache/ozone/pull/11250
## What changes were proposed in this pull request? readBlockImpl reports an out of range offset with StreamObserver.onError, which ends the call from the datanode side. GrpcXceiverService closes the stream's RandomAccessFileChannel only when the client completes the stream or a request throws, so the block file stayed open. rejectReadBlock closes it before reporting the error. Improvements to TestKeyValueHandler. Replace the readBlock helper with a StreamFixture for multi-request ReadBlock tests. The old helper wrote one zero-filled block, sent one request and closed the block file, so a test could neither send several requests on one stream nor check the state of the stream's block file. StreamFixture keeps the container, block and RandomAccessFileChannel for the test's lifetime, appends chunks whose bytes encode their position, and assertResponses checks the streamed data against that. No test behavior changes. Those changes would be required for several followups including HDDS-16377 ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-16421 ## How was this patch tested? UTs freon/warp workloads -- 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]
