szetszwo commented on code in PR #10415:
URL: https://github.com/apache/ozone/pull/10415#discussion_r3358674657


##########
hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/storage/StreamBlockInputStream.java:
##########
@@ -208,8 +214,11 @@ public synchronized void seek(long pos) throws IOException 
{
     if (pos == position) {
       return;
     }
-    LOG.debug("{}: seek {} -> {}", this, position, pos);
-    closeStream();
+    LOG.debug("{}: seek {} -> {}", getName(streamingReader), position, pos);
+    if (streamingReader != null && readBuffer != null) {
+      streamingReader.offerToQueue(readBuffer.getProto());

Review Comment:
   That's a good idea.  We could put back the buffer in the head (instead of 
the tail) of the queue.  Let me see how to do it.



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