You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "YutSean (via GitHub)" <gi...@apache.org> on 2023/08/17 05:03:42 UTC

[GitHub] [hbase] YutSean commented on a diff in pull request #5352: HBASE-26780 HFileBlock.verifyOnDiskSizeMatchesHeader throw IOException: Passed in onDiskSizeWithHeader= A != 33

YutSean commented on code in PR #5352:
URL: https://github.com/apache/hbase/pull/5352#discussion_r1296678491


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileBlock.java:
##########
@@ -1729,7 +1729,31 @@ protected HFileBlock readBlockDataInternal(FSDataInputStream is, long offset,
         }
         onDiskSizeWithHeader = getOnDiskSizeWithHeader(headerBuf, checksumSupport);
       }
-      int preReadHeaderSize = headerBuf == null ? 0 : hdrSize;
+      int preReadHeaderSize = 0;
+      if (
+        headerBuf == null
+          || headerBuf.getInt(Header.ON_DISK_SIZE_WITHOUT_HEADER_INDEX) != onDiskSizeWithHeader
+      ) {

Review Comment:
   The style is modified by spotless automatically after I ran spotless:apply
   



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