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

ExploringCompactionPolicy logic around file selection is broken

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Invalid
    • None
    • None
    • None
    • None

    Description

      It seems that logic around selection of store file candidates is broken:

              // Compute the total size of files that will
              // have to be read if this set of files is compacted.
              long size = getTotalStoreSize(potentialMatchFiles);
              // Store the smallest set of files.  This stored set of files will be used
              // if it looks like the algorithm is stuck.
              if (mightBeStuck && size < smallestSize) {
                smallest = potentialMatchFiles;
                smallestSize = size;
              }
              if (size > comConf.getMaxCompactSize()) {
                continue;
              }
      
              ++opts;
              if (size >= comConf.getMinCompactSize()
                  && !filesInRatio(potentialMatchFiles, currentRatio)) {
                continue;
              }
      

      This is from applyCompactionPolicy method. As you can see, both min compaction size and max compaction size are applied to a selection of files and not to individual files. It mostly works as expected only because nobody seems using non-default hbase.hstore.compaction.max.size, which is Long.MAX_VALUE and it is not that easy to figure out what is going on on an opposite side (why small files do not get included?)

      Attachments

        1. HBASE-14263.patch
          1 kB
          Vladimir Rodionov

        Issue Links

          Activity

            People

              Unassigned Unassigned
              vrodionov Vladimir Rodionov
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: