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

Splitting hlog and opening region concurrently may cause data loss

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 0.90.2
    • 0.90.5, 0.92.0
    • None
    • None
    • Reviewed

    Description

      Case Description:
      1.Split hlog thread creat writer for the file region A/recoverd.edits/123456 and is appending log entry
      2.Regionserver is opening region A now, and in the process replayRecoveredEditsIfAny() ,it will delete the file region A/recoverd.edits/123456
      3.Split hlog thread catches the io exception, and stop parse this log file
      and if skipError = true , add it to the corrupt logs....However, data in other regions in this log file will loss
      4.Or if skipError = false, it will check filesystem.Of course, the file system is ok , and it only prints a error log, continue assigning regions. Therefore, data in other log files will also loss!!

      The case may happen in the following:
      1.Move region from server A to server B
      2.kill server A and Server B
      3.restart server A and Server B

      We could prevent this exception throuth forbiding deleting recover.edits file
      which is appending by split hlog thread

      Attachments

        1. 4862-0.92.txt
          9 kB
          Ted Yu
        2. hbase-4862v7fortrunk.patch
          10 kB
          Chunhui Shen
        3. hbase-4862v7for0.90.patch
          9 kB
          Chunhui Shen
        4. 4862-v6-trunk.patch
          10 kB
          Ted Yu
        5. 4862-v6-90.txt
          9 kB
          Ted Yu
        6. hbase-4862v5fortrunk.diff
          9 kB
          Chunhui Shen
        7. hbase-4862v5for0.90.diff
          9 kB
          Chunhui Shen
        8. hbase-4862v3fortrunk.diff
          4 kB
          Chunhui Shen
        9. hbase-4862v3for0.90.diff
          4 kB
          Chunhui Shen
        10. hbase-4862v2fortrunk.diff
          4 kB
          Chunhui Shen
        11. hbase-4862v2for0.90.diff
          4 kB
          Chunhui Shen
        12. hbase-4862v1 for trunk.diff
          4 kB
          Chunhui Shen
        13. hbase-4862v1 for 0.90.diff
          4 kB
          Chunhui Shen
        14. 4862.txt
          4 kB
          Ted Yu
        15. hbase-4862v1 for trunk.diff
          4 kB
          Chunhui Shen
        16. hbase-4862v1 for 0.90.diff
          4 kB
          Chunhui Shen
        17. 4862.patch
          5 kB
          Chunhui Shen

        Activity

          People

            zjushch Chunhui Shen
            zjushch Chunhui Shen
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: