Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-19153

LruBlockCache cache too big blocks logic error

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Trivial
    • Resolution: Not A Bug
    • 2.0.0-alpha-3
    • None
    • BlockCache
    • None

    Description

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

      }

      Attachments

        Activity

          People

            Unassigned Unassigned
            zhangquanjin Zhang Quanjin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: