Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
dfafa1be
T
TDengine
项目概览
慢慢CG
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
0
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看板
提交
dfafa1be
编写于
2月 20, 2020
作者:
S
slguan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
reorganize the file mgmtSystem.c
上级
23693d9c
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
72 addition
and
98 deletion
+72
-98
src/dnode/src/dnodeSystem.c
src/dnode/src/dnodeSystem.c
+8
-8
src/inc/mnode.h
src/inc/mnode.h
+3
-6
src/mnode/inc/mgmtSystem.h
src/mnode/inc/mgmtSystem.h
+0
-1
src/mnode/src/mgmtDb.c
src/mnode/src/mgmtDb.c
+1
-1
src/mnode/src/mgmtDnodeInt.c
src/mnode/src/mgmtDnodeInt.c
+2
-2
src/mnode/src/mgmtShell.c
src/mnode/src/mgmtShell.c
+7
-7
src/mnode/src/mgmtSuperTable.c
src/mnode/src/mgmtSuperTable.c
+1
-1
src/mnode/src/mgmtSystem.c
src/mnode/src/mgmtSystem.c
+45
-67
src/mnode/src/mgmtUser.c
src/mnode/src/mgmtUser.c
+1
-1
src/mnode/src/mgmtVgroup.c
src/mnode/src/mgmtVgroup.c
+2
-2
src/util/inc/tglobalcfg.h
src/util/inc/tglobalcfg.h
+1
-1
src/vnode/detail/inc/vnode.h
src/vnode/detail/inc/vnode.h
+1
-1
未找到文件。
src/dnode/src/dnodeSystem.c
浏览文件 @
dfafa1be
...
@@ -85,6 +85,8 @@ void dnodeSetRunStatus(SDnodeRunStatus status) {
...
@@ -85,6 +85,8 @@ void dnodeSetRunStatus(SDnodeRunStatus status) {
}
}
void
dnodeCleanUpSystem
()
{
void
dnodeCleanUpSystem
()
{
tclearModuleStatus
(
TSDB_MOD_MGMT
);
if
(
dnodeGetRunStatus
()
==
TSDB_DNODE_RUN_STATUS_STOPPED
)
{
if
(
dnodeGetRunStatus
()
==
TSDB_DNODE_RUN_STATUS_STOPPED
)
{
return
;
return
;
}
else
{
}
else
{
...
@@ -131,29 +133,27 @@ void dnodeInitPlugins() {
...
@@ -131,29 +133,27 @@ void dnodeInitPlugins() {
}
}
int32_t
dnodeInitSystem
()
{
int32_t
dnodeInitSystem
()
{
char
temp
[
128
]
;
tsRebootTime
=
taosGetTimestampSec
()
;
struct
stat
dirstat
;
tscEmbedded
=
1
;
dnodeSetRunStatus
(
TSDB_DNODE_RUN_STATUS_INITIALIZE
);
dnodeSetRunStatus
(
TSDB_DNODE_RUN_STATUS_INITIALIZE
);
taosResolveCRC
();
taosResolveCRC
();
tsRebootTime
=
taosGetTimestampSec
();
tscEmbedded
=
1
;
// Read global configuration.
// Read global configuration.
tsReadGlobalLogConfig
();
tsReadGlobalLogConfig
();
struct
stat
dirstat
;
if
(
stat
(
logDir
,
&
dirstat
)
<
0
)
{
if
(
stat
(
logDir
,
&
dirstat
)
<
0
)
{
mkdir
(
logDir
,
0755
);
mkdir
(
logDir
,
0755
);
}
}
char
temp
[
128
];
sprintf
(
temp
,
"%s/taosdlog"
,
logDir
);
sprintf
(
temp
,
"%s/taosdlog"
,
logDir
);
if
(
taosInitLog
(
temp
,
tsNumOfLogLines
,
1
)
<
0
)
{
if
(
taosInitLog
(
temp
,
tsNumOfLogLines
,
1
)
<
0
)
{
printf
(
"failed to init log file
\n
"
);
printf
(
"failed to init log file
\n
"
);
}
}
if
(
!
tsReadGlobalConfig
())
{
// TODO : Change this function
if
(
!
tsReadGlobalConfig
())
{
tsPrintGlobalConfig
();
tsPrintGlobalConfig
();
dError
(
"TDengine read global config failed"
);
dError
(
"TDengine read global config failed"
);
return
-
1
;
return
-
1
;
...
@@ -249,7 +249,7 @@ int32_t dnodeInitStorageImp() {
...
@@ -249,7 +249,7 @@ int32_t dnodeInitStorageImp() {
sprintf
(
fileName
,
"%s/data"
,
tsDirectory
);
sprintf
(
fileName
,
"%s/data"
,
tsDirectory
);
mkdir
(
fileName
,
0755
);
mkdir
(
fileName
,
0755
);
sprintf
(
m
gmtDirectory
,
"%s/mgmt"
,
tsDirectory
);
sprintf
(
tsM
gmtDirectory
,
"%s/mgmt"
,
tsDirectory
);
sprintf
(
tsDirectory
,
"%s/tsdb"
,
dataDir
);
sprintf
(
tsDirectory
,
"%s/tsdb"
,
dataDir
);
dnodeCheckDataDirOpenned
(
dataDir
);
dnodeCheckDataDirOpenned
(
dataDir
);
...
...
src/inc/mnode.h
浏览文件 @
dfafa1be
...
@@ -43,12 +43,9 @@ extern "C" {
...
@@ -43,12 +43,9 @@ extern "C" {
// internal globals
// internal globals
extern
char
version
[];
extern
char
version
[];
extern
void
*
mgmtTmr
;
extern
void
*
tsMgmtTmr
;
extern
void
*
mgmtQhandle
;
extern
void
*
tsMgmtTranQhandle
;
extern
void
*
mgmtTranQhandle
;
extern
char
tsMgmtDirectory
[];
extern
int
mgmtShellConns
;
extern
int
mgmtDnodeConns
;
extern
char
mgmtDirectory
[];
extern
int
tsAcctUpdateSize
;
extern
int
tsAcctUpdateSize
;
extern
int
tsDbUpdateSize
;
extern
int
tsDbUpdateSize
;
...
...
src/mnode/inc/mgmtSystem.h
浏览文件 @
dfafa1be
...
@@ -28,7 +28,6 @@ void mgmtCleanUpSystem();
...
@@ -28,7 +28,6 @@ void mgmtCleanUpSystem();
extern
int32_t
(
*
mgmtInitSystem
)();
extern
int32_t
(
*
mgmtInitSystem
)();
extern
int32_t
(
*
mgmtCheckMgmtRunning
)();
extern
int32_t
(
*
mgmtCheckMgmtRunning
)();
extern
void
(
*
mgmtDoStatistic
)(
void
*
handle
,
void
*
tmrId
);
extern
void
(
*
mgmtDoStatistic
)(
void
*
handle
,
void
*
tmrId
);
extern
void
(
*
mgmtStartMgmtTimer
)();
extern
void
(
*
mgmtStopSystem
)();
extern
void
(
*
mgmtStopSystem
)();
extern
void
(
*
mgmtCleanUpRedirect
)();
extern
void
(
*
mgmtCleanUpRedirect
)();
...
...
src/mnode/src/mgmtDb.c
浏览文件 @
dfafa1be
...
@@ -83,7 +83,7 @@ int32_t mgmtInitDbs() {
...
@@ -83,7 +83,7 @@ int32_t mgmtInitDbs() {
mgmtDbActionInit
();
mgmtDbActionInit
();
dbSdb
=
sdbOpenTable
(
tsMaxDbs
,
sizeof
(
SDbObj
),
"db"
,
SDB_KEYTYPE_STRING
,
m
gmtDirectory
,
mgmtDbAction
);
dbSdb
=
sdbOpenTable
(
tsMaxDbs
,
sizeof
(
SDbObj
),
"db"
,
SDB_KEYTYPE_STRING
,
tsM
gmtDirectory
,
mgmtDbAction
);
if
(
dbSdb
==
NULL
)
{
if
(
dbSdb
==
NULL
)
{
mError
(
"failed to init db data"
);
mError
(
"failed to init db data"
);
return
-
1
;
return
-
1
;
...
...
src/mnode/src/mgmtDnodeInt.c
浏览文件 @
dfafa1be
...
@@ -556,7 +556,7 @@ void mgmtProcessDnodeStatusImp(void *handle, void *tmrId) {
...
@@ -556,7 +556,7 @@ void mgmtProcessDnodeStatusImp(void *handle, void *tmrId) {
pVload->dropStatus = TSDB_VN_DROP_STATUS_READY;
pVload->dropStatus = TSDB_VN_DROP_STATUS_READY;
pVload->status = TSDB_VN_STATUS_OFFLINE;
pVload->status = TSDB_VN_STATUS_OFFLINE;
mPrint("dnode:%s, vid:%d, drop finished", taosIpStr(pObj->privateIp), vnode);
mPrint("dnode:%s, vid:%d, drop finished", taosIpStr(pObj->privateIp), vnode);
taosTmrStart(mgmtMonitorDbDrop, 10000, NULL,
m
gmtTmr);
taosTmrStart(mgmtMonitorDbDrop, 10000, NULL,
tsM
gmtTmr);
}
}
}
}
...
@@ -590,7 +590,7 @@ void mgmtProcessDnodeStatusImp(void *handle, void *tmrId) {
...
@@ -590,7 +590,7 @@ void mgmtProcessDnodeStatusImp(void *handle, void *tmrId) {
}
}
}
}
taosTmrReset(mgmtProcessDnodeStatus, tsStatusInterval * 1000, NULL,
m
gmtTmr, &mgmtStatusTimer);
taosTmrReset(mgmtProcessDnodeStatus, tsStatusInterval * 1000, NULL,
tsM
gmtTmr, &mgmtStatusTimer);
if (mgmtStatusTimer == NULL) {
if (mgmtStatusTimer == NULL) {
mError("Failed to start status timer");
mError("Failed to start status timer");
}
}
...
...
src/mnode/src/mgmtShell.c
浏览文件 @
dfafa1be
...
@@ -46,7 +46,7 @@ static RetrieveMetaFp* mgmtRetrieveFp;
...
@@ -46,7 +46,7 @@ static RetrieveMetaFp* mgmtRetrieveFp;
static
void
mgmtInitShowMsgFp
();
static
void
mgmtInitShowMsgFp
();
void
*
p
ShellConn
=
NULL
;
void
*
ts
ShellConn
=
NULL
;
SConnObj
*
connList
;
SConnObj
*
connList
;
void
*
mgmtProcessMsgFromShell
(
char
*
msg
,
void
*
ahandle
,
void
*
thandle
);
void
*
mgmtProcessMsgFromShell
(
char
*
msg
,
void
*
ahandle
,
void
*
thandle
);
int
(
*
mgmtProcessShellMsg
[
TSDB_MSG_TYPE_MAX
])(
char
*
,
int
,
SConnObj
*
);
int
(
*
mgmtProcessShellMsg
[
TSDB_MSG_TYPE_MAX
])(
char
*
,
int
,
SConnObj
*
);
...
@@ -95,8 +95,8 @@ int mgmtInitShell() {
...
@@ -95,8 +95,8 @@ int mgmtInitShell() {
rpcInit
.
idleTime
=
tsShellActivityTimer
*
2000
;
rpcInit
.
idleTime
=
tsShellActivityTimer
*
2000
;
rpcInit
.
afp
=
mgmtRetriveUserAuthInfo
;
rpcInit
.
afp
=
mgmtRetriveUserAuthInfo
;
p
ShellConn
=
rpcOpen
(
&
rpcInit
);
ts
ShellConn
=
rpcOpen
(
&
rpcInit
);
if
(
p
ShellConn
==
NULL
)
{
if
(
ts
ShellConn
==
NULL
)
{
mError
(
"failed to init tcp connection to shell"
);
mError
(
"failed to init tcp connection to shell"
);
return
-
1
;
return
-
1
;
}
}
...
@@ -105,9 +105,9 @@ int mgmtInitShell() {
...
@@ -105,9 +105,9 @@ int mgmtInitShell() {
}
}
void
mgmtCleanUpShell
()
{
void
mgmtCleanUpShell
()
{
if
(
p
ShellConn
)
{
if
(
ts
ShellConn
)
{
rpcClose
(
p
ShellConn
);
rpcClose
(
ts
ShellConn
);
p
ShellConn
=
NULL
;
ts
ShellConn
=
NULL
;
}
}
tfree
(
connList
);
tfree
(
connList
);
}
}
...
@@ -1489,7 +1489,7 @@ void *mgmtProcessMsgFromShell(char *msg, void *ahandle, void *thandle) {
...
@@ -1489,7 +1489,7 @@ void *mgmtProcessMsgFromShell(char *msg, void *ahandle, void *thandle) {
// schedMsg.tfp = NULL;
// schedMsg.tfp = NULL;
// schedMsg.thandle = pConn;
// schedMsg.thandle = pConn;
//
//
// taosScheduleTask(
m
gmtTranQhandle, &schedMsg);
// taosScheduleTask(
tsM
gmtTranQhandle, &schedMsg);
// } else {
// } else {
// mError("%s from shell is not processed", taosMsg[pMsg->msgType]);
// mError("%s from shell is not processed", taosMsg[pMsg->msgType]);
// }
// }
...
...
src/mnode/src/mgmtSuperTable.c
浏览文件 @
dfafa1be
...
@@ -175,7 +175,7 @@ int32_t mgmtInitSuperTables() {
...
@@ -175,7 +175,7 @@ int32_t mgmtInitSuperTables() {
mgmtSuperTableActionInit
();
mgmtSuperTableActionInit
();
tsSuperTableSdb
=
sdbOpenTable
(
tsMaxTables
,
sizeof
(
STabObj
)
+
sizeof
(
SSchema
)
*
TSDB_MAX_COLUMNS
+
TSDB_MAX_SQL_LEN
,
tsSuperTableSdb
=
sdbOpenTable
(
tsMaxTables
,
sizeof
(
STabObj
)
+
sizeof
(
SSchema
)
*
TSDB_MAX_COLUMNS
+
TSDB_MAX_SQL_LEN
,
"meters"
,
SDB_KEYTYPE_STRING
,
m
gmtDirectory
,
mgmtSuperTableAction
);
"meters"
,
SDB_KEYTYPE_STRING
,
tsM
gmtDirectory
,
mgmtSuperTableAction
);
if
(
tsSuperTableSdb
==
NULL
)
{
if
(
tsSuperTableSdb
==
NULL
)
{
mError
(
"failed to init meter data"
);
mError
(
"failed to init meter data"
);
return
-
1
;
return
-
1
;
...
...
src/mnode/src/mgmtSystem.c
浏览文件 @
dfafa1be
...
@@ -15,8 +15,8 @@
...
@@ -15,8 +15,8 @@
#define _DEFAULT_SOURCE
#define _DEFAULT_SOURCE
#include "os.h"
#include "os.h"
#include "taosdef.h"
#include "
dnodeSystem
.h"
#include "
tsched
.h"
#include "mnode.h"
#include "mnode.h"
#include "mgmtAcct.h"
#include "mgmtAcct.h"
#include "mgmtBalance.h"
#include "mgmtBalance.h"
...
@@ -29,60 +29,39 @@
...
@@ -29,60 +29,39 @@
#include "mgmtTable.h"
#include "mgmtTable.h"
#include "mgmtShell.h"
#include "mgmtShell.h"
#include "dnodeModule.h"
#include "dnodeModule.h"
#include "taosdef.h"
// global, not configurable
char
tsMgmtDirectory
[
128
]
=
{
0
};
char
mgmtDirectory
[
128
];
void
*
tsMgmtTmr
=
NULL
;
void
*
mgmtTmr
;
void
*
tsMgmtTranQhandle
=
NULL
;
void
*
mgmtQhandle
=
NULL
;
void
*
tsMgmtStatisTimer
=
NULL
;
void
*
mgmtTranQhandle
=
NULL
;
void
*
mgmtStatisticTimer
=
NULL
;
int
mgmtShellConns
=
0
;
int
mgmtDnodeConns
=
0
;
extern
void
*
pShellConn
;
extern
void
**
tsRpcQhandle
;
extern
SMgmtIpList
mgmtIpList
;
extern
SMgmtIpList
mgmtPublicIpList
;
extern
char
mgmtIpStr
[
TSDB_MAX_MGMT_IPS
][
20
];
extern
void
*
acctSdb
;
void
mgmtCleanUpSystem
()
{
void
mgmtCleanUpSystem
()
{
if
(
tsModuleStatus
&
(
1
<<
TSDB_MOD_MGMT
))
{
mPrint
(
"starting to clean up mgmt"
);
mTrace
(
"mgmt is running, clean it up"
);
taosTmrStopA
(
&
mgmtStatisticTimer
);
taosTmrStopA
(
&
tsMgmtStatisTimer
);
sdbCleanUpPeers
();
mgmtCleanUpRedirect
();
mgmtCleanupBalance
();
sdbCleanUpPeers
();
mgmtCleanUpDnodeInt
();
mgmtCleanupBalance
();
mgmtCleanUpShell
();
mgmtCleanUpDnodeInt
();
mgmtCleanUpMeters
();
mgmtCleanUpShell
();
mgmtCleanUpVgroups
();
mgmtCleanUpMeters
();
mgmtCleanUpDbs
();
mgmtCleanUpVgroups
();
mgmtCleanUpDnodes
();
mgmtCleanUpDbs
();
mgmtCleanUpUsers
();
mgmtCleanUpDnodes
();
mgmtCleanUpAccts
();
mgmtCleanUpUsers
();
taosTmrCleanUp
(
mgmtTmr
);
mgmtCleanUpAccts
();
taosCleanUpScheduler
(
mgmtQhandle
);
taosTmrCleanUp
(
tsMgmtTmr
);
taosCleanUpScheduler
(
mgmtTranQhandle
);
taosCleanUpScheduler
(
tsMgmtTranQhandle
);
}
else
{
mgmtCleanUpRedirect
();
mPrint
(
"mgmt is cleaned up"
);
}
mgmtTmr
=
NULL
;
mgmtQhandle
=
NULL
;
mgmtShellConns
=
0
;
mgmtDnodeConns
=
0
;
tclearModuleStatus
(
TSDB_MOD_MGMT
);
pShellConn
=
NULL
;
mTrace
(
"mgmt is cleaned up"
);
}
}
int
mgmtStartSystem
()
{
int
32_t
mgmtStartSystem
()
{
mPrint
(
"starting to initialize TDengine mgmt ..."
);
mPrint
(
"starting to initialize TDengine mgmt ..."
);
struct
stat
dirstat
;
struct
stat
dirstat
;
if
(
stat
(
m
gmtDirectory
,
&
dirstat
)
<
0
)
{
if
(
stat
(
tsM
gmtDirectory
,
&
dirstat
)
<
0
)
{
mkdir
(
m
gmtDirectory
,
0755
);
mkdir
(
tsM
gmtDirectory
,
0755
);
}
}
if
(
mgmtCheckMgmtRunning
()
!=
0
)
{
if
(
mgmtCheckMgmtRunning
()
!=
0
)
{
...
@@ -90,14 +69,10 @@ int mgmtStartSystem() {
...
@@ -90,14 +69,10 @@ int mgmtStartSystem() {
return
0
;
return
0
;
}
}
int
numOfThreads
=
tsNumOfCores
*
tsNumOfThreadsPerCore
/
2
.
0
;
tsMgmtTranQhandle
=
taosInitScheduler
(
tsMaxDnodes
+
tsMaxShellConns
,
1
,
"mnodeT"
);
if
(
numOfThreads
<
1
)
numOfThreads
=
1
;
mgmtQhandle
=
taosInitScheduler
(
tsMaxDnodes
+
tsMaxShellConns
,
numOfThreads
,
"mnode"
);
mgmtTranQhandle
=
taosInitScheduler
(
tsMaxDnodes
+
tsMaxShellConns
,
1
,
"mnodeT"
);
m
gmtTmr
=
taosTmrInit
((
tsMaxDnodes
+
tsMaxShellConns
)
*
3
,
200
,
3600000
,
"MND"
);
tsM
gmtTmr
=
taosTmrInit
((
tsMaxDnodes
+
tsMaxShellConns
)
*
3
,
200
,
3600000
,
"MND"
);
if
(
m
gmtTmr
==
NULL
)
{
if
(
tsM
gmtTmr
==
NULL
)
{
mError
(
"failed to init timer, exit"
);
mError
(
"failed to init timer, exit"
);
return
-
1
;
return
-
1
;
}
}
...
@@ -142,7 +117,7 @@ int mgmtStartSystem() {
...
@@ -142,7 +117,7 @@ int mgmtStartSystem() {
return
-
1
;
return
-
1
;
}
}
if
(
sdbInitPeers
(
m
gmtDirectory
)
<
0
)
{
if
(
sdbInitPeers
(
tsM
gmtDirectory
)
<
0
)
{
mError
(
"failed to init peers"
);
mError
(
"failed to init peers"
);
return
-
1
;
return
-
1
;
}
}
...
@@ -153,9 +128,7 @@ int mgmtStartSystem() {
...
@@ -153,9 +128,7 @@ int mgmtStartSystem() {
mgmtCheckAcct
();
mgmtCheckAcct
();
taosTmrReset
(
mgmtDoStatistic
,
tsStatusInterval
*
30000
,
NULL
,
mgmtTmr
,
&
mgmtStatisticTimer
);
taosTmrReset
(
mgmtDoStatistic
,
tsStatusInterval
*
30000
,
NULL
,
tsMgmtTmr
,
&
tsMgmtStatisTimer
);
mgmtStartMgmtTimer
();
mPrint
(
"TDengine mgmt is initialized successfully"
);
mPrint
(
"TDengine mgmt is initialized successfully"
);
...
@@ -163,26 +136,31 @@ int mgmtStartSystem() {
...
@@ -163,26 +136,31 @@ int mgmtStartSystem() {
}
}
int32_t
mgmtInitSystemImp
()
{
int32_t
mgmtInitSystemImp
()
{
return
mgmtStartSystem
();
int32_t
code
=
mgmtStartSystem
();
if
(
code
!=
0
)
{
return
code
;
}
taosTmrReset
(
mgmtProcessDnodeStatus
,
500
,
NULL
,
tsMgmtTmr
,
&
mgmtStatusTimer
);
return
code
;
}
}
int32_t
(
*
mgmtInitSystem
)()
=
mgmtInitSystemImp
;
int32_t
(
*
mgmtInitSystem
)()
=
mgmtInitSystemImp
;
int32_t
mgmtCheckMgmtRunningImp
()
{
return
0
;
}
int32_t
mgmtCheckMgmtRunningImp
()
{
return
0
;
}
int32_t
(
*
mgmtCheckMgmtRunning
)()
=
mgmtCheckMgmtRunningImp
;
int32_t
(
*
mgmtCheckMgmtRunning
)()
=
mgmtCheckMgmtRunningImp
;
void
mgmtDoStatisticImp
(
void
*
handle
,
void
*
tmrId
)
{}
void
mgmtDoStatisticImp
(
void
*
handle
,
void
*
tmrId
)
{}
void
(
*
mgmtDoStatistic
)(
void
*
handle
,
void
*
tmrId
)
=
mgmtDoStatisticImp
;
void
mgmtStartMgmtTimerImp
()
{
void
(
*
mgmtDoStatistic
)(
void
*
handle
,
void
*
tmrId
)
=
mgmtDoStatisticImp
;
taosTmrReset
(
mgmtProcessDnodeStatus
,
500
,
NULL
,
mgmtTmr
,
&
mgmtStatusTimer
);
}
void
(
*
mgmtStartMgmtTimer
)()
=
mgmtStartMgmtTimerImp
;
void
mgmtStopSystemImp
()
{}
void
mgmtStopSystemImp
()
{}
void
(
*
mgmtStopSystem
)()
=
mgmtStopSystemImp
;
void
(
*
mgmtStopSystem
)()
=
mgmtStopSystemImp
;
void
mgmtCleanUpRedirectImp
()
{}
void
mgmtCleanUpRedirectImp
()
{}
void
(
*
mgmtCleanUpRedirect
)()
=
mgmtCleanUpRedirectImp
;
void
(
*
mgmtCleanUpRedirect
)()
=
mgmtCleanUpRedirectImp
;
src/mnode/src/mgmtUser.c
浏览文件 @
dfafa1be
...
@@ -68,7 +68,7 @@ int mgmtInitUsers() {
...
@@ -68,7 +68,7 @@ int mgmtInitUsers() {
mgmtUserActionInit
();
mgmtUserActionInit
();
userSdb
=
sdbOpenTable
(
tsMaxUsers
,
sizeof
(
SUserObj
),
"user"
,
SDB_KEYTYPE_STRING
,
m
gmtDirectory
,
mgmtUserAction
);
userSdb
=
sdbOpenTable
(
tsMaxUsers
,
sizeof
(
SUserObj
),
"user"
,
SDB_KEYTYPE_STRING
,
tsM
gmtDirectory
,
mgmtUserAction
);
if
(
userSdb
==
NULL
)
{
if
(
userSdb
==
NULL
)
{
mError
(
"failed to init user data"
);
mError
(
"failed to init user data"
);
return
-
1
;
return
-
1
;
...
...
src/mnode/src/mgmtVgroup.c
浏览文件 @
dfafa1be
...
@@ -76,7 +76,7 @@ int mgmtInitVgroups() {
...
@@ -76,7 +76,7 @@ int mgmtInitVgroups() {
SVgObj
tObj
;
SVgObj
tObj
;
tsVgUpdateSize
=
tObj
.
updateEnd
-
(
int8_t
*
)
&
tObj
;
tsVgUpdateSize
=
tObj
.
updateEnd
-
(
int8_t
*
)
&
tObj
;
vgSdb
=
sdbOpenTable
(
tsMaxVGroups
,
sizeof
(
SVgObj
),
"vgroups"
,
SDB_KEYTYPE_AUTO
,
m
gmtDirectory
,
mgmtVgroupAction
);
vgSdb
=
sdbOpenTable
(
tsMaxVGroups
,
sizeof
(
SVgObj
),
"vgroups"
,
SDB_KEYTYPE_AUTO
,
tsM
gmtDirectory
,
mgmtVgroupAction
);
if
(
vgSdb
==
NULL
)
{
if
(
vgSdb
==
NULL
)
{
mError
(
"failed to init vgroup data"
);
mError
(
"failed to init vgroup data"
);
return
-
1
;
return
-
1
;
...
@@ -205,7 +205,7 @@ SVgObj *mgmtCreateVgroup(SDbObj *pDb) {
...
@@ -205,7 +205,7 @@ SVgObj *mgmtCreateVgroup(SDbObj *pDb) {
mError
(
"db:%s, no enough free dnode to alloc %d vnodes"
,
pDb
->
name
,
pVgroup
->
numOfVnodes
);
mError
(
"db:%s, no enough free dnode to alloc %d vnodes"
,
pDb
->
name
,
pVgroup
->
numOfVnodes
);
free
(
pVgroup
);
free
(
pVgroup
);
pDb
->
vgStatus
=
TSDB_VG_STATUS_FULL
;
pDb
->
vgStatus
=
TSDB_VG_STATUS_FULL
;
taosTmrReset
(
mgmtProcessVgTimer
,
5000
,
pDb
,
m
gmtTmr
,
&
pDb
->
vgTimer
);
taosTmrReset
(
mgmtProcessVgTimer
,
5000
,
pDb
,
tsM
gmtTmr
,
&
pDb
->
vgTimer
);
return
NULL
;
return
NULL
;
}
}
...
...
src/util/inc/tglobalcfg.h
浏览文件 @
dfafa1be
...
@@ -262,7 +262,7 @@ SGlobalConfig *tsGetConfigOption(const char *option);
...
@@ -262,7 +262,7 @@ SGlobalConfig *tsGetConfigOption(const char *option);
#define NEEDTO_COMPRESSS_MSG(size) (tsCompressMsgSize != -1 && (size) > tsCompressMsgSize)
#define NEEDTO_COMPRESSS_MSG(size) (tsCompressMsgSize != -1 && (size) > tsCompressMsgSize)
extern
char
m
gmtDirectory
[];
extern
char
tsM
gmtDirectory
[];
#ifdef __cplusplus
#ifdef __cplusplus
...
...
src/vnode/detail/inc/vnode.h
浏览文件 @
dfafa1be
...
@@ -564,7 +564,7 @@ extern int (*pDecompFunc[])(const char *const input, int compressedSize, const i
...
@@ -564,7 +564,7 @@ extern int (*pDecompFunc[])(const char *const input, int compressedSize, const i
// global variable and APIs provided by mgmt
// global variable and APIs provided by mgmt
extern
char
mgmtStatus
;
extern
char
mgmtStatus
;
extern
char
m
gmtDirectory
[];
extern
char
tsM
gmtDirectory
[];
extern
const
int16_t
vnodeFileVersion
;
extern
const
int16_t
vnodeFileVersion
;
#ifdef __cplusplus
#ifdef __cplusplus
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录