rich7420 commented on code in PR #11302:
URL: https://github.com/apache/ozone/pull/11302#discussion_r4143100426


##########
hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/storage/StreamBlockInputStream.java:
##########
@@ -585,8 +584,7 @@ public void 
onNext(ContainerProtos.ContainerCommandResponseProto containerComman
       try {
         ByteBuffer data = readBlock.getData().asReadOnlyByteBuffer();
         if (verifyChecksum) {
-          ChecksumData checksumData = 
ChecksumData.getFromProtoBuf(readBlock.getChecksumData());
-          Checksum.verifyChecksum(data, checksumData, 0);
+          Checksum.validateChecksums(data, readBlock.getOffset(), 0, 
readBlock.getChunkInfoListList());

Review Comment:
   Would a new `DatanodeVersion` for this response format let us reuse 
`allDataNodesSupportStreamBlock()` to select `BlockInputStream` for older 
datanodes at stream creation? This would avoid retaining the legacy checksum 
verifier. The old-client/new-datanode case would still need the agreed release 
note.



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