diff --git a/cmake/define.inc b/cmake/define.inc index 8d19c19b6d45205692578ecfb3be9970af235f79..ba61d3fe9d2dba3cbaafa80bafa46a48d59c8d71 100755 --- a/cmake/define.inc +++ b/cmake/define.inc @@ -3,7 +3,7 @@ PROJECT(TDengine) IF (TD_CLUSTER) ADD_DEFINITIONS(-D_CLUSTER) - ADD_DEFINITIONS(-DTSDB_REPLICA_MAX_NUM=3) + ADD_DEFINITIONS(-DTSDB_REPLICA_MAX_NUM=1) ELSE () ADD_DEFINITIONS(-DLITE) ADD_DEFINITIONS(-DTSDB_REPLICA_MAX_NUM=1) diff --git a/src/mnode/src/mgmtBalance.c b/src/mnode/src/mgmtBalance.c index 7d06329a465a825c412c617660375842ed541494..fc74075878869ffbd641a99f015b7fd2f7676dfe 100644 --- a/src/mnode/src/mgmtBalance.c +++ b/src/mnode/src/mgmtBalance.c @@ -42,7 +42,7 @@ int32_t mgmtAllocVnodes(SVgObj *pVgroup) { } if (pSelDnode == NULL) { - mError("failed to alloc vnode to vgroup", pDnode->dnodeId); + mError("failed to alloc vnode to vgroup"); return TSDB_CODE_NO_ENOUGH_DNODES; } diff --git a/src/mnode/src/mgmtDnode.c b/src/mnode/src/mgmtDnode.c index d7e2270107a79b061b32161aee3556da9f031d72..53f0a668b409702a39614a1bf99b5071becd7d11 100644 --- a/src/mnode/src/mgmtDnode.c +++ b/src/mnode/src/mgmtDnode.c @@ -35,7 +35,9 @@ extern int32_t clusterGetDnodesNum(); extern void * clusterGetNextDnode(void *pNode, SDnodeObj **pDnode); extern SDnodeObj* clusterGetDnode(int32_t dnodeId); extern SDnodeObj* clusterGetDnodeByIp(uint32_t ip); +#ifndef _CLUSTER static SDnodeObj tsDnodeObj = {0}; +#endif int32_t mgmtInitDnodes() { mgmtAddShellMsgHandle(TSDB_MSG_TYPE_CM_CONFIG_DNODE, mgmtProcessCfgDnodeMsg); @@ -101,7 +103,7 @@ int32_t mgmtGetDnodesNum() { void * mgmtGetNextDnode(void *pNode, SDnodeObj **pDnode) { #ifdef _CLUSTER - return (*clusterGetNextDnode)(pNode, pDnode); + return clusterGetNextDnode(pNode, pDnode); #else if (*pDnode == NULL) { *pDnode = &tsDnodeObj;