[
https://issues.apache.org/jira/browse/RATIS-1677?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Tsz-wo Sze resolved RATIS-1677.
-------------------------------
Fix Version/s: 3.0.0
Resolution: Fixed
The pull request is now merged.
> Do not auto format RaftStorage in RECOVER
> -----------------------------------------
>
> Key: RATIS-1677
> URL: https://issues.apache.org/jira/browse/RATIS-1677
> Project: Ratis
> Issue Type: Improvement
> Components: server
> Reporter: Tsz-wo Sze
> Assignee: Tsz-wo Sze
> Priority: Major
> Fix For: 3.0.0
>
> Time Spent: 1h 10m
> Remaining Estimate: 0h
>
> 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
> # Server A and Server B were fast and had commit index 100 while server C had
> commit index 90.
> # 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.
> # 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.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)