Skip to content

Commit

Permalink
raftstore: fix an OOM issue by paginate scan unapplied config changes
Browse files Browse the repository at this point in the history
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
overvenus committed Oct 20, 2023
1 parent 3f53e59 commit 5682169
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5682169

Please sign in to comment.