Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doc: add FAQ: can not survive incorrectly configured cluster #919

Merged
merged 1 commit into from
Oct 29, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 25 additions & 1 deletion openraft/src/docs/faq/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<br/><br/>


- **🤔 Can I wipe out the data of **one** node and wait for the leader to replicate all data to it again**?
- **🤔 Can I wipe out the data of ONE node and wait for the leader to replicate all data to it again**?

💡 Avoid doing this. Doing so will panic the leader. But it is permitted
if [`loosen-follower-log-revert`] feature flag is enabled.
Expand Down Expand Up @@ -49,4 +49,28 @@
<br/><br/>


- **🤔 Is Openraft resilient to incorrectly configured clusters?**

💡 No, Openraft, like standard raft, cannot identify errors in cluster configuration.

A common error is the assigning a wrong network addresses to a node. In such
a scenario, if this node becomes the leader, it will attempt to replicate
logs to itself. This will cause Openraft to panic because replication
messages can only be received by a follower.

```text
thread 'main' panicked at openraft/src/engine/engine_impl.rs:793:9:
assertion failed: self.internal_server_state.is_following()
```

```ignore
// openraft/src/engine/engine_impl.rs:793
pub(crate) fn following_handler(&mut self) -> FollowingHandler<C> {
debug_assert!(self.internal_server_state.is_following());
// ...
}
```

<br/><br/>

[`loosen-follower-log-revert`]: `crate::docs::feature_flags#loosen_follower_log_revert`
Loading