ss77892 commented on code in PR #10522:
URL: https://github.com/apache/ozone/pull/10522#discussion_r3469954942
##########
hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/storage/StreamBlockInputStream.java:
##########
@@ -447,6 +461,7 @@ private ByteBuffer read(int length, boolean preRead) throws
IOException {
return responseQueue.isEmpty() ? null : readFromQueue();
}
+ refreshReadDeadline();
Review Comment:
readBlock() calls readBlockImpl() (which sets the deadline) only when
readLength > 0. When a read is satisfied from already-requested data
(readLength <= 0), readBlockImpl() is skipped, so poll() would otherwise wait
against a stale deadline from a previous read and could time out immediately.
TestStreamBlockInputStream#testReadWithoutNewRequestGetsFreshTimeoutBudget
covers this path.
--
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]