This repository has been archived by the owner on Nov 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
raft: paginate the unapplied config changes scan
Fix potentially unlimited memory usage spike possible in raft.hup() which reads all unapplied committed entries in order to check that there are no unapplied config changes. This PR paginates this scan so that the spike is limited to MaxCommittedSizePerReady. It also terminates the scan early if a config change has been found. It is ported from etcd-io/raft#32. It is ported from tikv/raft-rs#530. Signed-off-by: tison <wander4096@gmail.com>
- Loading branch information
Showing
3 changed files
with
171 additions
and
50 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