cluster-count-failure-reports.3valkey - Man Page
Returns the number of active failure reports active for a node.
Synopsis
CLUSTER COUNT-FAILURE-REPORTS
node-id
Description
The command returns the number of failure reports for the specified node. Failure reports are the way Valkey Cluster uses in order to promote a PFAIL
state, that means a node is not reachable, to a FAIL
state, that means that the majority of masters in the cluster agreed within a window of time that the node is not reachable.
A few more details:
- A node flags another node with
PFAIL
when the node is not reachable for a time greater than the configured node timeout, which is a fundamental configuration parameter of a Valkey Cluster. - Nodes in
PFAIL
state are provided in gossip sections of heartbeat packets. - Every time a node processes gossip packets from other nodes, it creates (and refreshes the TTL if needed) failure reports, remembering that a given node said another given node is in
PFAIL
condition. - Each failure report has a time to live of two times the node timeout time.
- If at a given time a node has another node flagged with
PFAIL
, and at the same time collected the majority of other master nodes failure reports about this node (including itself if it is a master), then it elevates the failure state of the node fromPFAIL
toFAIL
, and broadcasts a message forcing all the nodes that can be reached to flag the node asFAIL
.
This command returns the number of failure reports for the current node which are currently not expired (so received within two times the node timeout time). The count does not include what the node we are asking this count believes about the node ID we pass as argument, the count only includes the failure reports the node received from other nodes.
This command is mainly useful for debugging, when the failure detector of Valkey Cluster is not operating as we believe it should.
Reply
valkey-protocol(7) Integer reply: the number of active failure reports for the node.
Complexity
O(N) where N is the number of failure reports
Acl Categories
@admin @dangerous @slow
History
- Available since: 3.0.0
See Also
asking(3valkey), cluster(3valkey), cluster-addslots(3valkey), cluster-addslotsrange(3valkey), cluster-bumpepoch(3valkey), cluster-countkeysinslot(3valkey), cluster-delslots(3valkey), cluster-delslotsrange(3valkey), cluster-failover(3valkey), cluster-flushslots(3valkey), cluster-forget(3valkey), cluster-getkeysinslot(3valkey), cluster-help(3valkey), cluster-info(3valkey), cluster-keyslot(3valkey), cluster-links(3valkey), cluster-meet(3valkey), cluster-myid(3valkey), cluster-myshardid(3valkey), cluster-nodes(3valkey), cluster-replicas(3valkey), cluster-replicate(3valkey), cluster-reset(3valkey), cluster-saveconfig(3valkey), cluster-set-config-epoch(3valkey), cluster-setslot(3valkey), cluster-shards(3valkey), cluster-slots(3valkey), readonly(3valkey), readwrite(3valkey)