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_r280063882
 
 

 ##########
 File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/master/snapshot/SnapshotFileCache.java
 ##########
 @@ -89,12 +88,13 @@
   private final FileSystem fs;
   private final SnapshotFileInspector fileInspector;
   private final Path snapshotDir;
-  private final Set<String> cache = new HashSet<>();
+  private Set<String> cache = new HashSet<String>();
   /**
    * This is a helper map of information about the snapshot directories so we 
don't need to rescan
    * them if they haven't changed since the last time we looked.
    */
-  private final Map<String, SnapshotDirectoryInfo> snapshots = new HashMap<>();
+  private volatile Map<String, SnapshotDirectoryInfo> snapshots =
 
 Review comment:
   Please align the modifiers of this field and the above cache field? Why only 
snapshots is volatile but the above cache is not?

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