You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2021/05/21 06:02:00 UTC

[GitHub] [hbase] sunhelly commented on a change in pull request #3280: HBASE-25899 Improve efficiency of SnapshotHFileCleaner

sunhelly commented on a change in pull request #3280:
URL: https://github.com/apache/hbase/pull/3280#discussion_r636656646



##########
File path: hbase-server/src/main/java/org/apache/hadoop/hbase/master/snapshot/SnapshotFileCache.java
##########
@@ -226,7 +226,7 @@ public synchronized void triggerCacheRefreshForTesting() {
     return unReferencedFiles;
   }
 
-  private void refreshCache() throws IOException {
+  private synchronized void refreshCache() throws IOException {

Review comment:
       This method is also called in getUnreferencedFiles, which is used in concurrently checking deletable files. I kept the synchronize in RefreshCacheTask, because it will clear the cache when encountered exception. But when in getUnreferencedFiles the exception should throw out.




-- 
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:
users@infra.apache.org