Function server::raft_engine_switch::check_and_dump_raft_db[][src]

pub fn check_and_dump_raft_db(
    config: &TiKvConfig,
    engine: &RaftLogEngine,
    env: &Arc<Env>,
    thread_num: usize
)

Check the potential original raftdb directory and try to dump data out.

Procedure: 1. Check whether the dump has been completed. If there is a dirty dir, delete the original raftdb safely and return. 2. Scan and dump raft data into raft engine. 3. Rename original raftdb dir to indicate that dump operation is done. 4. Delete the original raftdb safely.