EungsopYoo commented on code in PR #7901:
URL: https://github.com/apache/hbase/pull/7901#discussion_r3327148185
##########
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:
Done — switched to `String encodedRegionName` to avoid the cyclic dependency
on `HRegion`.
Commit:
https://github.com/apache/hbase/pull/7901/commits/8ff2fd82a68f2799fff800bb9bd16b6468eeecbc
--
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]