Apache9 commented on a change in pull request #209: HBASE-21070 Fix 
SnapshotFileCache for HBase backed by S3
URL: https://github.com/apache/hbase/pull/209#discussion_r280065288
 
 

 ##########
 File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/master/snapshot/SnapshotFileCache.java
 ##########
 @@ -214,49 +214,55 @@ public void triggerCacheRefreshForTesting() {
 
   private synchronized void refreshCache() throws IOException {
     // get the status of the snapshots directory and check if it is has changes
-    FileStatus dirStatus;
-    try {
-      dirStatus = fs.getFileStatus(snapshotDir);
-    } catch (FileNotFoundException e) {
-      if (this.cache.size() > 0) {
-        LOG.error("Snapshot directory: " + snapshotDir + " doesn't exist");
+    // We need to check the internal folder as Object Stores do not always 
update
+    // the parent directory's modification time.
+    FileStatus[] snapshotsOnDisk = FSUtils.listStatus(fs, snapshotDir);
 
 Review comment:
   Can we just filter out the .tmp directory here? So we do not need to treat 
it specially later.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to