ndimiduk commented on code in PR #6700:
URL: https://github.com/apache/hbase/pull/6700#discussion_r1991653614


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreEngine.java:
##########
@@ -229,12 +234,34 @@ public HStoreFile createStoreFileAndReader(StoreFileInfo 
info) throws IOExceptio
   /**
    * Validates a store file by opening and closing it. In HFileV2 this should 
not be an expensive
    * operation.
-   * @param path the path to the store file
+   * @param path         the path to the store file
+   * @param isCompaction whether this is called from the context of a 
compaction
    */
-  public void validateStoreFile(Path path) throws IOException {
+  public void validateStoreFile(Path path, boolean isCompaction) throws 
IOException {
     HStoreFile storeFile = null;
     try {
       storeFile = createStoreFileAndReader(path);
+      if (conf.getBoolean(READ_FULLY_ON_VALIDATE_KEY, 
DEFAULT_READ_FULLY_ON_VALIDATE)) {
+        if (storeFile.getFirstKey().isEmpty()) {
+          LOG.debug("'{}=true' but storefile does not contain any data. 
skipping validation.",
+            READ_FULLY_ON_VALIDATE_KEY);
+          return;
+        }
+        LOG.info("Validating the store file by reading the first cell from 
each block : {}", path);

Review Comment:
   Let me down-grade this to DEBUG.



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

Reply via email to