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

Data missing while scanning using PREFIX_TREE data block encoding

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.98.9
    • 1.0.0, 0.98.10, 1.1.0
    • Scanners
    • None
    • Reviewed

    Description

      write a testcase like this

        @Test
        public void test() throws IOException {
          for (int i = 0; i < 100; i++) {
            region.put(new Put(Bytes.toBytes("obj" + (2900 + i))).add(fam, qual1, Bytes.toBytes(i)));
          }
          region.put(new Put(Bytes.toBytes("obj299")).add(fam, qual1, Bytes.toBytes("whatever")));
          region.put(new Put(Bytes.toBytes("obj29")).add(fam, qual1, Bytes.toBytes("whatever")));
          region.put(new Put(Bytes.toBytes("obj2")).add(fam, qual1, Bytes.toBytes("whatever")));
          region.put(new Put(Bytes.toBytes("obj3")).add(fam, qual1, Bytes.toBytes("whatever")));
          region.flushcache(true);
          Scan scan = new Scan(Bytes.toBytes("obj29995"));
          RegionScanner scanner = region.getScanner(scan);
          List<Cell> cells = new ArrayList<Cell>();
          assertFalse(scanner.next(cells));
          assertArrayEquals(Bytes.toBytes("obj3"), Result.create(cells).getRow());
        }
      

      use obj29995 to scan should return obj3, but obj2990 is returned.

      Seems a bug introduced by the fix of HBASE-11728.

      Attachments

        1. HBASE-12817_1.patch
          3 kB
          Duo Zhang
        2. HBASE-12817.patch
          17 kB
          Duo Zhang
        3. HBASE-12817-0.98.patch
          16 kB
          Duo Zhang
        4. HBASE-12817-branch-1.patch
          17 kB
          Duo Zhang

        Activity

          People

            zhangduo Duo Zhang
            zhangduo Duo Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: