Skip to content

Commit

Permalink
consensus: add step_down
Browse files Browse the repository at this point in the history
  • Loading branch information
rystsov committed Jun 23, 2022
1 parent 93b8bd4 commit 9a693fc
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/v/raft/consensus.h
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,16 @@ class consensus {
});
}

ss::future<> step_down() {
return _op_lock.with([this] {
do_step_down("external_stepdown");
if (_leader_id) {
_leader_id = std::nullopt;
trigger_leadership_notification();
}
});
}

ss::future<std::optional<storage::timequery_result>>
timequery(storage::timequery_config cfg);

Expand Down

0 comments on commit 9a693fc

Please sign in to comment.