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

Region is on service before openRegionHandler completes, may cause data loss

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.92.0, 0.94.0
    • 0.92.0
    • None
    • None
    • Reviewed

    Description

      OpenRegionHandler in regionserver is processed as the following steps:

      1.openregion()(Through it, closed = false, closing = false)
      2.addToOnlineRegions(region)
      3.update .meta. table 
      4.update ZK's node state to RS_ZK_REGION_OPEND
      

      We can find that region is on service before Step 4.
      It means client could put data to this region after step 3.
      What will happen if step 4 is failed processing?
      It will execute OpenRegionHandler#cleanupFailedOpen which will do closing region, and master assign this region to another regionserver.
      If closing region is failed, the data which is put between step 3 and step 4 may loss, because the region has been opend on another regionserver and be put new data. Therefore, it may not be recoverd through replayRecoveredEdit() because the edit's LogSeqId is smaller than current region SeqId.

      Attachments

        1. hbase-4880.patch
          3 kB
          Chunhui Shen
        2. hbase-4880v2.patch
          10 kB
          Chunhui Shen
        3. hbase-4880v3.patch
          10 kB
          Chunhui Shen
        4. 4880.txt
          10 kB
          Ted Yu
        5. hbase-4880v4.patch
          10 kB
          Chunhui Shen
        6. 4880-0.92.txt
          8 kB
          Michael Stack

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment