Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
2a5e231f
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看板
提交
2a5e231f
编写于
3月 15, 2022
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
shm
上级
359482be
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
17 addition
and
12 deletion
+17
-12
source/dnode/mgmt/container/src/dndNode.c
source/dnode/mgmt/container/src/dndNode.c
+3
-2
source/dnode/mgmt/container/src/dndTransport.c
source/dnode/mgmt/container/src/dndTransport.c
+4
-4
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
+2
-1
source/dnode/mgmt/main/inc/dndMain.h
source/dnode/mgmt/main/inc/dndMain.h
+3
-3
source/dnode/mgmt/mnode/src/mmWorker.c
source/dnode/mgmt/mnode/src/mmWorker.c
+4
-1
未找到文件。
source/dnode/mgmt/container/src/dndNode.c
浏览文件 @
2a5e231f
...
...
@@ -77,6 +77,7 @@ SDnode *dndCreate(SDndCfg *pCfg) {
goto
_OVER
;
}
memcpy
(
&
pDnode
->
cfg
,
pCfg
,
sizeof
(
SDndCfg
));
dndSetStatus
(
pDnode
,
DND_STAT_INIT
);
pDnode
->
rebootTime
=
taosGetTimestampMs
();
pDnode
->
pLockFile
=
dndCheckRunning
(
pCfg
->
dataDir
);
...
...
@@ -100,7 +101,6 @@ SDnode *dndCreate(SDndCfg *pCfg) {
qmGetMgmtFp
(
&
pDnode
->
wrappers
[
QNODE
]);
smGetMgmtFp
(
&
pDnode
->
wrappers
[
SNODE
]);
bmGetMgmtFp
(
&
pDnode
->
wrappers
[
BNODE
]);
memcpy
(
&
pDnode
->
cfg
,
pCfg
,
sizeof
(
SDndCfg
));
if
(
dndInitMsgHandle
(
pDnode
)
!=
0
)
{
goto
_OVER
;
...
...
@@ -306,12 +306,13 @@ void dndProcessRpcMsg(SMgmtWrapper *pWrapper, SRpcMsg *pRpc, SEpSet *pEpSet) {
goto
_OVER
;
}
dTrace
(
"msg:%p, is created,
user:%s"
,
pMsg
,
pMsg
->
user
);
dTrace
(
"msg:%p, is created,
app:%p user:%s"
,
pMsg
,
pRpc
->
ahandle
,
pMsg
->
user
);
code
=
(
*
msgFp
)(
pWrapper
,
pMsg
);
_OVER:
if
(
code
!=
0
)
{
dError
(
"msg:%p, failed to process since %s"
,
pMsg
,
terrstr
());
bool
isReq
=
(
pRpc
->
msgType
&
1U
);
if
(
isReq
)
{
SRpcMsg
rsp
=
{.
handle
=
pRpc
->
handle
,
.
ahandle
=
pRpc
->
ahandle
,
.
code
=
terrno
};
...
...
source/dnode/mgmt/container/src/dndTransport.c
浏览文件 @
2a5e231f
...
...
@@ -37,8 +37,8 @@ static void dndProcessResponse(void *parent, SRpcMsg *pRsp, SEpSet *pEpSet) {
SMsgHandle
*
pHandle
=
&
pMgmt
->
msgHandles
[
TMSG_INDEX
(
msgType
)];
if
(
pHandle
->
msgFp
!=
NULL
)
{
dTrace
(
"rsp:%s will be processed by %s,
code:0x%x app:%p
"
,
TMSG_INFO
(
msgType
),
pHandle
->
pWrapper
->
name
,
pRsp
->
code
&
0XFFFF
,
pRsp
->
ahandle
);
dTrace
(
"rsp:%s will be processed by %s,
app:%p code:0x%x:%s
"
,
TMSG_INFO
(
msgType
),
pHandle
->
pWrapper
->
name
,
pRsp
->
ahandle
,
pRsp
->
code
&
0XFFFF
,
tstrerror
(
pRsp
->
code
)
);
dndProcessRpcMsg
(
pHandle
->
pWrapper
,
pRsp
,
pEpSet
);
}
else
{
dError
(
"rsp:%s not processed, app:%p"
,
TMSG_INFO
(
msgType
),
pRsp
->
ahandle
);
...
...
@@ -51,7 +51,7 @@ int32_t dndInitClient(SDnode *pDnode) {
SRpcInit
rpcInit
;
memset
(
&
rpcInit
,
0
,
sizeof
(
rpcInit
));
rpcInit
.
label
=
"
CLI
"
;
rpcInit
.
label
=
"
DND
"
;
rpcInit
.
numOfThreads
=
1
;
rpcInit
.
cfp
=
dndProcessResponse
;
rpcInit
.
sessions
=
1024
;
...
...
@@ -218,7 +218,7 @@ int32_t dndInitServer(SDnode *pDnode) {
SRpcInit
rpcInit
;
memset
(
&
rpcInit
,
0
,
sizeof
(
rpcInit
));
rpcInit
.
localPort
=
pDnode
->
cfg
.
serverPort
;
rpcInit
.
label
=
"
SRV
"
;
rpcInit
.
label
=
"
DND
"
;
rpcInit
.
numOfThreads
=
numOfThreads
;
rpcInit
.
cfp
=
dndProcessRequest
;
rpcInit
.
sessions
=
tsMaxShellConns
;
...
...
source/dnode/mgmt/dnode/src/dmMsg.c
浏览文件 @
2a5e231f
...
...
@@ -54,7 +54,7 @@ void dmSendStatusReq(SDnodeMgmt *pMgmt) {
SRpcMsg
rpcMsg
=
{.
pCont
=
pHead
,
.
contLen
=
contLen
,
.
msgType
=
TDMT_MND_STATUS
,
.
ahandle
=
(
void
*
)
9527
};
pMgmt
->
statusSent
=
1
;
dTrace
(
"send
status req to mnode, ahandle:%p"
,
rpcMsg
.
ahandle
);
dTrace
(
"send
req:%s to mnode, app:%p"
,
TMSG_INFO
(
rpcMsg
.
msgType
)
,
rpcMsg
.
ahandle
);
dndSendReqToMnode
(
pMgmt
->
pDnode
,
&
rpcMsg
);
}
...
...
source/dnode/mgmt/dnode/src/dmWorker.c
浏览文件 @
2a5e231f
...
...
@@ -130,6 +130,7 @@ static void dmProcessMgmtQueue(SDnode *pDnode, SNodeMsg *pNodeMsg) {
rpcFreeCont
(
pMsg
->
pCont
);
pMsg
->
pCont
=
NULL
;
taosFreeQitem
(
pNodeMsg
);
dTrace
(
"msg:%p, is freed"
,
pNodeMsg
);
}
int32_t
dmStartWorker
(
SDnodeMgmt
*
pMgmt
)
{
...
...
@@ -174,5 +175,5 @@ int32_t dmProcessMgmtMsg(SMgmtWrapper *pWrapper, SNodeMsg *pMsg) {
}
dTrace
(
"msg:%p, will be written to worker %s"
,
pMsg
,
pWorker
->
name
);
return
dndWriteMsgToWorker
(
pWorker
,
pMsg
,
sizeof
(
SNodeMsg
)
);
return
dndWriteMsgToWorker
(
pWorker
,
pMsg
,
0
);
}
\ No newline at end of file
source/dnode/mgmt/main/inc/dndMain.h
浏览文件 @
2a5e231f
...
...
@@ -14,8 +14,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _TD_DND_
EXEC
_H_
#define _TD_DND_
EXEC
_H_
#ifndef _TD_DND_
MAIN
_H_
#define _TD_DND_
MAIN
_H_
#include "dnode.h"
...
...
@@ -45,4 +45,4 @@ SDndCfg dndGetCfg();
}
#endif
#endif
/*_TD_DND_
EXEC
_H_*/
#endif
/*_TD_DND_
MAIN
_H_*/
source/dnode/mgmt/mnode/src/mmWorker.c
浏览文件 @
2a5e231f
...
...
@@ -270,4 +270,7 @@ static void mmConsumeMsgQueue(SDnode *pDnode, SMndMsg *pMsg) {
int32_t
mmProcessWriteMsg
(
SMgmtWrapper
*
pWrapper
,
SNodeMsg
*
pMsg
)
{
return
0
;}
int32_t
mmProcessSyncMsg
(
SMgmtWrapper
*
pWrapper
,
SNodeMsg
*
pMsg
)
{
return
0
;}
int32_t
mmProcessReadMsg
(
SMgmtWrapper
*
pWrapper
,
SNodeMsg
*
pMsg
)
{
return
0
;}
\ No newline at end of file
int32_t
mmProcessReadMsg
(
SMgmtWrapper
*
pWrapper
,
SNodeMsg
*
pMsg
)
{
terrno
=
TSDB_CODE_MSG_NOT_PROCESSED
;
return
-
1
;
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录