Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
617d8d40
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看板
提交
617d8d40
编写于
1月 03, 2023
作者:
L
Liu Jicong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix mem leak
上级
d33bcc99
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
28 addition
and
28 deletion
+28
-28
source/client/src/clientTmq.c
source/client/src/clientTmq.c
+5
-3
source/dnode/mgmt/mgmt_snode/src/smWorker.c
source/dnode/mgmt/mgmt_snode/src/smWorker.c
+1
-5
source/dnode/mgmt/mgmt_vnode/src/vmWorker.c
source/dnode/mgmt/mgmt_vnode/src/vmWorker.c
+6
-10
source/dnode/vnode/src/tq/tqMeta.c
source/dnode/vnode/src/tq/tqMeta.c
+1
-2
source/dnode/vnode/src/tq/tqOffset.c
source/dnode/vnode/src/tq/tqOffset.c
+11
-6
source/dnode/vnode/src/tq/tqSink.c
source/dnode/vnode/src/tq/tqSink.c
+1
-1
source/dnode/vnode/src/tq/tqSnapshot.c
source/dnode/vnode/src/tq/tqSnapshot.c
+3
-1
未找到文件。
source/client/src/clientTmq.c
浏览文件 @
617d8d40
...
...
@@ -912,10 +912,12 @@ void tmqFreeImpl(void* handle) {
tmq_t
*
tmq
=
(
tmq_t
*
)
handle
;
// TODO stop timer
tmqClearUnhandleMsg
(
tmq
);
if
(
tmq
->
mqueue
)
taosCloseQueue
(
tmq
->
mqueue
);
if
(
tmq
->
mqueue
)
{
tmqClearUnhandleMsg
(
tmq
);
taosCloseQueue
(
tmq
->
mqueue
);
}
if
(
tmq
->
delayedTask
)
taosCloseQueue
(
tmq
->
delayedTask
);
if
(
tmq
->
qall
)
taosFreeQall
(
tmq
->
qall
);
taosFreeQall
(
tmq
->
qall
);
tsem_destroy
(
&
tmq
->
rspSem
);
...
...
source/dnode/mgmt/mgmt_snode/src/smWorker.c
浏览文件 @
617d8d40
...
...
@@ -58,11 +58,7 @@ static void smProcessStreamQueue(SQueueInfo *pInfo, SRpcMsg *pMsg) {
dTrace
(
"msg:%p, get from snode-stream queue"
,
pMsg
);
int32_t
code
=
sndProcessStreamMsg
(
pMgmt
->
pSnode
,
pMsg
);
if
(
code
<
0
)
{
if
(
pMsg
)
{
dGError
(
"snd, msg:%p failed to process stream msg %s since %s"
,
pMsg
,
TMSG_INFO
(
pMsg
->
msgType
),
terrstr
(
code
));
}
else
{
dGError
(
"snd, msg:%p failed to process stream empty msg since %s"
,
pMsg
,
terrstr
(
code
));
}
dGError
(
"snd, msg:%p failed to process stream msg %s since %s"
,
pMsg
,
TMSG_INFO
(
pMsg
->
msgType
),
terrstr
(
code
));
smSendRsp
(
pMsg
,
terrno
);
}
...
...
source/dnode/mgmt/mgmt_vnode/src/vmWorker.c
浏览文件 @
617d8d40
...
...
@@ -86,12 +86,8 @@ static void vmProcessStreamQueue(SQueueInfo *pInfo, SRpcMsg *pMsg) {
int32_t
code
=
vnodeProcessFetchMsg
(
pVnode
->
pImpl
,
pMsg
,
pInfo
);
if
(
code
!=
0
)
{
if
(
terrno
!=
0
)
code
=
terrno
;
if
(
pMsg
)
{
dGError
(
"vgId:%d, msg:%p failed to process stream msg %s since %s"
,
pVnode
->
vgId
,
pMsg
,
TMSG_INFO
(
pMsg
->
msgType
),
terrstr
(
code
));
}
else
{
dGError
(
"vgId:%d, msg:%p failed to process stream empty msg since %s"
,
pVnode
->
vgId
,
pMsg
,
terrstr
(
code
));
}
dGError
(
"vgId:%d, msg:%p failed to process stream msg %s since %s"
,
pVnode
->
vgId
,
pMsg
,
TMSG_INFO
(
pMsg
->
msgType
),
terrstr
(
code
));
vmSendRsp
(
pMsg
,
code
);
}
...
...
@@ -146,16 +142,16 @@ static int32_t vmPutMsgToQueue(SVnodeMgmt *pMgmt, SRpcMsg *pMsg, EQueueType qtyp
return
-
1
;
}
SMsgHead
*
pHead
=
pMsg
->
pCont
;
int32_t
code
=
0
;
SMsgHead
*
pHead
=
pMsg
->
pCont
;
int32_t
code
=
0
;
pHead
->
contLen
=
ntohl
(
pHead
->
contLen
);
pHead
->
vgId
=
ntohl
(
pHead
->
vgId
);
SVnodeObj
*
pVnode
=
vmAcquireVnode
(
pMgmt
,
pHead
->
vgId
);
if
(
pVnode
==
NULL
)
{
dGError
(
"vgId:%d, msg:%p failed to put into vnode queue since %s, type:%s qtype:%d contLen:%d"
,
pHead
->
vgId
,
pMsg
,
terrstr
(),
TMSG_INFO
(
pMsg
->
msgType
),
qtype
,
pHead
->
contLen
);
dGError
(
"vgId:%d, msg:%p failed to put into vnode queue since %s, type:%s qtype:%d contLen:%d"
,
pHead
->
vgId
,
pMsg
,
terrstr
(),
TMSG_INFO
(
pMsg
->
msgType
),
qtype
,
pHead
->
contLen
);
return
terrno
!=
0
?
terrno
:
-
1
;
}
...
...
source/dnode/vnode/src/tq/tqMeta.c
浏览文件 @
617d8d40
...
...
@@ -284,8 +284,7 @@ int32_t tqMetaRestoreHandle(STQ* pTq) {
handle
.
pRef
=
walOpenRef
(
pTq
->
pVnode
->
pWal
);
if
(
handle
.
pRef
==
NULL
)
{
ASSERT
(
0
);
return
-
1
;
continue
;
}
walRefVer
(
handle
.
pRef
,
handle
.
snapshotVer
);
...
...
source/dnode/vnode/src/tq/tqOffset.c
浏览文件 @
617d8d40
...
...
@@ -46,20 +46,25 @@ int32_t tqOffsetRestoreFromFile(STqOffsetStore* pStore, const char* fname) {
}
int32_t
size
=
htonl
(
head
.
size
);
void
*
memBuf
=
taosMemoryCalloc
(
1
,
size
);
if
(
memBuf
==
NULL
)
{
return
-
1
;
}
if
((
code
=
taosReadFile
(
pFile
,
memBuf
,
size
))
!=
size
)
{
ASSERT
(
0
);
// TODO handle error
taosMemoryFree
(
memBuf
);
return
-
1
;
}
STqOffset
offset
;
SDecoder
decoder
;
tDecoderInit
(
&
decoder
,
memBuf
,
size
);
if
(
tDecodeSTqOffset
(
&
decoder
,
&
offset
)
<
0
)
{
ASSERT
(
0
);
taosMemoryFree
(
memBuf
);
tDecoderClear
(
&
decoder
);
return
-
1
;
}
tDecoderClear
(
&
decoder
);
if
(
taosHashPut
(
pStore
->
pHash
,
offset
.
subKey
,
strlen
(
offset
.
subKey
),
&
offset
,
sizeof
(
STqOffset
))
<
0
)
{
ASSERT
(
0
);
// TODO
return
-
1
;
}
taosMemoryFree
(
memBuf
);
}
...
...
@@ -124,7 +129,7 @@ int32_t tqOffsetCommitFile(STqOffsetStore* pStore) {
const
char
*
sysErrStr
=
strerror
(
errno
);
tqError
(
"vgId:%d, cannot open file %s when commit offset since %s"
,
pStore
->
pTq
->
pVnode
->
config
.
vgId
,
fname
,
sysErrStr
);
ASSERT
(
0
);
taosMemoryFree
(
fname
);
return
-
1
;
}
taosMemoryFree
(
fname
);
...
...
source/dnode/vnode/src/tq/tqSink.c
浏览文件 @
617d8d40
...
...
@@ -64,7 +64,7 @@ int32_t tqBuildDeleteReq(SVnode* pVnode, const char* stbFullName, const SSDataBl
.
startTs
=
startTs
,
.
endTs
=
endTs
,
};
strncpy
(
req
.
tbname
,
name
,
TSDB_TABLE_NAME_LEN
);
strncpy
(
req
.
tbname
,
name
,
TSDB_TABLE_NAME_LEN
-
1
);
taosMemoryFree
(
name
);
/*tqDebug("stream delete msg, active: vgId:%d, ts:%" PRId64 " name:%s", pVnode->config.vgId, ts, name);*/
taosArrayPush
(
deleteReq
->
deleteReqs
,
&
req
);
...
...
source/dnode/vnode/src/tq/tqSnapshot.c
浏览文件 @
617d8d40
...
...
@@ -175,6 +175,8 @@ int32_t tqSnapWriterClose(STqSnapWriter** ppWriter, int8_t rollback) {
if
(
code
)
goto
_err
;
}
int
vgId
=
TD_VID
(
pWriter
->
pTq
->
pVnode
);
taosMemoryFree
(
pWriter
);
*
ppWriter
=
NULL
;
...
...
@@ -186,7 +188,7 @@ int32_t tqSnapWriterClose(STqSnapWriter** ppWriter, int8_t rollback) {
return
code
;
_err:
tqError
(
"vgId:%d, tq snapshot writer close failed since %s"
,
TD_VID
(
pWriter
->
pTq
->
pVnode
)
,
tstrerror
(
code
));
tqError
(
"vgId:%d, tq snapshot writer close failed since %s"
,
vgId
,
tstrerror
(
code
));
return
code
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录