chihsuan commented on code in PR #11051:
URL: https://github.com/apache/ozone/pull/11051#discussion_r3813521006


##########
hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/storage/StreamBlockInputStream.java:
##########


Review Comment:
   With the new guards, this branch appears reachable only from 
`reuseReadBuffer()` during seek, where the proto is still dropped. Should we 
update this TODO or handle it here?



##########
hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/storage/StreamBlockInputStream.java:
##########
@@ -539,6 +553,12 @@ ReadBlockResponseProto poll() throws IOException {
 
     private ReadBuffer read(int length, boolean preRead) throws IOException {
       checkError();
+      // A previously cached out-of-order response may already cover the 
current position.
+      final ReadBuffer cached = pollPendingProtos();

Review Comment:
   A cache hit returns before `readBlock()` is called. Could this delay 
replenishing the pre-read window while consecutive cached responses are 
consumed? If intentional, would a short comment or test help clarify the 
expected behavior?



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