bbeaudreault commented on code in PR #4610:
URL: https://github.com/apache/hbase/pull/4610#discussion_r922690924
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileBlock.java:
##########
@@ -1709,6 +1700,9 @@ protected HFileBlock
readBlockDataInternal(FSDataInputStream is, long offset,
if (verifyChecksum && !validateChecksum(offset, curBlock, hdrSize)) {
return null;
}
+ // remove checksum from buffer now that it's verified
+ int sizeWithoutChecksum =
curBlock.getInt(Header.ON_DISK_DATA_SIZE_WITH_HEADER_INDEX);
+ curBlock = curBlock.limit(sizeWithoutChecksum);
Review Comment:
ok. I personally prefer to use the returned value in cases like this, in
case the implementation changes. but i'm happy to not do that if it's more
generally preferred. i just pushed a change to remove that.
--
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]