ZhaoBQ commented on a change in pull request #633: HBASE-22890 Verify the file 
integrity in persistent IOEngine
URL: https://github.com/apache/hbase/pull/633#discussion_r325987545
 
 

 ##########
 File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java
 ##########
 @@ -288,14 +302,17 @@ public BucketCache(String ioEngineName, long capacity, 
int blockSize, int[] buck
     this.ramCache = new ConcurrentHashMap<BlockCacheKey, RAMQueueEntry>();
 
     this.backingMap = new ConcurrentHashMap<BlockCacheKey, BucketEntry>((int) 
blockNumCapacity);
-
-    if (ioEngine.isPersistent() && persistencePath != null) {
+    if (ioEngine.isPersistent()) {
       try {
-        retrieveFromFile(bucketSizes);
+        if (persistencePath != null) {
+          retrieveFromFile(bucketSizes);
+        } else {
+          ((PersistentIOEngine) ioEngine).deleteCacheDataFile();
 
 Review comment:
   Do not delete data file does not affect the function, but it will occupy 
storage space.

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