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

Major compact should be done when there is only one storefile and some keyvalue is outdated.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.90.0, 0.90.1
    • 0.90.2
    • regionserver
    • None
    • Reviewed

    Description

      In the function store.isMajorCompaction:
      if (filesToCompact.size() == 1) {
      // Single file
      StoreFile sf = filesToCompact.get(0);
      long oldest =
      (sf.getReader().timeRangeTracker == null) ?
      Long.MIN_VALUE :
      now - sf.getReader().timeRangeTracker.minimumTimestamp;
      if (sf.isMajorCompaction() &&
      (this.ttl == HConstants.FOREVER || oldest < this.ttl)) {
      if (LOG.isDebugEnabled())

      { LOG.debug("Skipping major compaction of " + this.storeNameStr + " because one (major) compacted file only and oldestTime " + oldest + "ms is < ttl=" + this.ttl); }

      }
      } else {
      When there is only one storefile in the store, and some keyvalues' TTL are overtime, the majorcompactchecker should send this region to the compactquene and run a majorcompact to clean these outdated data. But according to the code in 0.90.1, it will do nothing.

      Attachments

        1. hbase-3723.txt
          0.8 kB
          zhoushuaifeng

        Activity

          People

            zhoushuaifeng zhoushuaifeng
            zhoushuaifeng zhoushuaifeng
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: