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

LruBlockCache cache too big blocks logic error

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Trivial
    • Resolution: Not A Bug
    • Affects Version/s: 2.0.0-alpha-3
    • Fix Version/s: None
    • Component/s: BlockCache
    • Labels:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: