Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
raftstore: fix an OOM issue by paginate scan unapplied config changes
Before start election, raft-rs has to check if there is any unapplied conf change entry. In the current implementation, this needs to scan logs from [unapplied_index, committed_index]. It essentially takes unbounded memory when raft peers that has many unapplied logs. To fix the issue, TiKV can paginate scan raft log which has a fixed memory usage upper bound. Cc tikv/raft-rs#530 Signed-off-by: Neil Shen <overvenus@gmail.com>
- Loading branch information