Replica always reports master's config epoch in CLUSTER NODES output. (#7235)
(cherry picked from commit 938c35302fb618ec15e62443ef3bb3d00d10f5b9)
This commit is contained in:
parent
c4b428a388
commit
9bc6af2449
@ -4104,11 +4104,15 @@ sds clusterGenNodeDescription(clusterNode *node) {
|
|||||||
else
|
else
|
||||||
ci = sdscatlen(ci," - ",3);
|
ci = sdscatlen(ci," - ",3);
|
||||||
|
|
||||||
|
unsigned long long nodeEpoch = node->configEpoch;
|
||||||
|
if (nodeIsSlave(node) && node->slaveof) {
|
||||||
|
nodeEpoch = node->slaveof->configEpoch;
|
||||||
|
}
|
||||||
/* Latency from the POV of this node, config epoch, link status */
|
/* Latency from the POV of this node, config epoch, link status */
|
||||||
ci = sdscatprintf(ci,"%lld %lld %llu %s",
|
ci = sdscatprintf(ci,"%lld %lld %llu %s",
|
||||||
(long long) node->ping_sent,
|
(long long) node->ping_sent,
|
||||||
(long long) node->pong_received,
|
(long long) node->pong_received,
|
||||||
(unsigned long long) node->configEpoch,
|
nodeEpoch,
|
||||||
(node->link || node->flags & CLUSTER_NODE_MYSELF) ?
|
(node->link || node->flags & CLUSTER_NODE_MYSELF) ?
|
||||||
"connected" : "disconnected");
|
"connected" : "disconnected");
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user