wchevreuil commented on code in PR #7901:
URL: https://github.com/apache/hbase/pull/7901#discussion_r3319037711


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java:
##########
@@ -2003,6 +2014,22 @@ public Pair<byte[], Collection<HStoreFile>> call() 
throws IOException {
     }
   }
 
+  private void evictRowCache() {
+    boolean evictOnClose = 
getReadOnlyConfiguration().getBoolean(ROW_CACHE_EVICT_ON_CLOSE_KEY,
+      ROW_CACHE_EVICT_ON_CLOSE_DEFAULT);
+
+    if (!evictOnClose) {
+      return;
+    }
+
+    if (!(rsServices instanceof HRegionServer regionServer)) {
+      return;
+    }
+
+    RowCache rowCache = 
regionServer.getRSRpcServices().getServer().getRowCache();
+    rowCache.evictRowsByRegion(this);

Review Comment:
   Can we avoid cyclic dependency by changing evictRowsByRegion signature to 
accept the encodedRegionName instead?



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