ss77892 commented on code in PR #10415:
URL: https://github.com/apache/ozone/pull/10415#discussion_r3343358895
##########
hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/storage/StreamBlockInputStream.java:
##########
@@ -208,8 +212,8 @@ 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);
+ buffer = null;
Review Comment:
When I was checking HBase behavior, I noticed that it's quite a common
scenario where it does seek {current} -> 0 and seek 0 -> current + small offset
without any reads in between. Usually, the last seek lands in the existing
buffer/prefetch. Would it be more reasonable if we try to preserve the buffer
if the actual read happen for the data we already have in the buffer?
--
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]