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


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/master/cleaner/HFileLinkCleaner.java:
##########
@@ -79,7 +79,17 @@ public boolean isFileDeletable(FileStatus fStat) {
           }
           hfilePath =
             
HFileLink.getHFileFromBackReference(CommonFSUtils.getRootDir(getConf()), 
filePath);
-          return !fs.exists(hfilePath);
+          if (fs.exists(hfilePath)) {
+            return false;
+          }
+          // Also protect HFileLink Reference files created by
+          // RestoreSnapshotHelper.restoreReferenceFile(). These are named
+          // <hfileLinkName>.<encodedRegion> and live in the same directory as 
the
+          // zero-byte HFileLink. The zero-byte file does not exist (only the 
Reference

Review Comment:
   'The zero-byte file does not exist', mind explaining more about this? I do 
not fully understand...



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