Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
5bf4dfe8
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1187
Star
22018
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看板
提交
5bf4dfe8
编写于
3月 18, 2022
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
shm
上级
2a62d568
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
23 addition
and
23 deletion
+23
-23
source/dnode/mgmt/container/src/dndMsg.c
source/dnode/mgmt/container/src/dndMsg.c
+1
-1
source/dnode/mgmt/container/src/dndTransport.c
source/dnode/mgmt/container/src/dndTransport.c
+10
-10
source/dnode/mgmt/mnode/src/mmWorker.c
source/dnode/mgmt/mnode/src/mmWorker.c
+3
-3
source/dnode/mgmt/test/sut/src/sut.cpp
source/dnode/mgmt/test/sut/src/sut.cpp
+3
-3
source/dnode/mnode/impl/src/mndTrans.c
source/dnode/mnode/impl/src/mndTrans.c
+5
-5
source/dnode/mnode/impl/src/mnode.c
source/dnode/mnode/impl/src/mnode.c
+1
-1
未找到文件。
source/dnode/mgmt/container/src/dndMsg.c
浏览文件 @
5bf4dfe8
...
...
@@ -61,7 +61,7 @@ void dndProcessRpcMsg(SMgmtWrapper *pWrapper, SRpcMsg *pRpc, SEpSet *pEpSet) {
if
((
pMsg
=
taosAllocateQitem
(
sizeof
(
SNodeMsg
)))
==
NULL
)
goto
_OVER
;
if
(
dndBuildMsg
(
pMsg
,
pRpc
)
!=
0
)
goto
_OVER
;
dTrace
(
"msg:%p, is created,
app:%p user:%s"
,
pMsg
,
pRpc
->
ahandle
,
pMsg
->
user
);
dTrace
(
"msg:%p, is created,
handle:%p app:%p user:%s"
,
pMsg
,
pRpc
->
handle
,
pRpc
->
ahandle
,
pMsg
->
user
);
if
(
pWrapper
->
procType
==
PROC_SINGLE
)
{
code
=
(
*
msgFp
)(
pWrapper
->
pMgmt
,
pMsg
);
}
else
if
(
pWrapper
->
procType
==
PROC_PARENT
)
{
...
...
source/dnode/mgmt/container/src/dndTransport.c
浏览文件 @
5bf4dfe8
...
...
@@ -27,18 +27,18 @@ static void dndProcessResponse(void *parent, SRpcMsg *pRsp, SEpSet *pEpSet) {
if
(
dndGetStatus
(
pDnode
)
!=
DND_STAT_RUNNING
)
{
if
(
pRsp
==
NULL
||
pRsp
->
pCont
==
NULL
)
return
;
dTrace
(
"rsp:%s ignored since dnode exiting,
app:%p"
,
TMSG_INFO
(
msgType
)
,
pRsp
->
ahandle
);
dTrace
(
"rsp:%s ignored since dnode exiting,
handle:%p app:%p"
,
TMSG_INFO
(
msgType
),
pRsp
->
handle
,
pRsp
->
ahandle
);
rpcFreeCont
(
pRsp
->
pCont
);
return
;
}
SMsgHandle
*
pHandle
=
&
pMgmt
->
msgHandles
[
TMSG_INDEX
(
msgType
)];
if
(
pHandle
->
msgFp
!=
NULL
)
{
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
));
dTrace
(
"rsp:%s will be processed by %s,
handle:%p app:%p code:0x%04x:%s"
,
TMSG_INFO
(
msgType
)
,
p
Handle
->
pWrapper
->
name
,
pRsp
->
handle
,
p
Rsp
->
ahandle
,
pRsp
->
code
&
0XFFFF
,
tstrerror
(
pRsp
->
code
));
dndProcessRpcMsg
(
pHandle
->
pWrapper
,
pRsp
,
pEpSet
);
}
else
{
dError
(
"rsp:%s not processed since no handle,
app:%p"
,
TMSG_INFO
(
msgType
)
,
pRsp
->
ahandle
);
dError
(
"rsp:%s not processed since no handle,
handle:%p app:%p"
,
TMSG_INFO
(
msgType
),
pRsp
->
handle
,
pRsp
->
ahandle
);
rpcFreeCont
(
pRsp
->
pCont
);
}
}
...
...
@@ -88,13 +88,13 @@ static void dndProcessRequest(void *param, SRpcMsg *pReq, SEpSet *pEpSet) {
tmsg_t
msgType
=
pReq
->
msgType
;
if
(
msgType
==
TDMT_DND_NETWORK_TEST
)
{
dTrace
(
"
RPC %p, network test req will be processed
, app:%p"
,
pReq
->
handle
,
pReq
->
ahandle
);
dTrace
(
"
network test req will be processed, handle:%p
, app:%p"
,
pReq
->
handle
,
pReq
->
ahandle
);
dndProcessStartupReq
(
pDnode
,
pReq
);
return
;
}
if
(
dndGetStatus
(
pDnode
)
!=
DND_STAT_RUNNING
)
{
dError
(
"
RPC %p, req:%s ignored since dnode not running, app:%p"
,
pReq
->
handle
,
TMSG_INFO
(
msgType
)
,
pReq
->
ahandle
);
dError
(
"
req:%s ignored since dnode not running, handle:%p app:%p"
,
TMSG_INFO
(
msgType
),
pReq
->
handle
,
pReq
->
ahandle
);
SRpcMsg
rspMsg
=
{.
handle
=
pReq
->
handle
,
.
code
=
TSDB_CODE_APP_NOT_READY
,
.
ahandle
=
pReq
->
ahandle
};
rpcSendResponse
(
&
rspMsg
);
rpcFreeCont
(
pReq
->
pCont
);
...
...
@@ -102,7 +102,7 @@ static void dndProcessRequest(void *param, SRpcMsg *pReq, SEpSet *pEpSet) {
}
if
(
pReq
->
pCont
==
NULL
)
{
dTrace
(
"
RPC %p, req:%s not processed since its empty, app:%p"
,
pReq
->
handle
,
TMSG_INFO
(
msgType
)
,
pReq
->
ahandle
);
dTrace
(
"
req:%s not processed since its empty, handle:%p app:%p"
,
TMSG_INFO
(
msgType
),
pReq
->
handle
,
pReq
->
ahandle
);
SRpcMsg
rspMsg
=
{.
handle
=
pReq
->
handle
,
.
code
=
TSDB_CODE_DND_INVALID_MSG_LEN
,
.
ahandle
=
pReq
->
ahandle
};
rpcSendResponse
(
&
rspMsg
);
return
;
...
...
@@ -110,11 +110,11 @@ static void dndProcessRequest(void *param, SRpcMsg *pReq, SEpSet *pEpSet) {
SMsgHandle
*
pHandle
=
&
pMgmt
->
msgHandles
[
TMSG_INDEX
(
msgType
)];
if
(
pHandle
->
msgFp
!=
NULL
)
{
dTrace
(
"
RPC %p, req:%s will be processed by %s, app:%p"
,
pReq
->
handle
,
TMSG_INFO
(
msgType
),
pHandle
->
pWrapper
->
name
,
pReq
->
ahandle
);
dTrace
(
"
req:%s will be processed by %s, handle:%p app:%p"
,
TMSG_INFO
(
msgType
),
pHandle
->
pWrapper
->
name
,
pReq
->
handle
,
pReq
->
ahandle
);
dndProcessRpcMsg
(
pHandle
->
pWrapper
,
pReq
,
pEpSet
);
}
else
{
dError
(
"
RPC %p, req:%s not processed since no handle, app:%p"
,
pReq
->
handle
,
TMSG_INFO
(
msgType
)
,
pReq
->
ahandle
);
dError
(
"
req:%s not processed since no handle, handle:%p app:%p"
,
TMSG_INFO
(
msgType
),
pReq
->
handle
,
pReq
->
ahandle
);
SRpcMsg
rspMsg
=
{.
handle
=
pReq
->
handle
,
.
code
=
TSDB_CODE_MSG_NOT_PROCESSED
,
.
ahandle
=
pReq
->
ahandle
};
rpcSendResponse
(
&
rspMsg
);
rpcFreeCont
(
pReq
->
pCont
);
...
...
source/dnode/mgmt/mnode/src/mmWorker.c
浏览文件 @
5bf4dfe8
...
...
@@ -32,12 +32,12 @@ static void mmProcessQueue(SMnodeMgmt *pMgmt, SNodeMsg *pMsg) {
if
(
pRpc
->
handle
==
NULL
)
return
;
if
(
code
!=
TSDB_CODE_MND_ACTION_IN_PROGRESS
)
{
if
(
code
!=
0
)
code
=
terrno
;
SRpcMsg
rsp
=
{.
handle
=
pRpc
->
handle
,
.
contLen
=
pMsg
->
rspLen
,
.
pCont
=
pMsg
->
pRsp
};
SRpcMsg
rsp
=
{.
handle
=
pRpc
->
handle
,
.
contLen
=
pMsg
->
rspLen
,
.
pCont
=
pMsg
->
pRsp
,
.
code
=
code
};
dndSendRsp
(
pMgmt
->
pWrapper
,
&
rsp
);
}
}
dTrace
(
"msg:%p, is freed
"
,
pMsg
);
dTrace
(
"msg:%p, is freed
, result:0x%04x:%s"
,
pMsg
,
code
&
0XFFFF
,
tstrerror
(
code
)
);
rpcFreeCont
(
pRpc
->
pCont
);
taosFreeQitem
(
pMsg
);
}
...
...
@@ -90,7 +90,7 @@ static int32_t mmPutRpcMsgToWorker(SMnodeMgmt *pMgmt, SDnodeWorker *pWorker, SRp
return
-
1
;
}
dTrace
(
"msg:%p, is created
"
,
pMsg
);
dTrace
(
"msg:%p, is created
, type:%s"
,
pMsg
,
TMSG_INFO
(
pRpc
->
msgType
)
);
pMsg
->
rpcMsg
=
*
pRpc
;
int32_t
code
=
mmPutMsgToWorker
(
pMgmt
,
pWorker
,
pMsg
);
...
...
source/dnode/mgmt/test/sut/src/sut.cpp
浏览文件 @
5bf4dfe8
...
...
@@ -21,9 +21,9 @@ void Testbase::InitLog(const char* path) {
mDebugFlag
=
143
;
cDebugFlag
=
0
;
jniDebugFlag
=
0
;
tmrDebugFlag
=
1
43
;
uDebugFlag
=
1
43
;
rpcDebugFlag
=
1
43
;
tmrDebugFlag
=
1
35
;
uDebugFlag
=
1
35
;
rpcDebugFlag
=
1
35
;
qDebugFlag
=
0
;
wDebugFlag
=
0
;
sDebugFlag
=
0
;
...
...
source/dnode/mnode/impl/src/mndTrans.c
浏览文件 @
5bf4dfe8
...
...
@@ -760,7 +760,7 @@ static void mndTransSendRpcRsp(STrans *pTrans) {
}
free
(
pTrans
->
rpcRsp
);
mDebug
(
"trans:%d, send rsp, code:0x%x stage:%d app:%p"
,
pTrans
->
id
,
pTrans
->
code
&
0xFFFF
,
pTrans
->
stage
,
mDebug
(
"trans:%d, send rsp, code:0x%
04
x stage:%d app:%p"
,
pTrans
->
id
,
pTrans
->
code
&
0xFFFF
,
pTrans
->
stage
,
pTrans
->
rpcAHandle
);
SRpcMsg
rspMsg
=
{.
handle
=
pTrans
->
rpcHandle
,
.
code
=
pTrans
->
code
,
...
...
@@ -816,7 +816,7 @@ void mndTransProcessRsp(SNodeMsg *pRsp) {
}
}
mDebug
(
"trans:%d, action:%d response is received, code:0x%
x, accept:0x%
x"
,
transId
,
action
,
pRsp
->
rpcMsg
.
code
,
mDebug
(
"trans:%d, action:%d response is received, code:0x%
04x, accept:0x%04
x"
,
transId
,
action
,
pRsp
->
rpcMsg
.
code
,
pAction
->
acceptableCode
);
mndTransExecute
(
pMnode
,
pTrans
);
...
...
@@ -928,13 +928,13 @@ static int32_t mndTransExecuteActions(SMnode *pMnode, STrans *pTrans, SArray *pA
mDebug
(
"trans:%d, all %d actions execute successfully"
,
pTrans
->
id
,
numOfActions
);
return
0
;
}
else
{
mError
(
"trans:%d, all %d actions executed, code:0x%x"
,
pTrans
->
id
,
numOfActions
,
errCode
);
mError
(
"trans:%d, all %d actions executed, code:0x%
04
x"
,
pTrans
->
id
,
numOfActions
,
errCode
);
mndTransResetActions
(
pMnode
,
pTrans
,
pArray
);
terrno
=
errCode
;
return
errCode
;
}
}
else
{
mDebug
(
"trans:%d, %d of %d actions executed, code:0x%x"
,
pTrans
->
id
,
numOfReceived
,
numOfActions
,
errCode
);
mDebug
(
"trans:%d, %d of %d actions executed, code:0x%
04
x"
,
pTrans
->
id
,
numOfReceived
,
numOfActions
,
errCode
);
return
TSDB_CODE_MND_ACTION_IN_PROGRESS
;
}
}
...
...
@@ -1111,7 +1111,7 @@ static bool mndTransPerfromFinishedStage(SMnode *pMnode, STrans *pTrans) {
mError
(
"trans:%d, failed to write sdb since %s"
,
pTrans
->
id
,
terrstr
());
}
mDebug
(
"trans:%d, finished, code:0x%x, failedTimes:%d"
,
pTrans
->
id
,
pTrans
->
code
,
pTrans
->
failedTimes
);
mDebug
(
"trans:%d, finished, code:0x%
04
x, failedTimes:%d"
,
pTrans
->
id
,
pTrans
->
code
,
pTrans
->
failedTimes
);
return
continueExec
;
}
...
...
source/dnode/mnode/impl/src/mnode.c
浏览文件 @
5bf4dfe8
...
...
@@ -392,7 +392,7 @@ int32_t mndProcessMsg(SNodeMsg *pMsg) {
void
*
ahandle
=
pMsg
->
rpcMsg
.
ahandle
;
bool
isReq
=
(
pRpc
->
msgType
&
1U
);
mTrace
(
"msg:%p,
type:%s will be processed,
app:%p"
,
pMsg
,
TMSG_INFO
(
msgType
),
ahandle
);
mTrace
(
"msg:%p,
will be processed, type:%s
app:%p"
,
pMsg
,
TMSG_INFO
(
msgType
),
ahandle
);
if
(
isReq
&&
!
mndIsMaster
(
pMnode
))
{
terrno
=
TSDB_CODE_APP_NOT_READY
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录