Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
a020b457
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1187
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看板
提交
a020b457
编写于
1月 10, 2022
作者:
S
shenglian zhou
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
query rsp will carry sversion and tversion
上级
8dee6d40
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
21 addition
and
3 deletion
+21
-3
src/client/src/tscServer.c
src/client/src/tscServer.c
+7
-0
src/inc/query.h
src/inc/query.h
+2
-1
src/inc/taosmsg.h
src/inc/taosmsg.h
+2
-0
src/query/src/queryMain.c
src/query/src/queryMain.c
+4
-1
src/vnode/src/vnodeRead.c
src/vnode/src/vnodeRead.c
+6
-1
未找到文件。
src/client/src/tscServer.c
浏览文件 @
a020b457
...
...
@@ -2705,6 +2705,13 @@ int tscProcessQueryRsp(SSqlObj *pSql) {
tscResetForNextRetrieve
(
pRes
);
tscDebug
(
"0x%"
PRIx64
" query rsp received, qId:0x%"
PRIx64
,
pSql
->
self
,
pRes
->
qId
);
STableMetaInfo
*
tableMetaInfo
=
tscGetTableMetaInfoFromCmd
(
&
pSql
->
cmd
,
0
);
if
(
tableMetaInfo
->
pTableMeta
->
sversion
<
pQueryAttr
->
sVersion
||
tableMetaInfo
->
pTableMeta
->
tversion
<
pQueryAttr
->
tVersion
)
{
return
TSDB_CODE_TSC_INVALID_SCHEMA_VERSION
;
}
return
0
;
}
...
...
src/inc/query.h
浏览文件 @
a020b457
...
...
@@ -28,7 +28,8 @@ typedef void* qinfo_t;
* @param qinfo
* @return
*/
int32_t
qCreateQueryInfo
(
void
*
tsdb
,
int32_t
vgId
,
SQueryTableMsg
*
pQueryTableMsg
,
qinfo_t
*
qinfo
,
uint64_t
qId
);
int32_t
qCreateQueryInfo
(
void
*
tsdb
,
int32_t
vgId
,
SQueryTableMsg
*
pQueryTableMsg
,
qinfo_t
*
qinfo
,
uint64_t
qId
,
int32_t
*
schemaVersion
,
int32_t
*
tagVersion
);
/**
...
...
src/inc/taosmsg.h
浏览文件 @
a020b457
...
...
@@ -530,6 +530,8 @@ typedef struct {
int8_t
extend
;
int32_t
code
;
union
{
uint64_t
qhandle
;
uint64_t
qId
;};
// query handle
int32_t
sVersion
;
int32_t
tVersion
;
}
SQueryTableRsp
;
// todo: the show handle should be replaced with id
...
...
src/query/src/queryMain.c
浏览文件 @
a020b457
...
...
@@ -67,7 +67,8 @@ void freeParam(SQueryParam *param) {
tfree
(
param
->
prevResult
);
}
int32_t
qCreateQueryInfo
(
void
*
tsdb
,
int32_t
vgId
,
SQueryTableMsg
*
pQueryMsg
,
qinfo_t
*
pQInfo
,
uint64_t
qId
)
{
int32_t
qCreateQueryInfo
(
void
*
tsdb
,
int32_t
vgId
,
SQueryTableMsg
*
pQueryMsg
,
qinfo_t
*
pQInfo
,
uint64_t
qId
,
int32_t
*
schemaVersion
,
int32_t
*
tagVersion
)
{
assert
(
pQueryMsg
!=
NULL
&&
tsdb
!=
NULL
);
int32_t
code
=
TSDB_CODE_SUCCESS
;
...
...
@@ -186,6 +187,8 @@ int32_t qCreateQueryInfo(void* tsdb, int32_t vgId, SQueryTableMsg* pQueryMsg, qi
code
=
initQInfo
(
&
pQueryMsg
->
tsBuf
,
tsdb
,
NULL
,
*
pQInfo
,
&
param
,
(
char
*
)
pQueryMsg
,
pQueryMsg
->
prevResultLen
,
NULL
);
*
schemaVersion
=
tableGroupInfo
.
sVersion
;
*
tagVersion
=
tableGroupInfo
.
tVersion
;
_over:
if
(
param
.
pGroupbyExpr
!=
NULL
)
{
taosArrayDestroy
(
&
(
param
.
pGroupbyExpr
->
columnInfo
));
...
...
src/vnode/src/vnodeRead.c
浏览文件 @
a020b457
...
...
@@ -239,12 +239,17 @@ static int32_t vnodeProcessQueryMsg(SVnodeObj *pVnode, SVReadMsg *pRead) {
if
(
contLen
!=
0
)
{
qinfo_t
pQInfo
=
NULL
;
uint64_t
qId
=
genQueryId
();
code
=
qCreateQueryInfo
(
pVnode
->
tsdb
,
pVnode
->
vgId
,
pQueryTableMsg
,
&
pQInfo
,
qId
);
int32_t
schemaVersion
=
-
1
;
int32_t
tagVersion
=
-
1
;
code
=
qCreateQueryInfo
(
pVnode
->
tsdb
,
pVnode
->
vgId
,
pQueryTableMsg
,
&
pQInfo
,
qId
,
&
schemaVersion
,
&
tagVersion
);
SQueryTableRsp
*
pRsp
=
(
SQueryTableRsp
*
)
rpcMallocCont
(
sizeof
(
SQueryTableRsp
));
pRsp
->
code
=
code
;
pRsp
->
qId
=
0
;
pRsp
->
sVersion
=
schemaVersion
;
pRsp
->
tVersion
=
tagVersion
;
pRet
->
len
=
sizeof
(
SQueryTableRsp
);
pRet
->
rsp
=
pRsp
;
int32_t
vgId
=
pVnode
->
vgId
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录