Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
5e33854b
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
5e33854b
编写于
6月 25, 2020
作者:
S
Shengliang Guan
提交者:
GitHub
6月 25, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #2450 from taosdata/hotfix/leak
Hotfix/leak
上级
e5d67e30
b1859bc1
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
18 addition
and
8 deletion
+18
-8
src/dnode/src/dnodeMgmt.c
src/dnode/src/dnodeMgmt.c
+1
-1
src/mnode/src/mnodeMain.c
src/mnode/src/mnodeMain.c
+1
-1
src/rpc/src/rpcMain.c
src/rpc/src/rpcMain.c
+16
-6
未找到文件。
src/dnode/src/dnodeMgmt.c
浏览文件 @
5e33854b
...
@@ -721,7 +721,7 @@ int32_t dnodeGetDnodeId() {
...
@@ -721,7 +721,7 @@ int32_t dnodeGetDnodeId() {
}
}
void
dnodeSendRedirectMsg
(
SRpcMsg
*
rpcMsg
,
bool
forShell
)
{
void
dnodeSendRedirectMsg
(
SRpcMsg
*
rpcMsg
,
bool
forShell
)
{
SRpcConnInfo
connInfo
;
SRpcConnInfo
connInfo
=
{
0
}
;
rpcGetConnInfo
(
rpcMsg
->
handle
,
&
connInfo
);
rpcGetConnInfo
(
rpcMsg
->
handle
,
&
connInfo
);
SRpcIpSet
ipSet
=
{
0
};
SRpcIpSet
ipSet
=
{
0
};
...
...
src/mnode/src/mnodeMain.c
浏览文件 @
5e33854b
...
@@ -121,8 +121,8 @@ void mnodeCleanupSystem() {
...
@@ -121,8 +121,8 @@ void mnodeCleanupSystem() {
dnodeFreeMnodeWqueue
();
dnodeFreeMnodeWqueue
();
dnodeFreeMnodeRqueue
();
dnodeFreeMnodeRqueue
();
dnodeFreeMnodePqueue
();
dnodeFreeMnodePqueue
();
mnodeCleanupTimer
();
mnodeCleanupComponents
(
sizeof
(
tsMnodeComponents
)
/
sizeof
(
tsMnodeComponents
[
0
])
-
1
);
mnodeCleanupComponents
(
sizeof
(
tsMnodeComponents
)
/
sizeof
(
tsMnodeComponents
[
0
])
-
1
);
mnodeCleanupTimer
();
mPrint
(
"mnode is cleaned up"
);
mPrint
(
"mnode is cleaned up"
);
}
}
...
...
src/rpc/src/rpcMain.c
浏览文件 @
5e33854b
...
@@ -819,7 +819,8 @@ static int rpcProcessRspHead(SRpcConn *pConn, SRpcHead *pHead) {
...
@@ -819,7 +819,8 @@ static int rpcProcessRspHead(SRpcConn *pConn, SRpcHead *pHead) {
tTrace
(
"%s, authentication shall be restarted"
,
pConn
->
info
);
tTrace
(
"%s, authentication shall be restarted"
,
pConn
->
info
);
pConn
->
secured
=
0
;
pConn
->
secured
=
0
;
rpcSendMsgToPeer
(
pConn
,
pConn
->
pReqMsg
,
pConn
->
reqMsgLen
);
rpcSendMsgToPeer
(
pConn
,
pConn
->
pReqMsg
,
pConn
->
reqMsgLen
);
pConn
->
pTimer
=
taosTmrStart
(
rpcProcessRetryTimer
,
tsRpcTimer
,
pConn
,
pRpc
->
tmrCtrl
);
if
(
pConn
->
connType
!=
RPC_CONN_TCPC
)
pConn
->
pTimer
=
taosTmrStart
(
rpcProcessRetryTimer
,
tsRpcTimer
,
pConn
,
pRpc
->
tmrCtrl
);
return
TSDB_CODE_RPC_ALREADY_PROCESSED
;
return
TSDB_CODE_RPC_ALREADY_PROCESSED
;
}
}
...
@@ -828,7 +829,8 @@ static int rpcProcessRspHead(SRpcConn *pConn, SRpcHead *pHead) {
...
@@ -828,7 +829,8 @@ static int rpcProcessRspHead(SRpcConn *pConn, SRpcHead *pHead) {
tTrace
(
"%s, peer is still processing the transaction, retry:%d"
,
pConn
->
info
,
pConn
->
tretry
);
tTrace
(
"%s, peer is still processing the transaction, retry:%d"
,
pConn
->
info
,
pConn
->
tretry
);
pConn
->
tretry
++
;
pConn
->
tretry
++
;
rpcSendReqHead
(
pConn
);
rpcSendReqHead
(
pConn
);
pConn
->
pTimer
=
taosTmrStart
(
rpcProcessRetryTimer
,
tsRpcTimer
,
pConn
,
pRpc
->
tmrCtrl
);
if
(
pConn
->
connType
!=
RPC_CONN_TCPC
)
pConn
->
pTimer
=
taosTmrStart
(
rpcProcessRetryTimer
,
tsRpcTimer
,
pConn
,
pRpc
->
tmrCtrl
);
return
TSDB_CODE_RPC_ALREADY_PROCESSED
;
return
TSDB_CODE_RPC_ALREADY_PROCESSED
;
}
else
{
}
else
{
// peer still in processing, give up
// peer still in processing, give up
...
@@ -896,8 +898,12 @@ static SRpcConn *rpcProcessMsgHead(SRpcInfo *pRpc, SRecvInfo *pRecv) {
...
@@ -896,8 +898,12 @@ static SRpcConn *rpcProcessMsgHead(SRpcInfo *pRpc, SRecvInfo *pRecv) {
terrno
=
rpcProcessReqHead
(
pConn
,
pHead
);
terrno
=
rpcProcessReqHead
(
pConn
,
pHead
);
pConn
->
connType
=
pRecv
->
connType
;
pConn
->
connType
=
pRecv
->
connType
;
// client shall send the request within tsRpcTime again, double it
// stop idle timer
taosTmrReset
(
rpcProcessIdleTimer
,
tsRpcTimer
*
2
,
pConn
,
pRpc
->
tmrCtrl
,
&
pConn
->
pIdleTimer
);
taosTmrStopA
(
&
pConn
->
pIdleTimer
);
// client shall send the request within tsRpcTime again for UDP, double it
if
(
pConn
->
connType
!=
RPC_CONN_TCPS
)
pConn
->
pIdleTimer
=
taosTmrStart
(
rpcProcessIdleTimer
,
tsRpcTimer
*
2
,
pConn
,
pRpc
->
tmrCtrl
);
}
else
{
}
else
{
terrno
=
rpcProcessRspHead
(
pConn
,
pHead
);
terrno
=
rpcProcessRspHead
(
pConn
,
pHead
);
}
}
...
@@ -1024,7 +1030,8 @@ static void rpcProcessIncomingMsg(SRpcConn *pConn, SRpcHead *pHead) {
...
@@ -1024,7 +1030,8 @@ static void rpcProcessIncomingMsg(SRpcConn *pConn, SRpcHead *pHead) {
rpcAddRef
(
pRpc
);
// add the refCount for requests
rpcAddRef
(
pRpc
);
// add the refCount for requests
// start the progress timer to monitor the response from server app
// start the progress timer to monitor the response from server app
pConn
->
pTimer
=
taosTmrStart
(
rpcProcessProgressTimer
,
tsProgressTimer
,
pConn
,
pRpc
->
tmrCtrl
);
if
(
pConn
->
connType
!=
RPC_CONN_TCPS
)
pConn
->
pTimer
=
taosTmrStart
(
rpcProcessProgressTimer
,
tsProgressTimer
,
pConn
,
pRpc
->
tmrCtrl
);
// notify the server app
// notify the server app
(
*
(
pRpc
->
cfp
))(
&
rpcMsg
,
NULL
);
(
*
(
pRpc
->
cfp
))(
&
rpcMsg
,
NULL
);
...
@@ -1056,9 +1063,11 @@ static void rpcProcessIncomingMsg(SRpcConn *pConn, SRpcHead *pHead) {
...
@@ -1056,9 +1063,11 @@ static void rpcProcessIncomingMsg(SRpcConn *pConn, SRpcHead *pHead) {
for
(
int
i
=
0
;
i
<
pContext
->
ipSet
.
numOfIps
;
++
i
)
for
(
int
i
=
0
;
i
<
pContext
->
ipSet
.
numOfIps
;
++
i
)
pContext
->
ipSet
.
port
[
i
]
=
htons
(
pContext
->
ipSet
.
port
[
i
]);
pContext
->
ipSet
.
port
[
i
]
=
htons
(
pContext
->
ipSet
.
port
[
i
]);
rpcSendReqToServer
(
pRpc
,
pContext
);
rpcSendReqToServer
(
pRpc
,
pContext
);
rpcFreeCont
(
rpcMsg
.
pCont
);
}
else
if
(
pHead
->
code
==
TSDB_CODE_RPC_NOT_READY
)
{
}
else
if
(
pHead
->
code
==
TSDB_CODE_RPC_NOT_READY
)
{
pContext
->
code
=
pHead
->
code
;
pContext
->
code
=
pHead
->
code
;
rpcProcessConnError
(
pContext
,
NULL
);
rpcProcessConnError
(
pContext
,
NULL
);
rpcFreeCont
(
rpcMsg
.
pCont
);
}
else
{
}
else
{
rpcNotifyClient
(
pContext
,
&
rpcMsg
);
rpcNotifyClient
(
pContext
,
&
rpcMsg
);
}
}
...
@@ -1187,7 +1196,8 @@ static void rpcSendReqToServer(SRpcInfo *pRpc, SRpcReqContext *pContext) {
...
@@ -1187,7 +1196,8 @@ static void rpcSendReqToServer(SRpcInfo *pRpc, SRpcReqContext *pContext) {
pConn
->
pContext
=
pContext
;
pConn
->
pContext
=
pContext
;
rpcSendMsgToPeer
(
pConn
,
msg
,
msgLen
);
rpcSendMsgToPeer
(
pConn
,
msg
,
msgLen
);
taosTmrReset
(
rpcProcessRetryTimer
,
tsRpcTimer
,
pConn
,
pRpc
->
tmrCtrl
,
&
pConn
->
pTimer
);
if
(
pConn
->
connType
!=
RPC_CONN_TCPC
)
taosTmrReset
(
rpcProcessRetryTimer
,
tsRpcTimer
,
pConn
,
pRpc
->
tmrCtrl
,
&
pConn
->
pTimer
);
rpcUnlockConn
(
pConn
);
rpcUnlockConn
(
pConn
);
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录