[
https://issues.apache.org/jira/browse/RATIS-1879?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17760411#comment-17760411
]
Tsz-wo Sze commented on RATIS-1879:
-----------------------------------
{quote}... Raft requires that any log, once the appendLog function is called,
should be persisted, even if it hasn't been committed yet. This is to avoid
potential problems like the one described in the Figure 8 corner case, ...
{quote}
Should it be "once the appendLog function is completed"?
{quote}... log corruption may only lead to lost of uncommitted data which is
okay.
{quote}
Sorry that I might have chosen a wrong word. I should have said "unflushed" or
"unpersisted" instead of "uncommitted". I mean writing a log entry is a
process,. It can fail in the middle no matter how we write it. As long as we
don't increase the index until the write is completed. We are fine.
{quote}... whether some actions should be taken during the raftlog recovery
phase to enable the cluster to start. Alternatively, it might be worth
considering the addition of a "raftlog repair" tool to fix damaged log files.
Both approaches share the ultimate goal of getting the cluster up and running
again to continue providing services.
{quote}
Agree. We should have some way to fix a corrupted log.
> Handle RaftLog corruption when unsafe flush is enabled.
> -------------------------------------------------------
>
> Key: RATIS-1879
> URL: https://issues.apache.org/jira/browse/RATIS-1879
> Project: Ratis
> Issue Type: Bug
> Components: server
> Affects Versions: 3.0.0, 2.5.1
> Reporter: Song Ziyang
> Assignee: Tsz-wo Sze
> Priority: Major
> Time Spent: 10m
> Remaining Estimate: 0h
>
> During normal operations of the RaftServer, its containing virtual machine
> (VM) was unexpectedly shut down and subsequently restarted. Following the VM
> reboot, *our attempts to restart the RaftServer led to encountering the
> subsequent exception, indicating corruption in the Raft* {*}Log{*}{*}.{*}
> *The details of this exception please refer to
> [https://apache-iotdb.feishu.cn/docx/Zmyudq0FYoDVcsxDwHpcINyznfg]*
--
This message was sent by Atlassian Jira
(v8.20.10#820010)