Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
bd660a5b
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
bd660a5b
编写于
3月 15, 2022
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
shm
上级
33fe9fa2
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
10 addition
and
9 deletion
+10
-9
source/dnode/mgmt/container/inc/dndInt.h
source/dnode/mgmt/container/inc/dndInt.h
+1
-1
source/dnode/mgmt/container/src/dndNode.c
source/dnode/mgmt/container/src/dndNode.c
+3
-3
source/dnode/mgmt/dnode/src/dmInt.c
source/dnode/mgmt/dnode/src/dmInt.c
+2
-1
source/dnode/mgmt/dnode/src/dmMsg.c
source/dnode/mgmt/dnode/src/dmMsg.c
+1
-1
source/dnode/mgmt/dnode/src/dmWorker.c
source/dnode/mgmt/dnode/src/dmWorker.c
+3
-3
未找到文件。
source/dnode/mgmt/container/inc/dndInt.h
浏览文件 @
bd660a5b
...
...
@@ -56,7 +56,7 @@ extern "C" {
#define dDebug(...) { if (dDebugFlag & DEBUG_DEBUG) { taosPrintLog("DND ", DEBUG_DEBUG, dDebugFlag, __VA_ARGS__); }}
#define dTrace(...) { if (dDebugFlag & DEBUG_TRACE) { taosPrintLog("DND ", DEBUG_TRACE, dDebugFlag, __VA_ARGS__); }}
typedef
enum
{
DNODE
,
MNODE
,
NODE_MAX
,
VNODES
,
QNODE
,
SNODE
,
BNODE
}
ENodeType
;
typedef
enum
{
MNODE
,
VNODES
,
QNODE
,
SNODE
,
BNODE
,
DNODE
,
NODE_MAX
}
ENodeType
;
typedef
enum
{
PROC_SINGLE
,
PROC_CHILD
,
PROC_PARENT
}
EProcType
;
typedef
enum
{
DND_STAT_INIT
,
DND_STAT_RUNNING
,
DND_STAT_STOPPED
}
EDndStatus
;
typedef
enum
{
DND_WORKER_SINGLE
,
DND_WORKER_MULTI
}
EWorkerType
;
...
...
source/dnode/mgmt/container/src/dndNode.c
浏览文件 @
bd660a5b
...
...
@@ -36,9 +36,9 @@ static void dndResetLog(SMgmtWrapper *pMgmt) {
static
bool
dndRequireNode
(
SMgmtWrapper
*
pMgmt
)
{
bool
required
=
(
*
pMgmt
->
fp
.
requiredFp
)(
pMgmt
);
if
(
!
required
)
{
dDebug
(
"node:%s, no need to start
on this dnode
"
,
pMgmt
->
name
);
dDebug
(
"node:%s, no need to start"
,
pMgmt
->
name
);
}
else
{
dDebug
(
"node:%s, need to start
on this dnode
"
,
pMgmt
->
name
);
dDebug
(
"node:%s, need to start"
,
pMgmt
->
name
);
}
return
required
;
}
...
...
@@ -242,7 +242,7 @@ int32_t dndRun(SDnode *pDnode) {
}
while
(
1
)
{
if
(
pDnode
->
event
!
=
DND_EVENT_STOP
)
{
if
(
pDnode
->
event
=
=
DND_EVENT_STOP
)
{
dInfo
(
"dnode object receive stop event"
);
break
;
}
...
...
source/dnode/mgmt/dnode/src/dmInt.c
浏览文件 @
bd660a5b
...
...
@@ -16,7 +16,7 @@
#define _DEFAULT_SOURCE
#include "dmInt.h"
#include "dmFile.h"
#include "dm
Handle
.h"
#include "dm
Msg
.h"
#include "dmWorker.h"
int32_t
dmGetDnodeId
(
SDnode
*
pDnode
)
{
...
...
@@ -140,6 +140,7 @@ int32_t dmInit(SMgmtWrapper *pWrapper) {
return
-
1
;
}
pWrapper
->
pMgmt
=
pMgmt
;
dndSetStatus
(
pDnode
,
DND_STAT_RUNNING
);
dmSendStatusReq
(
pMgmt
);
dndReportStartup
(
pDnode
,
"TDengine"
,
"initialized successfully"
);
...
...
source/dnode/mgmt/dnode/src/dmMsg.c
浏览文件 @
bd660a5b
...
...
@@ -14,7 +14,7 @@
*/
#define _DEFAULT_SOURCE
#include "dm
Handle
.h"
#include "dm
Msg
.h"
#include "dmFile.h"
#include "dmWorker.h"
#include "vmInt.h"
...
...
source/dnode/mgmt/dnode/src/dmWorker.c
浏览文件 @
bd660a5b
...
...
@@ -15,7 +15,7 @@
#define _DEFAULT_SOURCE
#include "dmWorker.h"
#include "dm
Handle
.h"
#include "dm
Msg
.h"
#include "bmInt.h"
#include "mmInt.h"
...
...
@@ -131,12 +131,12 @@ static void dndProcessMgmtQueue(SDnode *pDnode, SRpcMsg *pMsg) {
}
int32_t
dmStartWorker
(
SDnodeMgmt
*
pMgmt
)
{
if
(
dndInitWorker
(
NULL
,
&
pMgmt
->
mgmtWorker
,
DND_WORKER_SINGLE
,
"dnode-mgmt"
,
1
,
1
,
dndProcessMgmtQueue
)
!=
0
)
{
if
(
dndInitWorker
(
pMgmt
->
pDnode
,
&
pMgmt
->
mgmtWorker
,
DND_WORKER_SINGLE
,
"dnode-mgmt"
,
1
,
1
,
dndProcessMgmtQueue
)
!=
0
)
{
dError
(
"failed to start dnode mgmt worker since %s"
,
terrstr
());
return
-
1
;
}
if
(
dndInitWorker
(
NULL
,
&
pMgmt
->
statusWorker
,
DND_WORKER_SINGLE
,
"dnode-status"
,
1
,
1
,
dndProcessMgmtQueue
)
!=
0
)
{
if
(
dndInitWorker
(
pMgmt
->
pDnode
,
&
pMgmt
->
statusWorker
,
DND_WORKER_SINGLE
,
"dnode-status"
,
1
,
1
,
dndProcessMgmtQueue
)
!=
0
)
{
dError
(
"failed to start dnode mgmt worker since %s"
,
terrstr
());
return
-
1
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录