szetszwo commented on code in PR #11102:
URL: https://github.com/apache/ozone/pull/11102#discussion_r3984222160
##########
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:
@taklwu , you are right, we don't need synchronized here.
--
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]