Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
哥们要飞
TDengine
提交
22a6eeb5
T
TDengine
项目概览
哥们要飞
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
22a6eeb5
编写于
3月 04, 2020
作者:
S
slguan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix compile error in 2.0
上级
7efbbc59
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
142 addition
and
146 deletion
+142
-146
src/dnode/src/dnodeMgmt.c
src/dnode/src/dnodeMgmt.c
+0
-2
src/dnode/src/dnodeVnodeMgmt.c
src/dnode/src/dnodeVnodeMgmt.c
+3
-0
src/inc/mnode.h
src/inc/mnode.h
+3
-3
src/mnode/inc/mgmtBalance.h
src/mnode/inc/mgmtBalance.h
+5
-11
src/mnode/inc/mgmtDnode.h
src/mnode/inc/mgmtDnode.h
+1
-0
src/mnode/inc/mgmtSystem.h
src/mnode/inc/mgmtSystem.h
+0
-4
src/mnode/src/mgmtBalance.c
src/mnode/src/mgmtBalance.c
+49
-58
src/mnode/src/mgmtDb.c
src/mnode/src/mgmtDb.c
+63
-62
src/mnode/src/mgmtDnode.c
src/mnode/src/mgmtDnode.c
+14
-1
src/mnode/src/mgmtMnode.c
src/mnode/src/mgmtMnode.c
+2
-2
src/mnode/src/mgmtSystem.c
src/mnode/src/mgmtSystem.c
+2
-3
未找到文件。
src/dnode/src/dnodeMgmt.c
浏览文件 @
22a6eeb5
...
...
@@ -143,8 +143,6 @@ void dnodeSendStatusMsgToMgmt(void *handle, void *tmrId) {
// }
dnodeSendMsgToMnode
(
TSDB_MSG_TYPE_STATUS
,
pStatus
,
contLen
);
//grantSendMsgToMgmt();
}
...
...
src/dnode/src/dnodeVnodeMgmt.c
浏览文件 @
22a6eeb5
...
...
@@ -59,3 +59,6 @@ bool dnodeCheckTableExist(int32_t vnode, int32_t sid, int64_t uid) {
return
true
;
}
int32_t
dnodeGetVnodesNum
()
{
return
1
;
}
src/inc/mnode.h
浏览文件 @
22a6eeb5
...
...
@@ -258,10 +258,10 @@ typedef struct {
}
SShowObj
;
//mgmtSystem
int32_t
mgmtInitSystem
();
int32_t
mgmtStartSystem
();
void
mgmtCleanUpSystem
();
extern
void
(
*
mgmtCleanUpRedirect
)();
void
mgmtCleanUpSystem
();
void
mgmtStopSystem
();
void
mgmtProcessMsgFromDnode
(
char
msgType
,
void
*
pCont
,
int32_t
contLen
,
void
*
pConn
,
int32_t
code
);
...
...
src/mnode/inc/mgmtBalance.h
浏览文件 @
22a6eeb5
...
...
@@ -20,19 +20,13 @@
extern
"C"
{
#endif
#include "os.h"
#include "mnode.h"
extern
void
(
*
mgmtStartBalanceTimer
)(
int64_t
mseconds
);
extern
int32_t
(
*
mgmtInitBalance
)();
extern
void
(
*
mgmtCleanupBalance
)();
extern
int32_t
(
*
mgmtAllocVnodes
)(
SVgObj
*
pVgroup
);
extern
bool
(
*
mgmtCheckModuleInDnode
)(
SDnodeObj
*
pDnode
,
int
moduleType
);
extern
char
*
(
*
mgmtGetVnodeStatus
)(
SVgObj
*
pVgroup
,
SVnodeGid
*
pVnode
);
extern
bool
(
*
mgmtCheckVnodeReady
)(
SDnodeObj
*
pDnode
,
SVgObj
*
pVgroup
,
SVnodeGid
*
pVnode
);
extern
void
(
*
mgmtUpdateDnodeState
)(
SDnodeObj
*
pDnode
,
int
lbStatus
);
extern
void
(
*
mgmtUpdateVgroupState
)(
SVgObj
*
pVgroup
,
int
lbStatus
,
int
srcIp
);
bool
mgmtAddVnode
(
SVgObj
*
pVgroup
,
SDnodeObj
*
pSrcDnode
,
SDnodeObj
*
pDestDnode
);
void
mgmtStartBalanceTimer
(
int64_t
mseconds
);
int32_t
mgmtInitBalance
();
void
mgmtCleanupBalance
();
int32_t
mgmtAllocVnodes
(
SVgObj
*
pVgroup
);
char
*
mgmtGetVnodeStatus
(
SVgObj
*
pVgroup
,
SVnodeGid
*
pVnode
);
#ifdef __cplusplus
}
...
...
src/mnode/inc/mgmtDnode.h
浏览文件 @
22a6eeb5
...
...
@@ -34,6 +34,7 @@ void mgmtSetDnodeMaxVnodes(SDnodeObj *pDnode);
int32_t
mgmtGetConfigMeta
(
STableMeta
*
pMeta
,
SShowObj
*
pShow
,
void
*
pConn
);
int32_t
mgmtRetrieveConfigs
(
SShowObj
*
pShow
,
char
*
data
,
int32_t
rows
,
void
*
pConn
);
bool
mgmtCheckModuleInDnode
(
SDnodeObj
*
pDnode
,
int32_t
moduleType
);
int32_t
mgmtGetModuleMeta
(
STableMeta
*
pMeta
,
SShowObj
*
pShow
,
void
*
pConn
);
int32_t
mgmtRetrieveModules
(
SShowObj
*
pShow
,
char
*
data
,
int32_t
rows
,
void
*
pConn
);
...
...
src/mnode/inc/mgmtSystem.h
浏览文件 @
22a6eeb5
...
...
@@ -27,10 +27,6 @@ int32_t mgmtStartSystem();
void
mgmtCleanUpSystem
();
void
mgmtStopSystem
();
extern
void
(
*
mgmtCleanUpRedirect
)();
#ifdef __cplusplus
}
#endif
...
...
src/mnode/src/mgmtBalance.c
浏览文件 @
22a6eeb5
...
...
@@ -21,76 +21,67 @@
#include "mgmtBalance.h"
#include "mgmtDnode.h"
void
mgmtStartBalanceTimerImp
(
int64_t
mseconds
)
{}
void
(
*
mgmtStartBalanceTimer
)(
int64_t
mseconds
)
=
mgmtStartBalanceTimerImp
;
int32_t
mgmtInitBalanceImp
()
{
return
0
;
}
int32_t
(
*
mgmtInitBalance
)()
=
mgmtInitBalanceImp
;
void
mgmtCleanupBalanceImp
()
{}
void
(
*
mgmtCleanupBalance
)()
=
mgmtCleanupBalanceImp
;
int32_t
mgmtAllocVnodesImp
(
SVgObj
*
pVgroup
)
{
// int selectedVnode = -1;
// int lastAllocVode = pDnode->lastAllocVnode;
//
// for (int i = 0; i < pDnode->numOfVnodes; i++) {
// int vnode = (i + lastAllocVode) % pDnode->numOfVnodes;
// if (pDnode->vload[vnode].vgId == 0 && pDnode->vload[vnode].status == TSDB_VN_STATUS_OFFLINE) {
// selectedVnode = vnode;
// break;
// }
// }
//
// if (selectedVnode == -1) {
// mError("vgroup:%d alloc vnode failed, free vnodes:%d", pVgroup->vgId, pDnode->numOfFreeVnodes);
// return -1;
// } else {
// mTrace("vgroup:%d allocate vnode:%d, last allocated vnode:%d", pVgroup->vgId, selectedVnode, lastAllocVode);
// pVgroup->vnodeGid[0].vnode = selectedVnode;
// pDnode->lastAllocVnode = selectedVnode + 1;
// if (pDnode->lastAllocVnode >= pDnode->numOfVnodes) pDnode->lastAllocVnode = 0;
// return 0;
// }
return
0
;
void
(
*
mgmtStartBalanceTimerFp
)(
int64_t
mseconds
)
=
NULL
;
int32_t
(
*
mgmtInitBalanceFp
)()
=
NULL
;
void
(
*
mgmtCleanupBalanceFp
)()
=
NULL
;
int32_t
(
*
mgmtAllocVnodesFp
)(
SVgObj
*
pVgroup
)
=
NULL
;
char
*
(
*
mgmtGetVnodeStatusFp
)(
SVgObj
*
pVgroup
,
SVnodeGid
*
pVnode
)
=
NULL
;
void
mgmtStartBalanceTimer
(
int64_t
mseconds
)
{
if
(
mgmtStartBalanceTimerFp
)
{
(
*
mgmtStartBalanceTimerFp
)(
mseconds
);
}
}
int32_t
(
*
mgmtAllocVnodes
)(
SVgObj
*
pVgroup
)
=
mgmtAllocVnodesImp
;
bool
mgmtCheckModuleInDnodeImp
(
SDnodeObj
*
pDnode
,
int
moduleType
)
{
return
tsModule
[
moduleType
].
num
!=
0
;
int32_t
mgmtInitBalance
()
{
if
(
mgmtInitBalanceFp
)
{
return
(
*
mgmtInitBalanceFp
)();
}
else
{
return
0
;
}
}
bool
(
*
mgmtCheckModuleInDnode
)(
SDnodeObj
*
pDnode
,
int
moduleType
)
=
mgmtCheckModuleInDnodeImp
;
char
*
mgmtGetVnodeStatusImp
(
SVgObj
*
pVgroup
,
SVnodeGid
*
pVnode
)
{
return
"master"
;
void
mgmtCleanupBalance
()
{
if
(
mgmtCleanupBalanceFp
)
{
(
*
mgmtCleanupBalanceFp
)();
}
}
char
*
(
*
mgmtGetVnodeStatus
)(
SVgObj
*
pVgroup
,
SVnodeGid
*
pVnode
)
=
mgmtGetVnodeStatusImp
;
bool
mgmtCheckVnodeReadyImp
(
SDnodeObj
*
pDnode
,
SVgObj
*
pVgroup
,
SVnodeGid
*
pVnode
)
{
return
true
;
}
int32_t
mgmtAllocVnodes
(
SVgObj
*
pVgroup
)
{
if
(
mgmtAllocVnodesFp
)
{
return
mgmtAllocVnodesFp
(
pVgroup
);
}
bool
(
*
mgmtCheckVnodeReady
)(
SDnodeObj
*
pDnode
,
SVgObj
*
pVgroup
,
SVnodeGid
*
pVnode
)
=
mgmtCheckVnodeReadyImp
;
SDnodeObj
*
pDnode
=
mgmtGetDnode
(
0
);
if
(
pDnode
==
NULL
)
return
TSDB_CODE_OTHERS
;
void
mgmtUpdateDnodeStateImp
(
SDnodeObj
*
pDnode
,
int
lbStatus
)
{
}
int
selectedVnode
=
-
1
;
int
lastAllocVode
=
pDnode
->
lastAllocVnode
;
void
(
*
mgmtUpdateDnodeState
)(
SDnodeObj
*
pDnode
,
int
lbStatus
)
=
mgmtUpdateDnodeStateImp
;
for
(
int
i
=
0
;
i
<
pDnode
->
numOfVnodes
;
i
++
)
{
int
vnode
=
(
i
+
lastAllocVode
)
%
pDnode
->
numOfVnodes
;
if
(
pDnode
->
vload
[
vnode
].
vgId
==
0
&&
pDnode
->
vload
[
vnode
].
status
==
TSDB_VN_STATUS_OFFLINE
)
{
selectedVnode
=
vnode
;
break
;
}
}
void
mgmtUpdateVgroupStateImp
(
SVgObj
*
pVgroup
,
int
lbStatus
,
int
srcIp
)
{
if
(
selectedVnode
==
-
1
)
{
mError
(
"vgroup:%d alloc vnode failed, free vnodes:%d"
,
pVgroup
->
vgId
,
pDnode
->
numOfFreeVnodes
);
return
-
1
;
}
else
{
mTrace
(
"vgroup:%d allocate vnode:%d, last allocated vnode:%d"
,
pVgroup
->
vgId
,
selectedVnode
,
lastAllocVode
);
pVgroup
->
vnodeGid
[
0
].
vnode
=
selectedVnode
;
pDnode
->
lastAllocVnode
=
selectedVnode
+
1
;
if
(
pDnode
->
lastAllocVnode
>=
pDnode
->
numOfVnodes
)
pDnode
->
lastAllocVnode
=
0
;
return
0
;
}
}
void
(
*
mgmtUpdateVgroupState
)(
SVgObj
*
pVgroup
,
int
lbStatus
,
int
srcIp
)
=
mgmtUpdateVgroupStateImp
;
bool
(
*
mgmtAddVnodeFp
)(
SVgObj
*
pVgroup
,
SDnodeObj
*
pSrcDnode
,
SDnodeObj
*
pDestDnode
)
=
NULL
;
bool
mgmtAddVnode
(
SVgObj
*
pVgroup
,
SDnodeObj
*
pSrcDnode
,
SDnodeObj
*
pDestDnode
)
{
if
(
mgmtAddVnodeFp
)
{
return
mgmtAddVnodeFp
(
pVgroup
,
pSrcDnode
,
pDestDnode
);
char
*
mgmtGetVnodeStatus
(
SVgObj
*
pVgroup
,
SVnodeGid
*
pVnode
)
{
if
(
mgmtGetVnodeStatusFp
)
{
return
(
*
mgmtGetVnodeStatusFp
)(
pVgroup
,
pVnode
);
}
else
{
return
false
;
return
"master"
;
}
}
src/mnode/src/mgmtDb.c
浏览文件 @
22a6eeb5
...
...
@@ -409,68 +409,69 @@ void mgmtMonitorDbDrop(void *unused, void *unusedt) {
}
int32_t
mgmtAlterDb
(
SAcctObj
*
pAcct
,
SAlterDbMsg
*
pAlter
)
{
int32_t
code
=
TSDB_CODE_SUCCESS
;
SDbObj
*
pDb
=
(
SDbObj
*
)
sdbGetRow
(
tsDbSdb
,
pAlter
->
db
);
if
(
pDb
==
NULL
)
{
mTrace
(
"db:%s is not exist"
,
pAlter
->
db
);
return
TSDB_CODE_INVALID_DB
;
}
int32_t
oldReplicaNum
=
pDb
->
cfg
.
replications
;
if
(
pAlter
->
daysToKeep
>
0
)
{
mTrace
(
"db:%s daysToKeep:%d change to %d"
,
pDb
->
name
,
pDb
->
cfg
.
daysToKeep
,
pAlter
->
daysToKeep
);
pDb
->
cfg
.
daysToKeep
=
pAlter
->
daysToKeep
;
}
else
if
(
pAlter
->
replications
>
0
)
{
mTrace
(
"db:%s replica:%d change to %d"
,
pDb
->
name
,
pDb
->
cfg
.
replications
,
pAlter
->
replications
);
if
(
pAlter
->
replications
<
TSDB_REPLICA_MIN_NUM
||
pAlter
->
replications
>
TSDB_REPLICA_MAX_NUM
)
{
mError
(
"invalid db option replica: %d valid range: %d--%d"
,
pAlter
->
replications
,
TSDB_REPLICA_MIN_NUM
,
TSDB_REPLICA_MAX_NUM
);
return
TSDB_CODE_INVALID_OPTION
;
}
pDb
->
cfg
.
replications
=
pAlter
->
replications
;
}
else
if
(
pAlter
->
maxSessions
>
0
)
{
mTrace
(
"db:%s tables:%d change to %d"
,
pDb
->
name
,
pDb
->
cfg
.
maxSessions
,
pAlter
->
maxSessions
);
if
(
pAlter
->
maxSessions
<
TSDB_MIN_TABLES_PER_VNODE
||
pAlter
->
maxSessions
>
TSDB_MAX_TABLES_PER_VNODE
)
{
mError
(
"invalid db option tables: %d valid range: %d--%d"
,
pAlter
->
maxSessions
,
TSDB_MIN_TABLES_PER_VNODE
,
TSDB_MAX_TABLES_PER_VNODE
);
return
TSDB_CODE_INVALID_OPTION
;
}
if
(
pAlter
->
maxSessions
<
pDb
->
cfg
.
maxSessions
)
{
mError
(
"invalid db option tables: %d should larger than original:%d"
,
pAlter
->
maxSessions
,
pDb
->
cfg
.
maxSessions
);
return
TSDB_CODE_INVALID_OPTION
;
}
return
TSDB_CODE_INVALID_OPTION
;
//The modification of tables needs to rewrite the head file, so disable this option
//pDb->cfg.maxSessions = pAlter->maxSessions;
}
else
{
mError
(
"db:%s alter msg, replica:%d, keep:%d, tables:%d, origin replica:%d keep:%d"
,
pDb
->
name
,
pAlter
->
replications
,
pAlter
->
maxSessions
,
pAlter
->
daysToKeep
,
pDb
->
cfg
.
replications
,
pDb
->
cfg
.
daysToKeep
);
return
TSDB_CODE_INVALID_OPTION
;
}
if
(
sdbUpdateRow
(
tsDbSdb
,
pDb
,
tsDbUpdateSize
,
1
)
<
0
)
{
return
TSDB_CODE_SDB_ERROR
;
}
SVgObj
*
pVgroup
=
pDb
->
pHead
;
while
(
pVgroup
!=
NULL
)
{
mgmtUpdateVgroupState
(
pVgroup
,
TSDB_VG_LB_STATUS_UPDATE
,
0
);
if
(
oldReplicaNum
<
pDb
->
cfg
.
replications
)
{
if
(
!
mgmtAddVnode
(
pVgroup
,
NULL
,
NULL
))
{
mWarn
(
"db:%s vgroup:%d not enough dnode to add vnode"
,
pAlter
->
db
,
pVgroup
->
vgId
);
code
=
TSDB_CODE_NO_ENOUGH_DNODES
;
}
}
if
(
pAlter
->
maxSessions
>
0
)
{
//rebuild meterList in mgmtVgroup.c
mgmtUpdateVgroup
(
pVgroup
);
}
// mgmtSendCreateVnodeMsg(pVgroup);
pVgroup
=
pVgroup
->
next
;
}
mgmtStartBalanceTimer
(
10
);
return
code
;
return
0
;
// int32_t code = TSDB_CODE_SUCCESS;
//
// SDbObj *pDb = (SDbObj *) sdbGetRow(tsDbSdb, pAlter->db);
// if (pDb == NULL) {
// mTrace("db:%s is not exist", pAlter->db);
// return TSDB_CODE_INVALID_DB;
// }
//
// int32_t oldReplicaNum = pDb->cfg.replications;
// if (pAlter->daysToKeep > 0) {
// mTrace("db:%s daysToKeep:%d change to %d", pDb->name, pDb->cfg.daysToKeep, pAlter->daysToKeep);
// pDb->cfg.daysToKeep = pAlter->daysToKeep;
// } else if (pAlter->replications > 0) {
// mTrace("db:%s replica:%d change to %d", pDb->name, pDb->cfg.replications, pAlter->replications);
// if (pAlter->replications < TSDB_REPLICA_MIN_NUM || pAlter->replications > TSDB_REPLICA_MAX_NUM) {
// mError("invalid db option replica: %d valid range: %d--%d", pAlter->replications, TSDB_REPLICA_MIN_NUM, TSDB_REPLICA_MAX_NUM);
// return TSDB_CODE_INVALID_OPTION;
// }
// pDb->cfg.replications = pAlter->replications;
// } else if (pAlter->maxSessions > 0) {
// mTrace("db:%s tables:%d change to %d", pDb->name, pDb->cfg.maxSessions, pAlter->maxSessions);
// if (pAlter->maxSessions < TSDB_MIN_TABLES_PER_VNODE || pAlter->maxSessions > TSDB_MAX_TABLES_PER_VNODE) {
// mError("invalid db option tables: %d valid range: %d--%d", pAlter->maxSessions, TSDB_MIN_TABLES_PER_VNODE, TSDB_MAX_TABLES_PER_VNODE);
// return TSDB_CODE_INVALID_OPTION;
// }
// if (pAlter->maxSessions < pDb->cfg.maxSessions) {
// mError("invalid db option tables: %d should larger than original:%d", pAlter->maxSessions, pDb->cfg.maxSessions);
// return TSDB_CODE_INVALID_OPTION;
// }
// return TSDB_CODE_INVALID_OPTION;
// //The modification of tables needs to rewrite the head file, so disable this option
// //pDb->cfg.maxSessions = pAlter->maxSessions;
// } else {
// mError("db:%s alter msg, replica:%d, keep:%d, tables:%d, origin replica:%d keep:%d", pDb->name,
// pAlter->replications, pAlter->maxSessions, pAlter->daysToKeep,
// pDb->cfg.replications, pDb->cfg.daysToKeep);
// return TSDB_CODE_INVALID_OPTION;
// }
//
// if (sdbUpdateRow(tsDbSdb, pDb, tsDbUpdateSize, 1) < 0) {
// return TSDB_CODE_SDB_ERROR;
// }
//
// SVgObj *pVgroup = pDb->pHead;
// while (pVgroup != NULL) {
// mgmtUpdateVgroupState(pVgroup, TSDB_VG_LB_STATUS_UPDATE, 0);
// if (oldReplicaNum < pDb->cfg.replications) {
// if (!mgmtAddVnode(pVgroup, NULL, NULL)) {
// mWarn("db:%s vgroup:%d not enough dnode to add vnode", pAlter->db, pVgroup->vgId);
// code = TSDB_CODE_NO_ENOUGH_DNODES;
// }
// }
// if (pAlter->maxSessions > 0) {
// //rebuild meterList in mgmtVgroup.c
// mgmtUpdateVgroup(pVgroup);
// }
//// mgmtSendCreateVnodeMsg(pVgroup);
// pVgroup = pVgroup->next;
// }
// mgmtStartBalanceTimer(10);
//
// return code;
}
int32_t
mgmtAddVgroupIntoDb
(
SDbObj
*
pDb
,
SVgObj
*
pVgroup
)
{
...
...
src/mnode/src/mgmtDnode.c
浏览文件 @
22a6eeb5
...
...
@@ -34,7 +34,7 @@ int32_t (*mgmtGetScoresMetaFp)(STableMeta *pMeta, SShowObj *pShow, void *pCon
int32_t
(
*
mgmtRetrieveScoresFp
)(
SShowObj
*
pShow
,
char
*
data
,
int32_t
rows
,
void
*
pConn
)
=
NULL
;
void
(
*
mgmtSetDnodeUnRemoveFp
)(
SDnodeObj
*
pDnode
)
=
NULL
;
static
SDnodeObj
tsDnodeObj
;
static
SDnodeObj
tsDnodeObj
=
{
0
}
;
void
mgmtSetDnodeMaxVnodes
(
SDnodeObj
*
pDnode
)
{
int32_t
maxVnodes
=
pDnode
->
numOfCores
*
tsNumOfVnodesPerCore
;
...
...
@@ -225,6 +225,11 @@ int32_t mgmtRetrieveDnodes(SShowObj *pShow, char *data, int32_t rows, void *pCon
return
numOfRows
;
}
bool
mgmtCheckModuleInDnode
(
SDnodeObj
*
pDnode
,
int32_t
moduleType
)
{
uint32_t
status
=
pDnode
->
moduleStatus
&
(
1
<<
moduleType
);
return
status
>
0
;
}
int32_t
mgmtGetModuleMeta
(
STableMeta
*
pMeta
,
SShowObj
*
pShow
,
void
*
pConn
)
{
int32_t
cols
=
0
;
...
...
@@ -543,6 +548,14 @@ int32_t mgmtInitDnodes() {
tsDnodeObj
.
thandle
=
(
void
*
)
(
1
);
//hack way
tsDnodeObj
.
status
=
TSDB_DN_STATUS_READY
;
mgmtSetDnodeMaxVnodes
(
&
tsDnodeObj
);
tsDnodeObj
.
moduleStatus
|=
(
1
<<
TSDB_MOD_MGMT
);
if
(
tsEnableHttpModule
)
{
tsDnodeObj
.
moduleStatus
|=
(
1
<<
TSDB_MOD_HTTP
);
}
if
(
tsEnableMonitorModule
)
{
tsDnodeObj
.
moduleStatus
|=
(
1
<<
TSDB_MOD_MONITOR
);
}
return
0
;
}
}
...
...
src/mnode/src/mgmtMnode.c
浏览文件 @
22a6eeb5
...
...
@@ -91,8 +91,8 @@ int32_t mgmtRetrieveMnodes(SShowObj *pShow, char *data, int32_t rows, void *pCon
pShow
->
pNode
=
mgmtGetNextMnode
(
pShow
,
(
SDnodeObj
**
)
&
pMnode
);
pShow
->
pNode
=
sdbFetchRow
(
mnodeSdb
,
pShow
->
pNode
,
(
void
**
)
&
pMnode
);
if
(
pMnode
==
NULL
)
break
;
//
pShow->pNode = sdbFetchRow(mnodeSdb, pShow->pNode, (void **)&pMnode);
//
if (pMnode == NULL) break;
cols
=
0
;
...
...
src/mnode/src/mgmtSystem.c
浏览文件 @
22a6eeb5
...
...
@@ -38,7 +38,6 @@ void *tsMgmtTranQhandle = NULL;
void
mgmtCleanUpSystem
()
{
mPrint
(
"starting to clean up mgmt"
);
mgmtCleanUpRedirect
();
sdbCleanUpPeers
();
mgmtCleanupBalance
();
mgmtCleanUpDnodeInt
();
...
...
@@ -63,8 +62,8 @@ int32_t mgmtCheckMgmtRunning() {
tsetModuleStatus
(
TSDB_MOD_MGMT
);
// strcpy(sdbMasterIp, mgmtIpStr[0]);
strcpy
(
sdbPrivateIp
,
tsPrivateIp
);
sdbPublicIp
=
inet_addr
(
tsPublicIp
);
//
strcpy(sdbPrivateIp, tsPrivateIp);
//
sdbPublicIp = inet_addr(tsPublicIp);
return
0
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录