-
Notifications
You must be signed in to change notification settings - Fork 157
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature: add backoff strategy for unreachable nodes
Implements a backoff strategy for temporarily or permanently unreachable nodes. If the `Network` implementation returns `Unreachable` error, Openraft will backoff for a while before sending next RPC to this target. This mechanism prevents error logging flood. Adds a new method `backoff()` to `RaftNetwork` to let an application return a customized backoff policy, the default provided backoff just constantly sleep 500ms. Adds an `unreachable_nodes` setting to the testing router `TypedRaftRouteryped` to emulate unreachable nodes. Add new error `Unreachable` and an `RPCError` variant `Unreachable`. - Fix: #462
- Loading branch information
1 parent
fa99e24
commit 229f336
Showing
8 changed files
with
294 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.