You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2022/07/16 12:55:14 UTC
[GitHub] [hbase] bbeaudreault commented on a diff in pull request #4610: HBASE-27053 IOException during caching of uncompressed block to the block cache
bbeaudreault commented on code in PR #4610:
URL: https://github.com/apache/hbase/pull/4610#discussion_r922677265
##########
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.duplicate().limit(sizeWithoutChecksum);
Review Comment:
Thanks for reviewing and good catch. I just pushed a fix for that. I also added a few more assertions to my new test
--
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@hbase.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org