Uploaded image for project: 'Ratis'
  1. Ratis
  2. RATIS-1677

Do not auto format RaftStorage in RECOVER

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.0.0
    • server
    • None

    Description

      A server should never create a new directory unless RaftStorage.StartupOption.FORMAT is specified. Otherwise, it will cause data loss since the raft log committed in that server is (temporarily) lost. Consider the following

      1. Server A and Server B were fast and had commit index 100 while server C had commit index 90.
      2. The disk of Server A was bad and it was restarted with RECOVER. Since it cannot access its directory in the bad disk, it created a new directory in another disk. Then, its commit index was reset and became -1.
      3. Server C started a leader election and Server A voted for it. The commit index became 90 – it lost the commits from index 91 to index 100.

      Attachments

        Issue Links

        Activity

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

          People

            szetszwo Tsz-wo Sze
            szetszwo Tsz-wo Sze
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 3h 20m
                3h 20m

                Slack

                  Issue deployment