Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
e06a47bc
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看板
未验证
提交
e06a47bc
编写于
5月 21, 2022
作者:
L
Liu Jicong
提交者:
GitHub
5月 21, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #12778 from taosdata/feature/tq
test(tmq): enable drop table case
上级
2ed55600
2d38e2c1
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
18 addition
and
13 deletion
+18
-13
example/src/tmq.c
example/src/tmq.c
+4
-3
source/dnode/vnode/src/tq/tqRead.c
source/dnode/vnode/src/tq/tqRead.c
+7
-3
tests/system-test/7-tmq/subscribeStb.py
tests/system-test/7-tmq/subscribeStb.py
+7
-7
未找到文件。
example/src/tmq.c
浏览文件 @
e06a47bc
...
...
@@ -106,8 +106,8 @@ int32_t create_topic() {
}
taos_free_result
(
pRes
);
pRes
=
taos_query
(
pConn
,
"create topic topic_ctb_column as abc1"
);
/*pRes = taos_query(pConn, "create topic topic_ctb_column as select ts, c1, c2, c3 from st1");*/
/*pRes = taos_query(pConn, "create topic topic_ctb_column as abc1");*/
pRes
=
taos_query
(
pConn
,
"create topic topic_ctb_column as select ts, c1, c2, c3 from st1"
);
if
(
taos_errno
(
pRes
)
!=
0
)
{
printf
(
"failed to create topic topic_ctb_column, reason:%s
\n
"
,
taos_errstr
(
pRes
));
return
-
1
;
...
...
@@ -167,6 +167,7 @@ tmq_t* build_consumer() {
tmq_conf_set
(
conf
,
"td.connect.pass"
,
"taosdata"
);
/*tmq_conf_set(conf, "td.connect.db", "abc1");*/
tmq_conf_set
(
conf
,
"msg.with.table.name"
,
"true"
);
tmq_conf_set
(
conf
,
"enable.auto.commit"
,
"false"
);
tmq_conf_set_auto_commit_cb
(
conf
,
tmq_commit_cb_print
,
NULL
);
tmq_t
*
tmq
=
tmq_consumer_new
(
conf
,
NULL
,
0
);
assert
(
tmq
);
...
...
@@ -239,7 +240,7 @@ void sync_consume_loop(tmq_t* tmq, tmq_list_t* topics) {
msg_process
(
tmqmessage
);
taos_free_result
(
tmqmessage
);
tmq_commit_async
(
tmq
,
NULL
,
tmq_commit_cb_print
,
NULL
);
/*tmq_commit_async(tmq, NULL, tmq_commit_cb_print, NULL);*/
/*if ((++msg_count % MIN_COMMIT_COUNT) == 0) tmq_commit(tmq, NULL, 0);*/
}
}
...
...
source/dnode/vnode/src/tq/tqRead.c
浏览文件 @
e06a47bc
...
...
@@ -90,6 +90,10 @@ int32_t tqRetrieveDataBlock(SArray** ppCols, STqReadHandle* pHandle, uint64_t* p
int32_t
sversion
=
1
;
if
(
pHandle
->
sver
!=
sversion
||
pHandle
->
cachedSchemaUid
!=
pHandle
->
msgIter
.
suid
)
{
pHandle
->
pSchema
=
metaGetTbTSchema
(
pHandle
->
pVnodeMeta
,
pHandle
->
msgIter
.
uid
,
sversion
);
if
(
pHandle
->
pSchema
==
NULL
)
{
tqError
(
"cannot found schema for table: %ld, version %d"
,
pHandle
->
msgIter
.
suid
,
pHandle
->
sver
);
return
-
1
;
}
// this interface use suid instead of uid
pHandle
->
pSchemaWrapper
=
metaGetTableSchema
(
pHandle
->
pVnodeMeta
,
pHandle
->
msgIter
.
suid
,
sversion
,
true
);
...
...
@@ -190,7 +194,7 @@ int32_t tqRetrieveDataBlock(SArray** ppCols, STqReadHandle* pHandle, uint64_t* p
}
return
0
;
FAIL:
taosArrayDestroy
(
*
ppCols
);
if
(
*
ppCols
)
taosArrayDestroy
(
*
ppCols
);
return
-
1
;
}
...
...
@@ -235,8 +239,8 @@ int tqReadHandleAddTbUidList(STqReadHandle* pHandle, const SArray* tbUidList) {
int
tqReadHandleRemoveTbUidList
(
STqReadHandle
*
pHandle
,
const
SArray
*
tbUidList
)
{
ASSERT
(
pHandle
->
tbIdHash
!=
NULL
);
for
(
int32_t
i
=
0
;
i
<
taosArrayGetSize
(
tbUidList
);
i
++
)
{
int64_t
*
pKey
=
(
int64_t
*
)
taosArrayGet
(
tbUidList
,
i
);
for
(
int32_t
i
=
0
;
i
<
taosArrayGetSize
(
tbUidList
);
i
++
)
{
int64_t
*
pKey
=
(
int64_t
*
)
taosArrayGet
(
tbUidList
,
i
);
taosHashRemove
(
pHandle
->
tbIdHash
,
pKey
,
sizeof
(
int64_t
));
}
...
...
tests/system-test/7-tmq/subscribeStb.py
浏览文件 @
e06a47bc
...
...
@@ -1377,17 +1377,17 @@ class TDTestCase:
self
.
tmqCase1
(
cfgPath
,
buildPath
)
self
.
tmqCase2
(
cfgPath
,
buildPath
)
#
self.tmqCase3(cfgPath, buildPath)
self
.
tmqCase3
(
cfgPath
,
buildPath
)
self
.
tmqCase4
(
cfgPath
,
buildPath
)
self
.
tmqCase5
(
cfgPath
,
buildPath
)
self
.
tmqCase6
(
cfgPath
,
buildPath
)
self
.
tmqCase7
(
cfgPath
,
buildPath
)
self
.
tmqCase8
(
cfgPath
,
buildPath
)
self
.
tmqCase9
(
cfgPath
,
buildPath
)
self
.
tmqCase10
(
cfgPath
,
buildPath
)
self
.
tmqCase11
(
cfgPath
,
buildPath
)
self
.
tmqCase12
(
cfgPath
,
buildPath
)
self
.
tmqCase13
(
cfgPath
,
buildPath
)
#
self.tmqCase8(cfgPath, buildPath)
#
self.tmqCase9(cfgPath, buildPath)
#
self.tmqCase10(cfgPath, buildPath)
#
self.tmqCase11(cfgPath, buildPath)
#
self.tmqCase12(cfgPath, buildPath)
#
self.tmqCase13(cfgPath, buildPath)
def
stop
(
self
):
tdSql
.
close
()
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录