Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
9c426540
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看板
提交
9c426540
编写于
11月 18, 2022
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: memory leaks while check mnode state
上级
9eca87ac
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
29 addition
and
16 deletion
+29
-16
source/dnode/mgmt/mgmt_mnode/src/mmWorker.c
source/dnode/mgmt/mgmt_mnode/src/mmWorker.c
+3
-0
source/dnode/mnode/impl/src/mndMain.c
source/dnode/mnode/impl/src/mndMain.c
+1
-1
source/libs/transport/src/tmsgcb.c
source/libs/transport/src/tmsgcb.c
+7
-1
source/libs/transport/src/transSvr.c
source/libs/transport/src/transSvr.c
+9
-5
tests/parallel_test/cases.task
tests/parallel_test/cases.task
+7
-7
tests/script/tsim/db/alter_replica_13.sim
tests/script/tsim/db/alter_replica_13.sim
+2
-2
未找到文件。
source/dnode/mgmt/mgmt_mnode/src/mmWorker.c
浏览文件 @
9c426540
...
...
@@ -56,6 +56,9 @@ static void mmProcessRpcMsg(SQueueInfo *pInfo, SRpcMsg *pMsg) {
if
(
IsReq
(
pMsg
)
&&
pMsg
->
info
.
handle
!=
NULL
&&
code
!=
TSDB_CODE_ACTION_IN_PROGRESS
)
{
if
(
code
!=
0
&&
terrno
!=
0
)
code
=
terrno
;
mmSendRsp
(
pMsg
,
code
);
}
else
{
rpcFreeCont
(
pMsg
->
info
.
rsp
);
pMsg
->
info
.
rsp
=
NULL
;
}
if
(
code
==
TSDB_CODE_RPC_REDIRECT
)
{
...
...
source/dnode/mnode/impl/src/mndMain.c
浏览文件 @
9c426540
...
...
@@ -577,9 +577,9 @@ static int32_t mndCheckMnodeState(SRpcMsg *pMsg) {
int32_t
contLen
=
tSerializeSEpSet
(
NULL
,
0
,
&
epSet
);
pMsg
->
info
.
rsp
=
rpcMallocCont
(
contLen
);
pMsg
->
info
.
hasEpSet
=
1
;
if
(
pMsg
->
info
.
rsp
!=
NULL
)
{
tSerializeSEpSet
(
pMsg
->
info
.
rsp
,
contLen
,
&
epSet
);
pMsg
->
info
.
hasEpSet
=
1
;
pMsg
->
info
.
rspLen
=
contLen
;
terrno
=
TSDB_CODE_RPC_REDIRECT
;
}
else
{
...
...
source/libs/transport/src/tmsgcb.c
浏览文件 @
9c426540
...
...
@@ -44,7 +44,13 @@ int32_t tmsgSendReq(const SEpSet* epSet, SRpcMsg* pMsg) {
return
code
;
}
void
tmsgSendRsp
(
SRpcMsg
*
pMsg
)
{
return
(
*
defaultMsgCb
.
sendRspFp
)(
pMsg
);
}
void
tmsgSendRsp
(
SRpcMsg
*
pMsg
)
{
#if 1
rpcSendResponse
(
pMsg
);
#else
return
(
*
defaultMsgCb
.
sendRspFp
)(
pMsg
);
#endif
}
void
tmsgSendRedirectRsp
(
SRpcMsg
*
pMsg
,
const
SEpSet
*
pNewEpSet
)
{
(
*
defaultMsgCb
.
sendRedirectRspFp
)(
pMsg
,
pNewEpSet
);
}
...
...
source/libs/transport/src/transSvr.c
浏览文件 @
9c426540
...
...
@@ -462,8 +462,6 @@ static void uvStartSendResp(SSvrMsg* smsg) {
if
(
pConn
->
broken
==
true
)
{
// persist by
destroySmsg
(
smsg
);
// transFreeMsg(smsg->msg.pCont);
// taosMemoryFree(smsg);
transUnrefSrvHandle
(
pConn
);
return
;
}
...
...
@@ -1234,7 +1232,9 @@ int transReleaseSrvHandle(void* handle) {
m
->
type
=
Release
;
tTrace
(
"%s conn %p start to release"
,
transLabel
(
pThrd
->
pTransInst
),
exh
->
handle
);
transAsyncSend
(
pThrd
->
asyncPool
,
&
m
->
q
);
if
(
0
!=
transAsyncSend
(
pThrd
->
asyncPool
,
&
m
->
q
))
{
destroySmsg
(
m
);
}
transReleaseExHandle
(
transGetRefMgt
(),
refId
);
return
0
;
...
...
@@ -1269,7 +1269,9 @@ int transSendResponse(const STransMsg* msg) {
STraceId
*
trace
=
(
STraceId
*
)
&
msg
->
info
.
traceId
;
tGTrace
(
"conn %p start to send resp (1/2)"
,
exh
->
handle
);
transAsyncSend
(
pThrd
->
asyncPool
,
&
m
->
q
);
if
(
0
!=
transAsyncSend
(
pThrd
->
asyncPool
,
&
m
->
q
))
{
destroySmsg
(
m
);
}
transReleaseExHandle
(
transGetRefMgt
(),
refId
);
return
0
;
...
...
@@ -1303,7 +1305,9 @@ int transRegisterMsg(const STransMsg* msg) {
STrans
*
pTransInst
=
pThrd
->
pTransInst
;
tTrace
(
"%s conn %p start to register brokenlink callback"
,
transLabel
(
pTransInst
),
exh
->
handle
);
transAsyncSend
(
pThrd
->
asyncPool
,
&
m
->
q
);
if
(
0
!=
transAsyncSend
(
pThrd
->
asyncPool
,
&
m
->
q
))
{
destroySmsg
(
m
);
}
transReleaseExHandle
(
transGetRefMgt
(),
refId
);
return
0
;
...
...
tests/parallel_test/cases.task
浏览文件 @
9c426540
...
...
@@ -56,7 +56,7 @@
,,y,script,./test.sh -f tsim/dnode/redistribute_vgroup_replica3_v2.sim
,,y,script,./test.sh -f tsim/dnode/redistribute_vgroup_replica3_v3.sim
,,y,script,./test.sh -f tsim/dnode/vnode_clean.sim
,,,script,./test.sh -f tsim/dnode/use_dropped_dnode.sim
,,
y
,script,./test.sh -f tsim/dnode/use_dropped_dnode.sim
,,y,script,./test.sh -f tsim/dnode/split_vgroup_replica1.sim
,,y,script,./test.sh -f tsim/dnode/split_vgroup_replica3.sim
,,y,script,./test.sh -f tsim/import/basic.sim
...
...
@@ -176,11 +176,11 @@
,,y,script,./test.sh -f tsim/query/udf.sim
,,y,script,./test.sh -f tsim/qnode/basic1.sim
,,y,script,./test.sh -f tsim/snode/basic1.sim
,,,script,./test.sh -f tsim/mnode/basic1.sim
,,,script,./test.sh -f tsim/mnode/basic2.sim
,,,script,./test.sh -f tsim/mnode/basic3.sim
,,,script,./test.sh -f tsim/mnode/basic4.sim
,,,script,./test.sh -f tsim/mnode/basic5.sim
,,
y
,script,./test.sh -f tsim/mnode/basic1.sim
,,
y
,script,./test.sh -f tsim/mnode/basic2.sim
,,
y
,script,./test.sh -f tsim/mnode/basic3.sim
,,
y
,script,./test.sh -f tsim/mnode/basic4.sim
,,
y
,script,./test.sh -f tsim/mnode/basic5.sim
,,y,script,./test.sh -f tsim/show/basic.sim
,,y,script,./test.sh -f tsim/table/autocreate.sim
,,y,script,./test.sh -f tsim/table/basic1.sim
...
...
@@ -291,7 +291,7 @@
,,n,script,./test.sh -f tsim/valgrind/checkError7.sim
,,n,script,./test.sh -f tsim/valgrind/checkError8.sim
,,n,script,./test.sh -f tsim/valgrind/checkUdf.sim
,,,script,./test.sh -f tsim/vnode/replica3_basic.sim
,,
y
,script,./test.sh -f tsim/vnode/replica3_basic.sim
,,y,script,./test.sh -f tsim/vnode/replica3_repeat.sim
,,y,script,./test.sh -f tsim/vnode/replica3_vgroup.sim
,,y,script,./test.sh -f tsim/vnode/replica3_many.sim
...
...
tests/script/tsim/db/alter_replica_13.sim
浏览文件 @
9c426540
...
...
@@ -138,10 +138,10 @@ while $i < 10
if $data[0][4] != leader then
return -1
endi
if $data[0][6]
!= follow
er then
if $data[0][6]
== lead
er then
return -1
endi
if $data[0][8]
!= follow
er then
if $data[0][8]
== lead
er then
return -1
endi
endw
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录