Skip to content

Commit

Permalink
raft: reply to heartbeats with group_unavailable if addressed to wron…
Browse files Browse the repository at this point in the history
…g node

Previously, we replied with "failure", which updated the last heartbeat
timestamp and gave the leader an impression that the group is actually there.
Reply with group_unavailable, which is more appropriate here.

(cherry picked from commit 25541ce)
  • Loading branch information
ztlpn committed Oct 28, 2024
1 parent 283ee02 commit 29996ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/v/raft/consensus.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3955,7 +3955,7 @@ reply_result consensus::lightweight_heartbeat(
target_node,
_self,
source_node);
return reply_result::failure;
return reply_result::group_unavailable;
}

/**
Expand Down Expand Up @@ -4010,7 +4010,7 @@ ss::future<full_heartbeat_reply> consensus::full_heartbeat(
target_vnode,
_self,
source_vnode);
reply.result = reply_result::failure;
reply.result = reply_result::group_unavailable;
co_return reply;
}
/**
Expand Down

0 comments on commit 29996ff

Please sign in to comment.