VladRodionov commented on code in PR #8801:
URL: https://github.com/apache/hbase/pull/8801#discussion_r4405228632


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java:
##########
@@ -1716,20 +1715,9 @@ public Map<byte[], List<HStoreFile>> close(boolean 
abort, boolean ignoreStatus,
     try {
       synchronized (closeLock) {
         if (isGracefulStop && rsServices != null) {
-          rsServices.getBlockCache().ifPresent(blockCache -> {
-            if (blockCache instanceof CombinedBlockCache) {
-              BlockCache l2 = ((CombinedBlockCache) 
blockCache).getSecondLevelCache();
-              if (l2 instanceof BucketCache) {
-                if (((BucketCache) l2).isCachePersistenceEnabled()) {
-                  LOG.info(
-                    "Closing region {} during a graceful stop, and cache 
persistence is on, "
-                      + "so setting evict on close to false. ",
-                    this.getRegionInfo().getRegionNameAsString());
-                  this.getStores().forEach(s -> 
s.getCacheConfig().setEvictOnClose(false));
-                }
-              }
-            }
-          });
+          LOG.info("Closing region {} during a graceful stop, so setting evict 
on close to false.",
+            this.getRegionInfo().getRegionNameAsString());
+          this.getStores().forEach(s -> 
s.getCacheConfig().setEvictOnClose(false));
         }
         return doClose(abort, status);
       }

Review Comment:
   Fixed



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to