提交 c22bd63e 编写于 作者: C cadem

vnode config compitible

上级 3b78d438
......@@ -293,8 +293,13 @@ int vnodeDecodeConfig(const SJson *pJson, void *pObj) {
tjsonGetNumberValue(info, "clusterId", pNode->clusterId, code);
if (code < 0) return -1;
char role[10];
tjsonGetStringValue(info, "nodeRole", role);
code = tjsonGetStringValue(info, "nodeRole", role);
if(code > 0){
pNode->nodeRole = vnodeStrToRole(role);
}
else{
pNode->nodeRole = TAOS_SYNC_ROLE_VOTER;
}
vDebug("vgId:%d, decode config, replica:%d ep:%s:%u dnode:%d", pCfg->vgId, i, pNode->nodeFqdn, pNode->nodePort,
pNode->nodeId);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册