Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
6d7fd797
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看板
提交
6d7fd797
编写于
1月 26, 2022
作者:
L
Liu Jicong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix query error
上级
4fda9f98
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
29 addition
and
13 deletion
+29
-13
source/client/test/clientTests.cpp
source/client/test/clientTests.cpp
+0
-2
source/dnode/mnode/impl/inc/mndDef.h
source/dnode/mnode/impl/inc/mndDef.h
+4
-2
source/dnode/vnode/src/tq/tq.c
source/dnode/vnode/src/tq/tq.c
+25
-9
未找到文件。
source/client/test/clientTests.cpp
浏览文件 @
6d7fd797
...
...
@@ -570,7 +570,6 @@ TEST(testCase, create_topic_Test) {
//taos_close(pConn);
//}
#if 0
TEST
(
testCase
,
tmq_subscribe_Test
)
{
TAOS
*
pConn
=
taos_connect
(
"localhost"
,
"root"
,
"taosdata"
,
NULL
,
0
);
assert
(
pConn
!=
NULL
);
...
...
@@ -595,7 +594,6 @@ TEST(testCase, tmq_subscribe_Test) {
//if (msg == NULL) break;
}
}
#endif
TEST
(
testCase
,
tmq_consume_Test
)
{
}
...
...
source/dnode/mnode/impl/inc/mndDef.h
浏览文件 @
6d7fd797
...
...
@@ -626,8 +626,10 @@ static FORCE_INLINE int32_t tEncodeSMqConsumerTopic(void** buf, SMqConsumerTopic
int32_t
tlen
=
0
;
tlen
+=
taosEncodeString
(
buf
,
pConsumerTopic
->
name
);
tlen
+=
taosEncodeFixedI32
(
buf
,
pConsumerTopic
->
epoch
);
ASSERT
(
pConsumerTopic
->
pVgInfo
);
int32_t
sz
=
taosArrayGetSize
(
pConsumerTopic
->
pVgInfo
);
int32_t
sz
=
0
;
if
(
pConsumerTopic
->
pVgInfo
!=
NULL
)
{
sz
=
taosArrayGetSize
(
pConsumerTopic
->
pVgInfo
);
}
tlen
+=
taosEncodeFixedI32
(
buf
,
sz
);
for
(
int32_t
i
=
0
;
i
<
sz
;
i
++
)
{
int32_t
*
pVgInfo
=
taosArrayGet
(
pConsumerTopic
->
pVgInfo
,
i
);
...
...
source/dnode/vnode/src/tq/tq.c
浏览文件 @
6d7fd797
...
...
@@ -757,12 +757,12 @@ int32_t tqProcessConsumeReq(STQ* pTq, SRpcMsg* pMsg) {
if
(
pTopic
->
buffer
.
lastOffset
==
-
1
||
pReq
->
offset
>
pTopic
->
buffer
.
lastOffset
)
{
pTopic
->
buffer
.
lastOffset
=
pReq
->
offset
;
}
// put output into rsp
SMqConsumeRsp
rsp
=
{
.
consumerId
=
consumerId
,
.
numOfTopics
=
1
};
}
// put output into rsp
SMqConsumeRsp
rsp
=
{
.
consumerId
=
consumerId
,
.
numOfTopics
=
1
};
return
0
;
}
...
...
@@ -822,14 +822,29 @@ STqReadHandle* tqInitSubmitMsgScanner(SMeta* pMeta) {
void
tqReadHandleSetMsg
(
STqReadHandle
*
pReadHandle
,
SSubmitMsg
*
pMsg
,
int64_t
ver
)
{
pReadHandle
->
pMsg
=
pMsg
;
pMsg
->
length
=
htonl
(
pMsg
->
length
);
pMsg
->
numOfBlocks
=
htonl
(
pMsg
->
numOfBlocks
);
tInitSubmitMsgIter
(
pMsg
,
&
pReadHandle
->
msgIter
);
pReadHandle
->
ver
=
ver
;
memset
(
&
pReadHandle
->
blkIter
,
0
,
sizeof
(
SSubmitBlkIter
));
}
bool
tqNextDataBlock
(
STqReadHandle
*
pHandle
)
{
while
(
tGetSubmitMsgNext
(
&
pHandle
->
msgIter
,
&
pHandle
->
pBlock
))
{
if
(
pHandle
->
tbUid
==
pHandle
->
pBlock
->
uid
)
return
true
;
while
(
1
)
{
if
(
tGetSubmitMsgNext
(
&
pHandle
->
msgIter
,
&
pHandle
->
pBlock
)
<
0
)
{
return
false
;
}
if
(
pHandle
->
pBlock
==
NULL
)
return
false
;
pHandle
->
pBlock
->
uid
=
htobe64
(
pHandle
->
pBlock
->
uid
);
if
(
pHandle
->
tbUid
==
pHandle
->
pBlock
->
uid
){
pHandle
->
pBlock
->
tid
=
htonl
(
pHandle
->
pBlock
->
tid
);
pHandle
->
pBlock
->
sversion
=
htonl
(
pHandle
->
pBlock
->
sversion
);
pHandle
->
pBlock
->
dataLen
=
htonl
(
pHandle
->
pBlock
->
dataLen
);
pHandle
->
pBlock
->
schemaLen
=
htonl
(
pHandle
->
pBlock
->
schemaLen
);
pHandle
->
pBlock
->
numOfRows
=
htons
(
pHandle
->
pBlock
->
numOfRows
);
return
true
;
}
}
return
false
;
}
...
...
@@ -845,8 +860,9 @@ int tqRetrieveDataBlockInfo(STqReadHandle* pHandle, SDataBlockInfo* pBlockInfo)
SArray
*
tqRetrieveDataBlock
(
STqReadHandle
*
pHandle
)
{
int32_t
sversion
=
pHandle
->
pBlock
->
sversion
;
SSchemaWrapper
*
pSchemaWrapper
=
metaGetTableSchema
(
pHandle
->
pMeta
,
pHandle
->
pBlock
->
uid
,
sversion
,
true
);
STSchema
*
pTschema
=
metaGetTbTSchema
(
pHandle
->
pMeta
,
pHandle
->
pBlock
->
uid
,
sversion
);
//TODO : change sversion
SSchemaWrapper
*
pSchemaWrapper
=
metaGetTableSchema
(
pHandle
->
pMeta
,
pHandle
->
pBlock
->
uid
,
0
,
true
);
STSchema
*
pTschema
=
metaGetTbTSchema
(
pHandle
->
pMeta
,
pHandle
->
pBlock
->
uid
,
0
);
SArray
*
pArray
=
taosArrayInit
(
pSchemaWrapper
->
nCols
,
sizeof
(
SColumnInfoData
));
if
(
pArray
==
NULL
)
{
return
NULL
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录