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 08:25:33 UTC

[GitHub] [hbase] Apache9 commented on a diff in pull request #4610: HBASE-27053 IOException during caching of uncompressed block to the block cache

Apache9 commented on code in PR #4610:
URL: https://github.com/apache/hbase/pull/4610#discussion_r922651159


##########
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:
   Do we need to duplicate here? The old instance could be reference by others?



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