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

          Lars Hofhansl made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Lars Hofhansl made changes -
          Link This issue relates to HBASE-5659 [ HBASE-5659 ]
          Lars Hofhansl made changes -
          Status Patch Available [ 10002 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Lars Hofhansl made changes -
          Attachment 5121-0.92.txt [ 12510123 ]
          Lars Hofhansl made changes -
          Fix Version/s 0.90.6 [ 12319200 ]
          Lars Hofhansl made changes -
          Attachment 5121-suggest.txt [ 12509823 ]
          Ted Yu made changes -
          Fix Version/s 0.92.1 [ 12318551 ]
          Fix Version/s 0.92.0 [ 12314223 ]
          Ted Yu made changes -
          Priority Major [ 3 ] Critical [ 2 ]
          Ted Yu made changes -
          Comment [ -1 overall. Here are the results of testing the latest attachment
            http://issues.apache.org/jira/secure/attachment/12509698/5121.90
            against trunk revision .

              +1 @author. The patch does not contain any @author tags.

              +1 tests included. The patch appears to include 3 new or modified tests.

              -1 patch. The patch command could not apply the patch.

          Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/687//console

          This message is automatically generated. ]
          Ted Yu made changes -
          Attachment 5121.90 [ 12509698 ]
          Nicolas Spiegelberg made changes -
          Link This issue relates to HBASE-2856 [ HBASE-2856 ]
          Ted Yu made changes -
          Attachment 5121-trunk-combined.txt [ 12509573 ]
          Ted Yu made changes -
          Hadoop Flags Reviewed [ 10343 ]
          Fix Version/s 0.92.0 [ 12314223 ]
          Fix Version/s 0.94.0 [ 12316419 ]
          Fix Version/s 0.90.6 [ 12319200 ]
          Affects Version/s 0.90.4 [ 12316406 ]
          Ted Yu made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          chunhui shen made changes -
          Attachment hbase-5121v2.patch [ 12509521 ]
          Attachment hbase-5121-testcase.patch [ 12509522 ]
          ramkrishna.s.vasudevan made changes -
          Assignee chunhui shen [ zjushch ]
          chunhui shen made changes -
          Field Original Value New Value
          Attachment hbase-5121.patch [ 12509381 ]
          chunhui shen created issue -

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development