diff --git a/openraft/src/docs/faq/faq-toc.md b/openraft/src/docs/faq/faq-toc.md index cfc144861..b9c3e358e 100644 --- a/openraft/src/docs/faq/faq-toc.md +++ b/openraft/src/docs/faq/faq-toc.md @@ -2,6 +2,8 @@ * [What are the differences between Openraft and standard Raft?](#what-are-the-differences-between-openraft-and-standard-raft) - [Data structure](#data-structure) * [Why is log id a tuple of `(term, node_id, log_index)`?](#why-is-log-id-a-tuple-of-term-node_id-log_index) +- [Replication](#replication) + * [How to minimize error logging when a follower is offline](#how-to-minimize-error-logging-when-a-follower-is-offline) - [Cluster management](#cluster-management) * [How to initialize a cluster?](#how-to-initialize-a-cluster) * [Are there any issues with running a single node service?](#are-there-any-issues-with-running-a-single-node-service) diff --git a/openraft/src/docs/faq/faq.md b/openraft/src/docs/faq/faq.md index d4b44ef6d..453b24ee2 100644 --- a/openraft/src/docs/faq/faq.md +++ b/openraft/src/docs/faq/faq.md @@ -21,6 +21,13 @@ This way in every term there could be more than one leaders elected, and the las See: [`leader-id`](`crate::docs::data::leader_id`) for details. +## Replication + + +### How to minimize error logging when a follower is offline + +Excessive error logging, like `ERROR openraft::replication: 248: RPCError err=NetworkError: ...`, occurs when a follower node becomes unresponsive. To alleviate this, implement a mechanism within [`RaftNetwork`][] that returns a [`Unreachable`][] error instead of a [`NetworkError`][] when immediate replication retries to the affected node are not advised. + ## Cluster management @@ -137,7 +144,14 @@ pub(crate) fn following_handler(&mut self) -> FollowingHandler { [`RaftLogStorage::save_committed()`]: `crate::storage::RaftLogStorage::save_committed` +[`RaftNetwork`]: `crate::network::RaftNetwork` + [`add_learner()`]: `crate::Raft::add_learner` [`change_membership()`]: `crate::Raft::change_membership` [`Membership`]: `crate::Membership` + +[`Unreachable`]: `crate::error::Unreachable` +[`NetworkError`]: `crate::error::NetworkError` + +