diff --git a/src/cluster.c b/src/cluster.c index 3f6fe1fcc12..9c660e2cbe2 100644 --- a/src/cluster.c +++ b/src/cluster.c @@ -5093,11 +5093,11 @@ sds clusterGenNodeDescription(client *c, clusterNode *node, int use_pport) { if (sdslen(node->hostname) == 0) { ci = sdscatfmt(ci,",", 1); } - + /* Don't expose aux fields to any clients yet but do allow them * to be persisted to nodes.conf */ if (c == NULL) { - for (int i = af_count-1; i >=0; i-) { + for (int i = af_count-1; i >=0; i--) { if (auxFieldHandlers[i].isPresent(node)) { ci = sdscatprintf(ci, ",%s=", auxFieldHandlers[i].field); ci = auxFieldHandlers[i].getter(node, ci); diff --git a/tests/cluster/cluster.tcl b/tests/cluster/cluster.tcl index 816454e7861..57f54faca8a 100644 --- a/tests/cluster/cluster.tcl +++ b/tests/cluster/cluster.tcl @@ -19,7 +19,7 @@ proc get_cluster_nodes {id {status "*"}} { set args [split $l] set node [dict create \ id [lindex $args 0] \ - addr [lindex $args 1] \ + addr [lindex $args 1]\ shard-id [lindex [split [lsearch -inline [split [lindex $args 1] ,] {shard-id=*}] =] 1]\ flags [split [lindex $args 2] ,] \ slaveof [lindex $args 3] \