You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "rich7420 (via GitHub)" <gi...@apache.org> on 2026/09/30 09:34:26 UTC

Re: [PR] HDDS-16258. Refactor streaming block reads and fix checksum verification for variable-sized chunks [ozone]

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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org