Skip to content

Commit

Permalink
update comment
Browse files Browse the repository at this point in the history
Signed-off-by: Binbin <[email protected]>
  • Loading branch information
enjoy-binbin committed Jun 13, 2024
1 parent 4e25c45 commit 6845725
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cluster_legacy.c
Original file line number Diff line number Diff line change
Expand Up @@ -1867,7 +1867,7 @@ void markNodeAsFailingIfNeeded(clusterNode *node) {
if (nodeFailed(node)) return; /* Already FAILing. */

failures = clusterNodeFailureReportsCount(node);
/* Also count myself as a voter if I'm a primary. */
/* Also count myself as a voter if I'm a primary with slots. */
if (clusterNodeIsPrimary(myself) && myself->numslots) failures++;
if (failures < needed_quorum) return; /* No weak agreement from primaries. */

Expand Down Expand Up @@ -2090,7 +2090,7 @@ void clusterProcessGossipSection(clusterMsg *hdr, clusterLink *link) {
/* Ignore gossips about self. */
if (node && node != myself) {
/* We already know this node.
Handle failure reports, only when the sender is a primary. */
Handle failure reports, only when the sender is a primary with slots. */
if (sender && clusterNodeIsPrimary(sender) && sender->numslots) {
if (flags & (CLUSTER_NODE_FAIL | CLUSTER_NODE_PFAIL)) {
if (clusterNodeAddFailureReport(node, sender)) {
Expand Down

0 comments on commit 6845725

Please sign in to comment.