Unverified Commit cd4f3e20 authored by Binbin's avatar Binbin Committed by GitHub
Browse files

Fix cluster human_nodename Getter data loss in nodes.conf (#12325)

auxHumanNodenameGetter limited to %.40s, since we did not limit the
length of config cluster-announce-human-nodename, %.40s will cause
nodename data loss (we will persist it in nodes.conf).

Additional modified auxHumanNodenamePresent to use sdslen.
parent b5106249
......@@ -240,11 +240,11 @@ int auxHumanNodenameSetter(clusterNode *n, void *value, int length) {
}
sds auxHumanNodenameGetter(clusterNode *n, sds s) {
return sdscatprintf(s, "%.40s", n->human_nodename);
return sdscatprintf(s, "%s", n->human_nodename);
}
int auxHumanNodenamePresent(clusterNode *n) {
return strlen(n->human_nodename);
return sdslen(n->human_nodename);
}
/* clusterLink send queue blocks */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment