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.
This commit is contained in:
parent
b510624978
commit
cd4f3e20c1
@ -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 */
|
||||
|
Loading…
x
Reference in New Issue
Block a user