Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
a77e4f28
T
TDengine
项目概览
taosdata
/
TDengine
大约 2 年 前同步成功
通知
1193
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看板
提交
a77e4f28
编写于
3月 29, 2022
作者:
L
Liu Jicong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix
上级
e48206f9
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
27 addition
and
26 deletion
+27
-26
include/common/tmsg.h
include/common/tmsg.h
+2
-2
source/dnode/mnode/impl/src/mndTopic.c
source/dnode/mnode/impl/src/mndTopic.c
+6
-5
tests/script/tsim/tmq/basic1.sim
tests/script/tsim/tmq/basic1.sim
+19
-19
未找到文件。
include/common/tmsg.h
浏览文件 @
a77e4f28
...
@@ -2299,7 +2299,7 @@ static FORCE_INLINE int32_t tEncodeSMqSubTopicEp(void** buf, const SMqSubTopicEp
...
@@ -2299,7 +2299,7 @@ static FORCE_INLINE int32_t tEncodeSMqSubTopicEp(void** buf, const SMqSubTopicEp
tlen
+=
tEncodeSMqSubVgEp
(
buf
,
pVgEp
);
tlen
+=
tEncodeSMqSubVgEp
(
buf
,
pVgEp
);
}
}
tlen
+=
taosEncodeFixedI32
(
buf
,
pTopicEp
->
numOfFields
);
tlen
+=
taosEncodeFixedI32
(
buf
,
pTopicEp
->
numOfFields
);
tlen
+=
taosEncodeBinary
(
buf
,
pTopicEp
->
fields
,
pTopicEp
->
numOfFields
*
sizeof
(
TAOS_FIELD
));
//
tlen += taosEncodeBinary(buf, pTopicEp->fields, pTopicEp->numOfFields * sizeof(TAOS_FIELD));
return
tlen
;
return
tlen
;
}
}
...
@@ -2318,7 +2318,7 @@ static FORCE_INLINE void* tDecodeSMqSubTopicEp(void* buf, SMqSubTopicEp* pTopicE
...
@@ -2318,7 +2318,7 @@ static FORCE_INLINE void* tDecodeSMqSubTopicEp(void* buf, SMqSubTopicEp* pTopicE
taosArrayPush
(
pTopicEp
->
vgs
,
&
vgEp
);
taosArrayPush
(
pTopicEp
->
vgs
,
&
vgEp
);
}
}
buf
=
taosDecodeFixedI32
(
buf
,
&
pTopicEp
->
numOfFields
);
buf
=
taosDecodeFixedI32
(
buf
,
&
pTopicEp
->
numOfFields
);
buf
=
taosDecodeBinary
(
buf
,
(
void
**
)
&
pTopicEp
->
fields
,
pTopicEp
->
numOfFields
*
sizeof
(
TAOS_FIELD
));
//
buf = taosDecodeBinary(buf, (void**)&pTopicEp->fields, pTopicEp->numOfFields * sizeof(TAOS_FIELD));
return
buf
;
return
buf
;
}
}
...
...
source/dnode/mnode/impl/src/mndTopic.c
浏览文件 @
a77e4f28
...
@@ -65,9 +65,11 @@ void mndCleanupTopic(SMnode *pMnode) {}
...
@@ -65,9 +65,11 @@ void mndCleanupTopic(SMnode *pMnode) {}
SSdbRaw
*
mndTopicActionEncode
(
SMqTopicObj
*
pTopic
)
{
SSdbRaw
*
mndTopicActionEncode
(
SMqTopicObj
*
pTopic
)
{
terrno
=
TSDB_CODE_OUT_OF_MEMORY
;
terrno
=
TSDB_CODE_OUT_OF_MEMORY
;
int32_t
logicalPlanLen
=
strlen
(
pTopic
->
logicalPlan
)
+
1
;
int32_t
logicalPlanLen
=
strlen
(
pTopic
->
logicalPlan
)
+
1
;
int32_t
physicalPlanLen
=
strlen
(
pTopic
->
physicalPlan
)
+
1
;
int32_t
physicalPlanLen
=
strlen
(
pTopic
->
physicalPlan
)
+
1
;
int32_t
size
=
sizeof
(
SMqTopicObj
)
+
logicalPlanLen
+
physicalPlanLen
+
pTopic
->
sqlLen
+
MND_TOPIC_RESERVE_SIZE
;
int32_t
swLen
=
taosEncodeSSchemaWrapper
(
NULL
,
&
pTopic
->
schema
);
int32_t
size
=
sizeof
(
SMqTopicObj
)
+
logicalPlanLen
+
physicalPlanLen
+
pTopic
->
sqlLen
+
swLen
+
MND_TOPIC_RESERVE_SIZE
;
SSdbRaw
*
pRaw
=
sdbAllocRaw
(
SDB_TOPIC
,
MND_TOPIC_VER_NUMBER
,
size
);
SSdbRaw
*
pRaw
=
sdbAllocRaw
(
SDB_TOPIC
,
MND_TOPIC_VER_NUMBER
,
size
);
if
(
pRaw
==
NULL
)
goto
TOPIC_ENCODE_OVER
;
if
(
pRaw
==
NULL
)
goto
TOPIC_ENCODE_OVER
;
...
@@ -86,8 +88,7 @@ SSdbRaw *mndTopicActionEncode(SMqTopicObj *pTopic) {
...
@@ -86,8 +88,7 @@ SSdbRaw *mndTopicActionEncode(SMqTopicObj *pTopic) {
SDB_SET_INT32
(
pRaw
,
dataPos
,
physicalPlanLen
,
TOPIC_ENCODE_OVER
);
SDB_SET_INT32
(
pRaw
,
dataPos
,
physicalPlanLen
,
TOPIC_ENCODE_OVER
);
SDB_SET_BINARY
(
pRaw
,
dataPos
,
pTopic
->
physicalPlan
,
physicalPlanLen
,
TOPIC_ENCODE_OVER
);
SDB_SET_BINARY
(
pRaw
,
dataPos
,
pTopic
->
physicalPlan
,
physicalPlanLen
,
TOPIC_ENCODE_OVER
);
int32_t
swLen
=
taosEncodeSSchemaWrapper
(
NULL
,
&
pTopic
->
schema
);
void
*
swBuf
=
taosMemoryMalloc
(
swLen
);
void
*
swBuf
=
taosMemoryMalloc
(
swLen
);
if
(
swBuf
==
NULL
)
{
if
(
swBuf
==
NULL
)
{
goto
TOPIC_ENCODE_OVER
;
goto
TOPIC_ENCODE_OVER
;
}
}
...
...
tests/script/tsim/tmq/basic1.sim
浏览文件 @
a77e4f28
...
@@ -136,30 +136,30 @@ endi
...
@@ -136,30 +136,30 @@ endi
print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_ctb_column" -k "group.id:tg2"
print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_ctb_column" -k "group.id:tg2"
system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_ctb_column" -k "group.id:tg2"
system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_ctb_column" -k "group.id:tg2"
print cmd result----> $system_content
print cmd result----> $system_content
if $system_content != @{consume success:
2
0}@ then
if $system_content != @{consume success:
1
0}@ then
return -1
return -1
endi
endi
print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_ctb_all" -k "group.id:tg2"
#
print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_ctb_all" -k "group.id:tg2"
system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_ctb_all" -k "group.id:tg2
"
#system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_ctb_all" -k "group.id:tg4
"
print cmd result----> $system_content
#
print cmd result----> $system_content
if $system_content != @{consume success: 2
0}@ then
#if $system_content != @{consume success: 1
0}@ then
return -1
#
return -1
endi
#
endi
print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_ntb_column" -k "group.id:tg2"
#
print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_ntb_column" -k "group.id:tg2"
system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_ntb_column" -k "group.id:tg2"
#
system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_ntb_column" -k "group.id:tg2"
print cmd result----> $system_content
#
print cmd result----> $system_content
if $system_content != @{consume success: 2
0}@ then
#if $system_content != @{consume success: 1
0}@ then
return -1
#
return -1
endi
#
endi
print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_ntb_all" -k "group.id:tg2"
#
print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_ntb_all" -k "group.id:tg2"
system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_ntb_all" -k "group.id:tg2"
#
system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_ntb_all" -k "group.id:tg2"
print cmd result----> $system_content
#
print cmd result----> $system_content
if $system_content != @{consume success: 2
0}@ then
#if $system_content != @{consume success: 1
0}@ then
return -1
#
return -1
endi
#
endi
print =============== create database , vgroup 4
print =============== create database , vgroup 4
$dbNamme = d1
$dbNamme = d1
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录