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

requestCompaction priority argument is not used (except for user compaction check)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • None
    • Compaction
    • None

    Description

      In some places, like major compaction chore or requesting interface for coproc, we pass priority value to requestCompaction.
      Checking the code in trunk and old code in 94, I see that neither uses this value properly; first, they check it for being user-level. Then they do this:

              // everything went better than expected. create a compaction request
              int pri = getCompactPriority(priority);
              ret = new CompactionRequest(region, this, filesToCompact, isMajor, pri);
      

      getPriority does:

          // If this is a user-requested compaction, leave this at the highest priority
          if(priority == PRIORITY_USER) {
            return PRIORITY_USER;
          } else {
            return this.blockingStoreFileCount - this.storefiles.size();
          }
      

      , so non-user caller value is just thrown away. Probably if it's not NO_PRIORITY, it needs to be used. Overall priority code needs cleanup.

      Attachments

        1. HBASE-7964-v0.patch
          10 kB
          Sergey Shelukhin
        2. HBASE-7964-v1.patch
          10 kB
          Sergey Shelukhin

        Issue Links

          Activity

            People

              sershe Sergey Shelukhin
              sershe Sergey Shelukhin
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: