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

 ##########
 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:
   Data file can be large, since it is out-of-date and can't be restore, i'm 
fine with the deletion. Being kept is also good to me, only a matter of 
overwrite again.

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