HBase
  1. HBase
  2. HBASE-5121

MajorCompaction may affect scan's correctness

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 0.90.4
    • Fix Version/s: 0.92.1, 0.94.0
    • Component/s: regionserver
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      In our test, there are two families' keyvalue for one row.

      But we could find a infrequent problem when doing scan's next if majorCompaction happens concurrently.
      In the client's two continuous doing scan.next():
      1.First time, scan's next returns the result where family A is null.
      2.Second time, scan's next returns the result where family B is null.
      The two next()'s result have the same row.

      If there are more families, I think the scenario will be more strange...

      We find the reason is that storescanner.peek() is changed after majorCompaction if there are delete type KeyValue.
      This change causes the PriorityQueue<KeyValueScanner> of RegionScanner's heap is not sure to be sorted.

      1. 5121-0.92.txt
        7 kB
        Lars Hofhansl
      2. 5121-suggest.txt
        7 kB
        Lars Hofhansl
      3. 5121.90
        8 kB
        Ted Yu
      4. 5121-trunk-combined.txt
        9 kB
        Ted Yu
      5. hbase-5121-testcase.patch
        4 kB
        chunhui shen
      6. hbase-5121v2.patch
        3 kB
        chunhui shen
      7. hbase-5121.patch
        4 kB
        chunhui shen

        Issue Links

          Activity

            People

            • Assignee:
              chunhui shen
              Reporter:
              chunhui shen
            • Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development