Zhang Quanjin created HBASE-19153:
-------------------------------------
Summary: LruBlockCache cache too big blocks logic error
Key: HBASE-19153
URL: https://issues.apache.org/jira/browse/HBASE-19153
Project: HBase
Issue Type: Bug
Components: BlockCache
Affects Versions: 2.0.0-alpha-3
Reporter: Zhang Quanjin
The latest version of LruBolckCache, I found the code logic of cache too big
bolcks is inconsistent with annotation.
If follow the notes, the code should look like this:
if (buf.heapSize() > maxBlockSize) {
// If there are a lot of blocks that are too
// big this can make the logs way too noisy.
// So we log 2%
if (stats.failInsert() % 50 != 0) {
return;
}
LOG.warn("Trying to cache too large a block "
+ cacheKey.getHfileName() + " @ "
+ cacheKey.getOffset()
+ " is " + buf.heapSize()
+ " which is larger than " + maxBlockSize);
}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)