bbeaudreault commented on code in PR #5384:
URL: https://github.com/apache/hbase/pull/5384#discussion_r1321548711


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileBlock.java:
##########
@@ -1667,7 +1688,11 @@ protected HFileBlock 
readBlockDataInternal(FSDataInputStream is, long offset,
       final AttributesBuilder attributesBuilder = Attributes.builder();
       Optional.of(Context.current()).map(val -> val.get(CONTEXT_KEY))
         .ifPresent(c -> c.accept(attributesBuilder));
-      int onDiskSizeWithHeader = checkAndGetSizeAsInt(onDiskSizeWithHeaderL, 
hdrSize);
+      if (!checkOnDiskSizeWithHeader(onDiskSizeWithHeaderL)) {

Review Comment:
   That's fair, but also I think it might be more error prone (both to code and 
review) to try to bandaid it on since we all have to keep a few different code 
paths in mind. Like how we need to add another call to 
checkOnDiskSizeWithHeader for the cached header case.  It might seem slightly 
more invasive to do a reorganization of the code path in this method, but it 
also seems the least risky option imo. Hopefully it can backport cleanly since 
this file is not a hotspot for modifications. Looking at the git history, I 
think your tracing/span stuff might be biggest blocker for 2.4



-- 
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-unsubscr...@hbase.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to