Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
f88d8084
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看板
提交
f88d8084
编写于
9月 19, 2022
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/feature/3_liaohj' into feature/3_liaohj
上级
e5e21bf6
15f656e6
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
41 addition
and
10 deletion
+41
-10
source/dnode/vnode/src/tsdb/tsdbRead.c
source/dnode/vnode/src/tsdb/tsdbRead.c
+2
-2
source/dnode/vnode/src/vnd/vnodeSvr.c
source/dnode/vnode/src/vnd/vnodeSvr.c
+8
-1
source/libs/executor/src/executor.c
source/libs/executor/src/executor.c
+20
-5
source/libs/executor/src/scanoperator.c
source/libs/executor/src/scanoperator.c
+11
-2
未找到文件。
source/dnode/vnode/src/tsdb/tsdbRead.c
浏览文件 @
f88d8084
...
@@ -3719,8 +3719,8 @@ int32_t tsdbReaderReset(STsdbReader* pReader, SQueryTableDataCond* pCond) {
...
@@ -3719,8 +3719,8 @@ int32_t tsdbReaderReset(STsdbReader* pReader, SQueryTableDataCond* pCond) {
}
}
}
}
tsdbDebug
(
"%p reset reader, suid:%"
PRIu64
", numOfTables:%d, query range:%"
PRId64
" - %"
PRId64
" in query %s"
,
tsdbDebug
(
"%p reset reader, suid:%"
PRIu64
", numOfTables:%d,
skey:%"
PRId64
",
query range:%"
PRId64
" - %"
PRId64
" in query %s"
,
pReader
,
pReader
->
suid
,
numOfTables
,
pReader
->
window
.
skey
,
pReader
->
window
.
ekey
,
pReader
->
idStr
);
pReader
,
pReader
->
suid
,
numOfTables
,
p
Cond
->
twindows
.
skey
,
p
Reader
->
window
.
skey
,
pReader
->
window
.
ekey
,
pReader
->
idStr
);
return
code
;
return
code
;
}
}
...
...
source/dnode/vnode/src/vnd/vnodeSvr.c
浏览文件 @
f88d8084
...
@@ -533,6 +533,7 @@ static int32_t vnodeProcessCreateTbReq(SVnode *pVnode, int64_t version, void *pR
...
@@ -533,6 +533,7 @@ static int32_t vnodeProcessCreateTbReq(SVnode *pVnode, int64_t version, void *pR
taosArrayPush
(
rsp
.
pArray
,
&
cRsp
);
taosArrayPush
(
rsp
.
pArray
,
&
cRsp
);
}
}
vDebug
(
"vgId:%d, add %d new created tables into query table list"
,
TD_VID
(
pVnode
),
(
int32_t
)
taosArrayGetSize
(
tbUids
));
tqUpdateTbUidList
(
pVnode
->
pTq
,
tbUids
,
true
);
tqUpdateTbUidList
(
pVnode
->
pTq
,
tbUids
,
true
);
if
(
tdUpdateTbUidList
(
pVnode
->
pSma
,
pStore
,
true
)
<
0
)
{
if
(
tdUpdateTbUidList
(
pVnode
->
pSma
,
pStore
,
true
)
<
0
)
{
goto
_exit
;
goto
_exit
;
...
@@ -885,8 +886,9 @@ static int32_t vnodeProcessSubmitReq(SVnode *pVnode, int64_t version, void *pReq
...
@@ -885,8 +886,9 @@ static int32_t vnodeProcessSubmitReq(SVnode *pVnode, int64_t version, void *pReq
if
(
NULL
!=
submitBlkRsp
.
pMeta
)
{
if
(
NULL
!=
submitBlkRsp
.
pMeta
)
{
vnodeUpdateMetaRsp
(
pVnode
,
submitBlkRsp
.
pMeta
);
vnodeUpdateMetaRsp
(
pVnode
,
submitBlkRsp
.
pMeta
);
}
}
}
taosArrayPush
(
newTbUids
,
&
createTbReq
.
uid
);
taosArrayPush
(
newTbUids
,
&
createTbReq
.
uid
);
}
submitBlkRsp
.
uid
=
createTbReq
.
uid
;
submitBlkRsp
.
uid
=
createTbReq
.
uid
;
submitBlkRsp
.
tblFName
=
taosMemoryMalloc
(
strlen
(
pVnode
->
config
.
dbname
)
+
strlen
(
createTbReq
.
name
)
+
2
);
submitBlkRsp
.
tblFName
=
taosMemoryMalloc
(
strlen
(
pVnode
->
config
.
dbname
)
+
strlen
(
createTbReq
.
name
)
+
2
);
...
@@ -917,6 +919,11 @@ static int32_t vnodeProcessSubmitReq(SVnode *pVnode, int64_t version, void *pReq
...
@@ -917,6 +919,11 @@ static int32_t vnodeProcessSubmitReq(SVnode *pVnode, int64_t version, void *pReq
submitRsp
.
affectedRows
+=
submitBlkRsp
.
affectedRows
;
submitRsp
.
affectedRows
+=
submitBlkRsp
.
affectedRows
;
taosArrayPush
(
submitRsp
.
pArray
,
&
submitBlkRsp
);
taosArrayPush
(
submitRsp
.
pArray
,
&
submitBlkRsp
);
}
}
if
(
taosArrayGetSize
(
newTbUids
)
>
0
)
{
vDebug
(
"vgId:%d, add %d table into query table list in handling submit"
,
TD_VID
(
pVnode
),
(
int32_t
)
taosArrayGetSize
(
newTbUids
));
}
tqUpdateTbUidList
(
pVnode
->
pTq
,
newTbUids
,
true
);
tqUpdateTbUidList
(
pVnode
->
pTq
,
newTbUids
,
true
);
_exit:
_exit:
...
...
source/libs/executor/src/executor.c
浏览文件 @
f88d8084
...
@@ -265,6 +265,15 @@ static SArray* filterUnqualifiedTables(const SStreamScanInfo* pScanInfo, const S
...
@@ -265,6 +265,15 @@ static SArray* filterUnqualifiedTables(const SStreamScanInfo* pScanInfo, const S
int32_t
qUpdateQualifiedTableId
(
qTaskInfo_t
tinfo
,
const
SArray
*
tableIdList
,
bool
isAdd
)
{
int32_t
qUpdateQualifiedTableId
(
qTaskInfo_t
tinfo
,
const
SArray
*
tableIdList
,
bool
isAdd
)
{
SExecTaskInfo
*
pTaskInfo
=
(
SExecTaskInfo
*
)
tinfo
;
SExecTaskInfo
*
pTaskInfo
=
(
SExecTaskInfo
*
)
tinfo
;
STableListInfo
*
pListInfo
=
&
pTaskInfo
->
tableqinfoList
;
if
(
isAdd
)
{
qDebug
(
"add %d tables id into query list, %s"
,
(
int32_t
)
taosArrayGetSize
(
tableIdList
),
pTaskInfo
->
id
.
str
);
}
if
(
pListInfo
->
map
==
NULL
)
{
pListInfo
->
map
=
taosHashInit
(
32
,
taosGetDefaultHashFunction
(
TSDB_DATA_TYPE_BINARY
),
false
,
HASH_NO_LOCK
);
}
// traverse to the stream scanner node to add this table id
// traverse to the stream scanner node to add this table id
SOperatorInfo
*
pInfo
=
pTaskInfo
->
pRoot
;
SOperatorInfo
*
pInfo
=
pTaskInfo
->
pRoot
;
...
@@ -311,14 +320,20 @@ int32_t qUpdateQualifiedTableId(qTaskInfo_t tinfo, const SArray* tableIdList, bo
...
@@ -311,14 +320,20 @@ int32_t qUpdateQualifiedTableId(qTaskInfo_t tinfo, const SArray* tableIdList, bo
}
}
}
}
taosArrayPush
(
pTaskInfo
->
tableqinfoList
.
pTableList
,
&
keyInfo
);
bool
exists
=
false
;
if
(
pTaskInfo
->
tableqinfoList
.
map
==
NULL
)
{
for
(
int32_t
k
=
0
;
k
<
taosArrayGetSize
(
pListInfo
->
pTableList
);
++
k
)
{
pTaskInfo
->
tableqinfoList
.
map
=
STableKeyInfo
*
pKeyInfo
=
taosArrayGet
(
pListInfo
->
pTableList
,
k
);
taosHashInit
(
32
,
taosGetDefaultHashFunction
(
TSDB_DATA_TYPE_BINARY
),
false
,
HASH_NO_LOCK
);
if
(
pKeyInfo
->
uid
==
keyInfo
.
uid
)
{
qWarn
(
"ignore duplicated query table uid:%"
PRIu64
" added, %s"
,
pKeyInfo
->
uid
,
pTaskInfo
->
id
.
str
);
exists
=
true
;
}
}
}
if
(
!
exists
)
{
taosArrayPush
(
pTaskInfo
->
tableqinfoList
.
pTableList
,
&
keyInfo
);
taosHashPut
(
pTaskInfo
->
tableqinfoList
.
map
,
uid
,
sizeof
(
uid
),
&
keyInfo
.
groupId
,
sizeof
(
keyInfo
.
groupId
));
taosHashPut
(
pTaskInfo
->
tableqinfoList
.
map
,
uid
,
sizeof
(
uid
),
&
keyInfo
.
groupId
,
sizeof
(
keyInfo
.
groupId
));
}
}
}
if
(
keyBuf
!=
NULL
)
{
if
(
keyBuf
!=
NULL
)
{
taosMemoryFree
(
keyBuf
);
taosMemoryFree
(
keyBuf
);
...
...
source/libs/executor/src/scanoperator.c
浏览文件 @
f88d8084
...
@@ -617,19 +617,28 @@ static SSDataBlock* doTableScan(SOperatorInfo* pOperator) {
...
@@ -617,19 +617,28 @@ static SSDataBlock* doTableScan(SOperatorInfo* pOperator) {
// if scan table by table
// if scan table by table
if
(
pInfo
->
scanMode
==
TABLE_SCAN__TABLE_ORDER
)
{
if
(
pInfo
->
scanMode
==
TABLE_SCAN__TABLE_ORDER
)
{
if
(
pInfo
->
noTable
)
return
NULL
;
if
(
pInfo
->
noTable
)
{
return
NULL
;
}
int32_t
numOfTables
=
taosArrayGetSize
(
pTaskInfo
->
tableqinfoList
.
pTableList
);
while
(
1
)
{
while
(
1
)
{
SSDataBlock
*
result
=
doTableScanGroup
(
pOperator
);
SSDataBlock
*
result
=
doTableScanGroup
(
pOperator
);
if
(
result
)
{
if
(
result
)
{
return
result
;
return
result
;
}
}
// if no data, switch to next table and continue scan
// if no data, switch to next table and continue scan
pInfo
->
currentTable
++
;
pInfo
->
currentTable
++
;
if
(
pInfo
->
currentTable
>=
taosArrayGetSize
(
pTaskInfo
->
tableqinfoList
.
pTableList
)
)
{
if
(
pInfo
->
currentTable
>=
numOfTables
)
{
return
NULL
;
return
NULL
;
}
}
STableKeyInfo
*
pTableInfo
=
taosArrayGet
(
pTaskInfo
->
tableqinfoList
.
pTableList
,
pInfo
->
currentTable
);
STableKeyInfo
*
pTableInfo
=
taosArrayGet
(
pTaskInfo
->
tableqinfoList
.
pTableList
,
pInfo
->
currentTable
);
tsdbSetTableId
(
pInfo
->
dataReader
,
pTableInfo
->
uid
);
tsdbSetTableId
(
pInfo
->
dataReader
,
pTableInfo
->
uid
);
qDebug
(
"set uid:%"
PRIu64
" into scanner, total tables:%d, index:%d %s"
,
pTableInfo
->
uid
,
numOfTables
,
pInfo
->
currentTable
,
pTaskInfo
->
id
.
str
);
tsdbReaderReset
(
pInfo
->
dataReader
,
&
pInfo
->
cond
);
tsdbReaderReset
(
pInfo
->
dataReader
,
&
pInfo
->
cond
);
pInfo
->
scanTimes
=
0
;
pInfo
->
scanTimes
=
0
;
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录