Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
a1d14338
T
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1183
Star
22014
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
a1d14338
编写于
1月 28, 2022
作者:
L
Liu Jicong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix mem leak
上级
5aa0f80c
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
8 addition
and
9 deletion
+8
-9
include/common/common.h
include/common/common.h
+2
-2
source/client/src/tmq.c
source/client/src/tmq.c
+1
-1
source/dnode/mnode/impl/src/mndSubscribe.c
source/dnode/mnode/impl/src/mndSubscribe.c
+2
-2
source/dnode/mnode/impl/src/mndTopic.c
source/dnode/mnode/impl/src/mndTopic.c
+3
-4
未找到文件。
include/common/common.h
浏览文件 @
a1d14338
...
...
@@ -119,7 +119,7 @@ static FORCE_INLINE void* tDecodeDataBlock(void* buf, SSDataBlock* pBlock) {
buf
=
taosDecodeFixedI32
(
buf
,
&
sz
);
pBlock
->
pDataBlock
=
taosArrayInit
(
sz
,
sizeof
(
SColumnInfoData
));
for
(
int32_t
i
=
0
;
i
<
sz
;
i
++
)
{
SColumnInfoData
data
;
SColumnInfoData
data
=
{
0
}
;
buf
=
taosDecodeFixedI16
(
buf
,
&
data
.
info
.
colId
);
buf
=
taosDecodeFixedI16
(
buf
,
&
data
.
info
.
type
);
buf
=
taosDecodeFixedI16
(
buf
,
&
data
.
info
.
bytes
);
...
...
@@ -167,7 +167,7 @@ static FORCE_INLINE void* tDecodeSMqConsumeRsp(void* buf, SMqConsumeRsp* pRsp) {
buf
=
taosDecodeFixedI32
(
buf
,
&
sz
);
pRsp
->
pBlockData
=
taosArrayInit
(
sz
,
sizeof
(
SSDataBlock
));
for
(
int32_t
i
=
0
;
i
<
sz
;
i
++
)
{
SSDataBlock
block
;
SSDataBlock
block
=
{
0
}
;
tDecodeDataBlock
(
buf
,
&
block
);
taosArrayPush
(
pRsp
->
pBlockData
,
&
block
);
}
...
...
source/client/src/tmq.c
浏览文件 @
a1d14338
...
...
@@ -462,7 +462,7 @@ int32_t tmq_poll_cb_inner(void* param, const SDataBuf* pMsg, int32_t code) {
char
pBuf
[
128
];
SMqConsumeCbParam
*
pParam
=
(
SMqConsumeCbParam
*
)
param
;
SMqClientVg
*
pVg
=
pParam
->
pVg
;
SMqConsumeRsp
rsp
;
SMqConsumeRsp
rsp
=
{
0
}
;
tDecodeSMqConsumeRsp
(
pMsg
->
pData
,
&
rsp
);
if
(
rsp
.
numOfTopics
==
0
)
{
/*printf("no data\n");*/
...
...
source/dnode/mnode/impl/src/mndSubscribe.c
浏览文件 @
a1d14338
...
...
@@ -69,7 +69,7 @@ int32_t mndInitSubscribe(SMnode *pMnode) {
static
int32_t
mndProcessGetSubEpReq
(
SMnodeMsg
*
pMsg
)
{
SMnode
*
pMnode
=
pMsg
->
pMnode
;
SMqCMGetSubEpReq
*
pReq
=
(
SMqCMGetSubEpReq
*
)
pMsg
->
rpcMsg
.
pCont
;
SMqCMGetSubEpRsp
rsp
;
SMqCMGetSubEpRsp
rsp
=
{
0
}
;
int64_t
consumerId
=
be64toh
(
pReq
->
consumerId
);
int64_t
currentTs
=
taosGetTimestampMs
();
...
...
@@ -134,7 +134,7 @@ static int32_t mndProcessGetSubEpReq(SMnodeMsg *pMsg) {
}
void
*
abuf
=
buf
;
tEncodeSMqCMGetSubEpRsp
(
&
abuf
,
&
rsp
);
// TODO: free rsp
tDeleteSMqCMGetSubEpRsp
(
&
rsp
);
pMsg
->
pCont
=
buf
;
pMsg
->
contLen
=
tlen
;
return
0
;
...
...
source/dnode/mnode/impl/src/mndTopic.c
浏览文件 @
a1d14338
...
...
@@ -240,15 +240,14 @@ static int32_t mndCreateTopic(SMnode *pMnode, SMnodeMsg *pMsg, SCMCreateTopicReq
topicObj
.
uid
=
mndGenerateUid
(
pCreate
->
name
,
strlen
(
pCreate
->
name
));
topicObj
.
dbUid
=
pDb
->
uid
;
topicObj
.
version
=
1
;
topicObj
.
sql
=
strdup
(
pCreate
->
sql
)
;
topicObj
.
physicalPlan
=
strdup
(
pCreate
->
physicalPlan
)
;
topicObj
.
logicalPlan
=
strdup
(
pCreate
->
logicalPlan
)
;
topicObj
.
sql
=
pCreate
->
sql
;
topicObj
.
physicalPlan
=
pCreate
->
physicalPlan
;
topicObj
.
logicalPlan
=
pCreate
->
logicalPlan
;
topicObj
.
sqlLen
=
strlen
(
pCreate
->
sql
);
SSdbRaw
*
pTopicRaw
=
mndTopicActionEncode
(
&
topicObj
);
if
(
pTopicRaw
==
NULL
)
return
-
1
;
if
(
sdbSetRawStatus
(
pTopicRaw
,
SDB_STATUS_READY
)
!=
0
)
return
-
1
;
// TODO: replace with trans to support recovery
return
sdbWrite
(
pMnode
->
pSdb
,
pTopicRaw
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录