yandrey321 commented on code in PR #10764:
URL: https://github.com/apache/ozone/pull/10764#discussion_r3763154336
##########
hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/storage/StreamBlockInputStream.java:
##########
@@ -532,10 +534,14 @@ public void
onNext(ContainerProtos.ContainerCommandResponseProto containerComman
ByteBuffer data = readBlock.getData().asReadOnlyByteBuffer();
if (verifyChecksum) {
ChecksumData checksumData =
ChecksumData.getFromProtoBuf(readBlock.getChecksumData());
- Checksum.verifyChecksum(data, checksumData, 0);
+ if (readBlock.hasChunkInfoList()) {
+ verifyChecksumForReadBlock(data, checksumData, readBlock);
+ } else {
Review Comment:
optional chunkInfoList keeps the wire compatible, but throwing when it's
absent is not upgrade-compatible: a new client reading from an old datanode
gets a hard failure on every streaming read. Please fall back to the previous
verification path (or gate on datanode version) when chunkInfoList is missing.
--
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]