Skip to content

Commit

Permalink
Merge pull request #919 from drmingdrmer/45-doc
Browse files Browse the repository at this point in the history
Doc: add FAQ: can not survive incorrectly configured cluster
  • Loading branch information
drmingdrmer authored Oct 29, 2023
2 parents 0f39431 + eb7b62a commit e8bdd60
Showing 1 changed file with 25 additions and 1 deletion.
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`

0 comments on commit e8bdd60

Please sign in to comment.