pustota2009 commented on a change in pull request #1257:
URL: https://github.com/apache/hbase/pull/1257#discussion_r436528889
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/LruBlockCache.java
##########
@@ -947,7 +1019,47 @@ public void run() {
}
LruBlockCache cache = this.cache.get();
if (cache == null) break;
- cache.evict();
+ bytesFreed = cache.evict();
+ long stopTime = System.currentTimeMillis();
+ // If heavy cleaning BlockCache control.
+ // It helps avoid put too many blocks into BlockCache
+ // when evict() works very active.
+ if (stopTime - startTime <= 1000 * 10 - 1) {
Review comment:
10s because this is into synchronized section above:
this.wait(1000 * 10/*Don't wait for ever*/);
The eviction can start sometimes more often sometimes rarely. This section
helps lead to a similar period. Provided more details into comments.
----------------------------------------------------------------
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]