ss77892 commented on code in PR #10522:
URL: https://github.com/apache/ozone/pull/10522#discussion_r3477980667


##########
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:
   Yeah, in the original code, startTime was initialized locally. So, a stale 
deadline wasn't possible there. In this PR the model has been changed. Per-poll 
local budget has been replaced with a shared round-trip deadline used by both 
streamRead() and poll(). Once the deadline is stated, it has to be 're-armed' 
when a new round starts. readBlockImpl() is responsible for that, but it might 
be skipped when readLength is 0, and as a result, poll() would fail with a 
timeout even though there is no new request and the server is healthy. 



-- 
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