未验证 提交 c36735c4 编写于 作者: S slguan 提交者: GitHub

Merge pull request #1635 from taosdata/feature/mpeer

set master when there is only one node
......@@ -87,6 +87,14 @@ static int32_t mgmtMnodeActionDecode(SSdbOperDesc *pOper) {
}
static int32_t mgmtMnodeActionRestored() {
if (mgmtGetMnodesNum() == 1) {
SMnodeObj *pMnode = NULL;
mgmtGetNextMnode(NULL, &pMnode);
if (pMnode != NULL) {
pMnode->role = TAOS_SYNC_ROLE_MASTER;
mgmtReleaseMnode(pMnode);
}
}
return TSDB_CODE_SUCCESS;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册