You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by "Zhang Quanjin (JIRA)" <ji...@apache.org> on 2017/11/03 01:11:00 UTC

[jira] [Resolved] (HBASE-19153) LruBlockCache cache too big blocks logic error

     [ https://issues.apache.org/jira/browse/HBASE-19153?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Zhang Quanjin resolved HBASE-19153.
-----------------------------------
    Resolution: Not A Bug

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