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

restore_snapshot is broken in master branch when region splits

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.0.0, 2.2.0, 2.3.0, 2.0.6, 2.1.6
    • Component/s: snapshots
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      When I was investigating HBASE-19850, I found restore_snapshot didn't work in master branch.

       

      Steps to reproduce are as follows:

      1. Create a table

      create "test", "cf"
      

      2. Load data (2000 rows) to the table

      (0...2000).each{|i| put "test", "row#{i}", "cf:col", "val"}
      

      3. Split the table

      split "test"
      

      4. Take a snapshot

      snapshot "test", "snap"
      

      5. Load more data (2000 rows) to the table and split the table agin

      (2000...4000).each{|i| put "test", "row#{i}", "cf:col", "val"}
      split "test"
      

      6. Restore the table from the snapshot 

      disable "test"
      restore_snapshot "snap"
      enable "test"
      

      7. Scan the table

      scan "test"
      

      However, this scan returns only 244 rows (it should return 2000 rows) like the following:

      hbase(main):038:0> scan "test"
      ROW COLUMN+CELL
       row78 column=cf:col, timestamp=1517298307049, value=val
      ....
        row999 column=cf:col, timestamp=1517298307608, value=val
      244 row(s)
      Took 0.1500 seconds
      

       

      Also, the restored table should have 2 online regions but it has 3 online regions.

       

        Attachments

        1. 19893.master.004.patch
          17 kB
          Toshihiro Suzuki
        2. 19893.master.004.patch
          17 kB
          Toshihiro Suzuki
        3. 19893.master.004.patch
          17 kB
          Ted Yu
        4. HBASE-19893.master.001.patch
          12 kB
          Toshihiro Suzuki
        5. HBASE-19893.master.002.patch
          12 kB
          Toshihiro Suzuki
        6. HBASE-19893.master.003.patch
          16 kB
          Toshihiro Suzuki
        7. HBASE-19893.master.003.patch
          16 kB
          Toshihiro Suzuki
        8. HBASE-19893.master.004.patch
          17 kB
          Toshihiro Suzuki
        9. HBASE-19893.master.005.patch
          17 kB
          Toshihiro Suzuki
        10. HBASE-19893.master.005.patch
          17 kB
          Toshihiro Suzuki
        11. HBASE-19893.master.005.patch
          17 kB
          Toshihiro Suzuki
        12. HBASE-19893.master.006.patch
          17 kB
          Toshihiro Suzuki
        13. org.apache.hadoop.hbase.client.TestRestoreSnapshotFromClientWithRegionReplicas-output.txt
          12.42 MB
          Toshihiro Suzuki

          Issue Links

            Activity

              People

              • Assignee:
                brfrn169 Toshihiro Suzuki
                Reporter:
                brfrn169 Toshihiro Suzuki
              • Votes:
                0 Vote for this issue
                Watchers:
                11 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: