taklwu commented on code in PR #11102:
URL: https://github.com/apache/ozone/pull/11102#discussion_r3984179810


##########
hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/storage/ChunkInputStream.java:
##########
@@ -430,14 +433,130 @@ protected void readChunkDataIntoBuffers(ChunkInfo 
readChunkInfo)
   }
 
   /**
-   * Send RPC call to get the chunk from the container.
+   * Whether this chunk stream can serve positioned reads without holding a
+   * lock. A plain chunk read is a self-contained RPC, so concurrent callers
+   * reading different ranges do not interfere. Overridden by
+   * {@link LocalChunkInputStream} uses positional {@link FileChannel} reads on
+   * the shared block channel, so concurrent callers on different chunks do not
+   * interfere.
    */
-  @VisibleForTesting
-  protected ByteBuffer[] readChunk(ChunkInfo readChunkInfo)
+  boolean supportsConcurrentPositionedRead() {
+    return true;
+  }

Review Comment:
   > synchronized int readPositioned 
   
   do we need `synchronized` for readPositioned in `ChunkInputStream` ? with 
`synchronized`, only one caller are executing at a time and serialized, where I 
thought we have done the protection with `acquireClient`. 
   
   it's a performance impact and I may need to recheck how with the read 
workload.



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