smengcl commented on code in PR #10764:
URL: https://github.com/apache/ozone/pull/10764#discussion_r3771921471


##########
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/protocolPB/ContainerCommandResponseBuilders.java:
##########
@@ -336,14 +338,17 @@ public static ContainerCommandResponseProto 
getReadChunkResponse(
   }
 
   public static ContainerCommandResponseProto getReadBlockResponse(
-      ContainerCommandRequestProto request, ChecksumData checksumData, 
ByteBuffer data, long offset) {
+      ContainerCommandRequestProto request, ChecksumData checksumData,
+      ByteBuffer data, long offset, List<ChunkInfo> chunkInfoList, boolean 
verifyChecksum) {
 
-    ContainerProtos.ReadBlockResponseProto response = 
ContainerProtos.ReadBlockResponseProto.newBuilder()
+    ContainerProtos.ReadBlockResponseProto response = 
ReadBlockResponseProto.newBuilder()
         .setChecksumData(checksumData.getProtoBufMessage())
         .setData(ByteString.copyFrom(data))
         .setOffset(offset)
+        
.setChunkInfoList(ChunkInfoList.newBuilder().addAllChunks(chunkInfoList).build())
         .build();

Review Comment:
   The response size concern is valid, but verifyChecksum would not work here. 
In prod, `readBlock()` always calls `readBlockImpl(..., false)` because that 
param controls datanode side verification, whereas client-side checksum 
verification is enabled independently. Gating chunkInfoList on this parameter 
would therefore omit the metadata from production responses.
   
   We need either an explicit request capability or only the chunk metadata 
overlapping each response, with the client using absolute `ChunkInfo.offset` 
values.



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