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

BloomContext#sanityCheck may failed when use ROWPREFIX_DELIMITED bloom filter

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.0.0-alpha-1, 2.2.0, 2.3.0
    • None
    • None
    • Remove bloom filter type ROWPREFIX_DELIMITED. May add it back when find a better solution.

    Description

      Assume we use '5' as the delimiter, there are rowkeys: row1 is smaller than row2

      row1: 12345xxx
      row2: 1235xxxx

      When use ROWPREFIX_DELIMITED bloom filter, the rowkey write to bloom filter are

      row1's key for bloom filter: 1234
      row2's key for bloom fitler: 123

      The row1's key for bloom filter is bigger than row2. Then BloomContext#sanityCheck will failed.

      private void sanityCheck(Cell cell) throws IOException {
        if (this.getLastCell() != null) {
          LOG.debug("Current cell " + cell + ", prevCell = " + this.getLastCell());
          if (comparator.compare(cell, this.getLastCell()) <= 0) {
            throw new IOException("Added a key not lexically larger than" + " previous. Current cell = "
                + cell + ", prevCell = " + this.getLastCell());
          }
        }
      }
      

      Attachments

        1. HBASE-21922.master.001.patch
          16 kB
          Guanghao Zhang
        2. HBASE-21922.master.002.patch
          153 kB
          Guanghao Zhang
        3. HBASE-21922.master.003.patch
          95 kB
          Guanghao Zhang

        Issue Links

          Activity

            People

              zghao Guanghao Zhang
              zghao Guanghao Zhang
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: