-
Notifications
You must be signed in to change notification settings - Fork 161
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
If a `RaftNetwork` implmentation found an `AppendEntriesRequest` is too large, it could return a `PayloadTooLarge::new_entries_hint(n)` error to tell openraft devide request into smaller chunks containing at most `n` entries. Openraft will limit the number of entries in the next 10 `AppendEntrie` RPC. Exmaple: ```rust impl<C: RaftTypeConfig> RaftNetwork<C> for MyNetwork { fn append_entries(&self, rpc: AppendEntriesRequest<C>, option: RPCOption ) -> Result<_, RPCError<C::NodeId, C::Node, RaftError<C::NodeId>>> { if rpc.entries.len() > 10 { return Err(PayloadTooLarge::new_entries_hint(10).into()); } // ... } } ```
- Loading branch information
1 parent
f5d7e54
commit 8d25f37
Showing
8 changed files
with
402 additions
and
47 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
Oops, something went wrong.