Skip to content

Commit 0e84a90

Browse files
committed
no-leaderless-notification
Signed-off-by: Michał Maślanka <[email protected]>
1 parent 76406d1 commit 0e84a90

File tree

3 files changed

+0
-6
lines changed

3 files changed

+0
-6
lines changed

src/v/raft/consensus.cc

-4
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,6 @@ void consensus::maybe_step_down() {
237237
do_step_down("heartbeats_majority");
238238
if (_leader_id) {
239239
_leader_id = std::nullopt;
240-
trigger_leadership_notification();
241240
}
242241
}
243242
}
@@ -1881,7 +1880,6 @@ ss::future<vote_reply> consensus::do_vote(vote_request r) {
18811880
do_step_down("candidate_term_greater");
18821881
if (_leader_id) {
18831882
_leader_id = std::nullopt;
1884-
trigger_leadership_notification();
18851883
}
18861884

18871885
// do not grant vote if log isn't ok
@@ -3134,7 +3132,6 @@ ss::future<> consensus::maybe_commit_configuration(ssx::semaphore_units u) {
31343132
co_await transfer_and_stepdown("no_longer_member");
31353133
if (_leader_id) {
31363134
_leader_id = std::nullopt;
3137-
trigger_leadership_notification();
31383135
}
31393136
}
31403137
}
@@ -3664,7 +3661,6 @@ consensus::do_transfer_leadership(transfer_leadership_request req) {
36643661
do_step_down("leadership_transfer");
36653662
if (_leader_id) {
36663663
_leader_id = std::nullopt;
3667-
trigger_leadership_notification();
36683664
}
36693665

36703666
return make_error_code(errc::success);

src/v/raft/consensus.h

-1
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,6 @@ class consensus {
359359
do_step_down(fmt::format("external_stepdown - {}", ctx));
360360
if (_leader_id) {
361361
_leader_id = std::nullopt;
362-
trigger_leadership_notification();
363362
}
364363
});
365364
}

src/v/raft/vote_stm.cc

-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,6 @@ ss::future<election_success> vote_stm::vote(bool leadership_transfer) {
140140
// only trigger notification when we had a leader previously
141141
if (_ptr->_leader_id) {
142142
_ptr->_leader_id = std::nullopt;
143-
_ptr->trigger_leadership_notification();
144143
}
145144

146145
if (_prevote && leadership_transfer) {

0 commit comments

Comments
 (0)