Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
3800079d
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看板
提交
3800079d
编写于
5月 18, 2022
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor: adjust msg logs
上级
c50bb310
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
17 addition
and
16 deletion
+17
-16
source/dnode/mgmt/node_mgmt/src/dmMgmt.c
source/dnode/mgmt/node_mgmt/src/dmMgmt.c
+8
-8
source/dnode/mgmt/node_mgmt/src/dmNodes.c
source/dnode/mgmt/node_mgmt/src/dmNodes.c
+6
-5
source/dnode/mgmt/node_mgmt/src/dmProc.c
source/dnode/mgmt/node_mgmt/src/dmProc.c
+2
-2
source/dnode/mgmt/node_mgmt/src/dmTransport.c
source/dnode/mgmt/node_mgmt/src/dmTransport.c
+1
-1
未找到文件。
source/dnode/mgmt/node_mgmt/src/dmMgmt.c
浏览文件 @
3800079d
...
...
@@ -274,25 +274,25 @@ static void dmGetServerStartupStatus(SDnode *pDnode, SServerStatusRsp *pStatus)
}
}
void
dmProcessNetTestReq
(
SDnode
*
pDnode
,
SRpcMsg
*
p
Req
)
{
dDebug
(
"
net test req is received
"
);
SRpcMsg
rsp
=
{.
code
=
0
,
.
info
=
p
Req
->
info
};
rsp
.
pCont
=
rpcMallocCont
(
p
Req
->
contLen
);
void
dmProcessNetTestReq
(
SDnode
*
pDnode
,
SRpcMsg
*
p
Msg
)
{
dDebug
(
"
start to process net test req
"
);
SRpcMsg
rsp
=
{.
code
=
0
,
.
info
=
p
Msg
->
info
};
rsp
.
pCont
=
rpcMallocCont
(
p
Msg
->
contLen
);
if
(
rsp
.
pCont
==
NULL
)
{
rsp
.
code
=
TSDB_CODE_OUT_OF_MEMORY
;
}
else
{
rsp
.
contLen
=
p
Req
->
contLen
;
rsp
.
contLen
=
p
Msg
->
contLen
;
}
rpcSendResponse
(
&
rsp
);
}
void
dmProcessServerStartupStatus
(
SDnode
*
pDnode
,
SRpcMsg
*
p
Req
)
{
dDebug
(
"s
erver startup status req is received
"
);
void
dmProcessServerStartupStatus
(
SDnode
*
pDnode
,
SRpcMsg
*
p
Msg
)
{
dDebug
(
"s
tart to process server startup status req
"
);
SServerStatusRsp
statusRsp
=
{
0
};
dmGetServerStartupStatus
(
pDnode
,
&
statusRsp
);
SRpcMsg
rspMsg
=
{.
info
=
p
Req
->
info
};
SRpcMsg
rspMsg
=
{.
info
=
p
Msg
->
info
};
int32_t
rspLen
=
tSerializeSServerStatusRsp
(
NULL
,
0
,
&
statusRsp
);
if
(
rspLen
<
0
)
{
rspMsg
.
code
=
TSDB_CODE_OUT_OF_MEMORY
;
...
...
source/dnode/mgmt/node_mgmt/src/dmNodes.c
浏览文件 @
3800079d
...
...
@@ -37,6 +37,7 @@ static int32_t dmCreateShm(SMgmtWrapper *pWrapper) {
dError
(
"node:%s, failed to create shm size:%d since %s"
,
pWrapper
->
name
,
shmsize
,
terrstr
());
return
-
1
;
}
dInfo
(
"node:%s, shm:%d is created, size:%d"
,
pWrapper
->
name
,
pWrapper
->
proc
.
shm
.
id
,
shmsize
);
return
0
;
}
...
...
@@ -60,7 +61,7 @@ static int32_t dmNewProc(SMgmtWrapper *pWrapper, EDndNodeType ntype) {
taosIgnSignal
(
SIGCHLD
);
pWrapper
->
proc
.
pid
=
pid
;
dInfo
(
"node:%s, continue running in new p
rocess
:%d"
,
pWrapper
->
name
,
pid
);
dInfo
(
"node:%s, continue running in new p
id
:%d"
,
pWrapper
->
name
,
pid
);
return
0
;
}
...
...
@@ -177,11 +178,11 @@ void dmCloseNode(SMgmtWrapper *pWrapper) {
if
(
OnlyInParentProc
(
pWrapper
))
{
int32_t
pid
=
pWrapper
->
proc
.
pid
;
if
(
pid
>
0
&&
taosProcExist
(
pid
))
{
dInfo
(
"node:%s, send kill signal to the child p
rocess
:%d"
,
pWrapper
->
name
,
pid
);
dInfo
(
"node:%s, send kill signal to the child p
id
:%d"
,
pWrapper
->
name
,
pid
);
taosKillProc
(
pid
);
dInfo
(
"node:%s, wait for child p
rocess
:%d to stop"
,
pWrapper
->
name
,
pid
);
dInfo
(
"node:%s, wait for child p
id
:%d to stop"
,
pWrapper
->
name
,
pid
);
taosWaitProc
(
pid
);
dInfo
(
"node:%s, child p
rocess
:%d is stopped"
,
pWrapper
->
name
,
pid
);
dInfo
(
"node:%s, child p
id
:%d is stopped"
,
pWrapper
->
name
,
pid
);
}
}
...
...
@@ -255,7 +256,7 @@ static void dmWatchNodes(SDnode *pDnode) {
if
(
!
OnlyInParentProc
(
pWrapper
))
continue
;
if
(
proc
->
pid
<=
0
||
!
taosProcExist
(
proc
->
pid
))
{
dError
(
"node:%s, p
rocess
:%d is killed and needs to restart"
,
pWrapper
->
name
,
proc
->
pid
);
dError
(
"node:%s, p
id
:%d is killed and needs to restart"
,
pWrapper
->
name
,
proc
->
pid
);
dmCloseProcRpcHandles
(
&
pWrapper
->
proc
);
dmNewProc
(
pWrapper
,
ntype
);
}
...
...
source/dnode/mgmt/node_mgmt/src/dmProc.c
浏览文件 @
3800079d
...
...
@@ -162,7 +162,7 @@ static inline int32_t dmPushToProcQueue(SProc *proc, SProcQueue *queue, SRpcMsg
return
0
;
}
static
int32_t
dmPopFromProcQueue
(
SProcQueue
*
queue
,
SRpcMsg
**
ppMsg
,
EProcFuncType
*
pFuncType
)
{
static
in
line
in
t32_t
dmPopFromProcQueue
(
SProcQueue
*
queue
,
SRpcMsg
**
ppMsg
,
EProcFuncType
*
pFuncType
)
{
tsem_wait
(
&
queue
->
sem
);
taosThreadMutexLock
(
&
queue
->
mutex
);
...
...
@@ -412,7 +412,7 @@ void dmCleanupProc(struct SMgmtWrapper *pWrapper) {
SProc
*
proc
=
&
pWrapper
->
proc
;
if
(
proc
->
name
==
NULL
)
return
;
dDebug
(
"node:%s, start to clean
up proc"
,
pWrapper
->
name
);
dDebug
(
"node:%s, start to cleanup proc"
,
pWrapper
->
name
);
dmStopProc
(
proc
);
dmCleanupProcQueue
(
proc
->
cqueue
);
dmCleanupProcQueue
(
proc
->
pqueue
);
...
...
source/dnode/mgmt/node_mgmt/src/dmTransport.c
浏览文件 @
3800079d
...
...
@@ -43,8 +43,8 @@ int32_t dmProcessNodeMsg(SMgmtWrapper *pWrapper, SRpcMsg *pMsg) {
return
-
1
;
}
pMsg
->
info
.
wrapper
=
pWrapper
;
dTrace
(
"msg:%p, will be processed by %s"
,
pMsg
,
pWrapper
->
name
);
pMsg
->
info
.
wrapper
=
pWrapper
;
return
(
*
msgFp
)(
pWrapper
->
pMgmt
,
pMsg
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录