You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ratis.apache.org by "Tsz-wo Sze (Jira)" <ji...@apache.org> on 2022/08/17 17:20:00 UTC
[jira] [Updated] (RATIS-1677) Do not auto format RaftStorage in RECOVER
[ https://issues.apache.org/jira/browse/RATIS-1677?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tsz-wo Sze updated RATIS-1677:
------------------------------
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
# 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.
> 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
>
> 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)