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

ArrayIndexOutOfBounds during the majorCompactionCheck in DateTieredCompaction

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 0.98.20
    • 1.3.0, 0.98.23, 2.0.0
    • Compaction
    • None
    • Reviewed
    • "Please do not use DateTieredCompaction with Major Compaction unless you have a version with this. Otherwise your cluster will not compact any store files and you can end up running out of file descriptors." @churro morales

    Description

      We get an ArrayIndexOutOfBoundsException during the major compaction check as follows

      2016-09-19 05:04:18,287 ERROR [20.compactionChecker] regionserver.HRegionServer$CompactionChecker - Caught exception
      java.lang.ArrayIndexOutOfBoundsException: -2
              at org.apache.hadoop.hbase.regionserver.compactions.DateTieredCompactionPolicy.shouldPerformMajorCompaction(DateTieredCompactionPolicy.java:159)
              at org.apache.hadoop.hbase.regionserver.HStore.isMajorCompaction(HStore.java:1412)
              at org.apache.hadoop.hbase.regionserver.HRegionServer$CompactionChecker.chore(HRegionServer.java:1532)
              at org.apache.hadoop.hbase.Chore.run(Chore.java:80)
              at java.lang.Thread.run(Thread.java:745)
      

      This happens due to the following lines in org.apache.hadoop.hbase.regionserver.compactions.DateTieredCompactionPolicy.selectMajorCompaction

      int lowerWindowIndex = Collections.binarySearch(boundaries,
              minTimestamp == null ? Long.MAX_VALUE : file.getMinimumTimestamp());
            int upperWindowIndex = Collections.binarySearch(boundaries,
              file.getMaximumTimestamp() == null ? Long.MAX_VALUE : file.getMaximumTimestamp());
      

      These return negative values if the element is not found and in the case the values are equal we get the exception.

      Attachments

        1. HBASE-16660.master.001.patch
          3 kB
          Abhishek Singh Chouhan
        2. HBASE-16660.master.001.patch
          3 kB
          Abhishek Singh Chouhan
        3. HBASE-16660-0.98.patch
          3 kB
          Abhishek Singh Chouhan

        Activity

          People

            abhishek.chouhan Abhishek Singh Chouhan
            abhishek.chouhan Abhishek Singh Chouhan
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: