提交 61b2342b 编写于 作者: S slguan

[TD-17] fix error while alloc vnodes

上级 05f5d742
...@@ -3,7 +3,7 @@ PROJECT(TDengine) ...@@ -3,7 +3,7 @@ PROJECT(TDengine)
IF (TD_CLUSTER) IF (TD_CLUSTER)
ADD_DEFINITIONS(-D_CLUSTER) ADD_DEFINITIONS(-D_CLUSTER)
ADD_DEFINITIONS(-DTSDB_REPLICA_MAX_NUM=3) ADD_DEFINITIONS(-DTSDB_REPLICA_MAX_NUM=1)
ELSE () ELSE ()
ADD_DEFINITIONS(-DLITE) ADD_DEFINITIONS(-DLITE)
ADD_DEFINITIONS(-DTSDB_REPLICA_MAX_NUM=1) ADD_DEFINITIONS(-DTSDB_REPLICA_MAX_NUM=1)
......
...@@ -42,7 +42,7 @@ int32_t mgmtAllocVnodes(SVgObj *pVgroup) { ...@@ -42,7 +42,7 @@ int32_t mgmtAllocVnodes(SVgObj *pVgroup) {
} }
if (pSelDnode == NULL) { 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; return TSDB_CODE_NO_ENOUGH_DNODES;
} }
......
...@@ -35,7 +35,9 @@ extern int32_t clusterGetDnodesNum(); ...@@ -35,7 +35,9 @@ extern int32_t clusterGetDnodesNum();
extern void * clusterGetNextDnode(void *pNode, SDnodeObj **pDnode); extern void * clusterGetNextDnode(void *pNode, SDnodeObj **pDnode);
extern SDnodeObj* clusterGetDnode(int32_t dnodeId); extern SDnodeObj* clusterGetDnode(int32_t dnodeId);
extern SDnodeObj* clusterGetDnodeByIp(uint32_t ip); extern SDnodeObj* clusterGetDnodeByIp(uint32_t ip);
#ifndef _CLUSTER
static SDnodeObj tsDnodeObj = {0}; static SDnodeObj tsDnodeObj = {0};
#endif
int32_t mgmtInitDnodes() { int32_t mgmtInitDnodes() {
mgmtAddShellMsgHandle(TSDB_MSG_TYPE_CM_CONFIG_DNODE, mgmtProcessCfgDnodeMsg); mgmtAddShellMsgHandle(TSDB_MSG_TYPE_CM_CONFIG_DNODE, mgmtProcessCfgDnodeMsg);
...@@ -101,7 +103,7 @@ int32_t mgmtGetDnodesNum() { ...@@ -101,7 +103,7 @@ int32_t mgmtGetDnodesNum() {
void * mgmtGetNextDnode(void *pNode, SDnodeObj **pDnode) { void * mgmtGetNextDnode(void *pNode, SDnodeObj **pDnode) {
#ifdef _CLUSTER #ifdef _CLUSTER
return (*clusterGetNextDnode)(pNode, pDnode); return clusterGetNextDnode(pNode, pDnode);
#else #else
if (*pDnode == NULL) { if (*pDnode == NULL) {
*pDnode = &tsDnodeObj; *pDnode = &tsDnodeObj;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册