Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
eb7f510c
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看板
提交
eb7f510c
编写于
4月 17, 2023
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(query): return correct suid to delete sink.
上级
ac137b4b
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
18 addition
and
12 deletion
+18
-12
include/libs/executor/dataSinkMgt.h
include/libs/executor/dataSinkMgt.h
+0
-1
source/libs/executor/src/executil.c
source/libs/executor/src/executil.c
+13
-5
source/libs/executor/src/executor.c
source/libs/executor/src/executor.c
+4
-5
source/libs/executor/src/scanoperator.c
source/libs/executor/src/scanoperator.c
+1
-1
未找到文件。
include/libs/executor/dataSinkMgt.h
浏览文件 @
eb7f510c
...
...
@@ -29,7 +29,6 @@ extern "C" {
#define DS_BUF_FULL 2
#define DS_BUF_EMPTY 3
struct
SDataSink
;
struct
SSDataBlock
;
typedef
struct
SDeleterRes
{
...
...
source/libs/executor/src/executil.c
浏览文件 @
eb7f510c
...
...
@@ -35,8 +35,11 @@ struct STableListInfo {
int32_t
*
groupOffset
;
// keep the offset value for each group in the tableList
SArray
*
pTableList
;
SHashObj
*
map
;
// speedup acquire the tableQueryInfo by table uid
uint64_t
suid
;
int32_t
tableType
;
// queried table type
union
{
uint64_t
suid
;
uint64_t
uid
;
};
// this maybe the super table or ordinary table
int32_t
tableType
;
// queried table type
};
typedef
struct
tagFilterAssist
{
...
...
@@ -1033,8 +1036,7 @@ int32_t getTableList(void* metaHandle, void* pVnode, SScanPhysiNode* pScanNode,
SIdxFltStatus
status
=
SFLT_NOT_INDEX
;
if
(
pScanNode
->
tableType
!=
TSDB_SUPER_TABLE
)
{
pListInfo
->
suid
=
pScanNode
->
uid
;
pListInfo
->
uid
=
pScanNode
->
uid
;
if
(
metaIsTableExist
(
metaHandle
,
pScanNode
->
uid
))
{
taosArrayPush
(
pUidList
,
&
pScanNode
->
uid
);
}
...
...
@@ -1798,7 +1800,13 @@ uint64_t tableListGetSize(const STableListInfo* pTableList) {
return
taosArrayGetSize
(
pTableList
->
pTableList
);
}
uint64_t
tableListGetSuid
(
const
STableListInfo
*
pTableList
)
{
return
pTableList
->
suid
;
}
uint64_t
tableListGetSuid
(
const
STableListInfo
*
pTableList
)
{
if
(
pTableList
->
tableType
==
TSDB_SUPER_TABLE
)
{
return
pTableList
->
suid
;
}
else
{
// query normal table, no suid exists.
return
0
;
}
}
STableKeyInfo
*
tableListGetInfo
(
const
STableListInfo
*
pTableList
,
int32_t
index
)
{
if
(
taosArrayGetSize
(
pTableList
->
pTableList
)
==
0
)
{
...
...
source/libs/executor/src/executor.c
浏览文件 @
eb7f510c
...
...
@@ -330,10 +330,9 @@ static SArray* filterUnqualifiedTables(const SStreamScanInfo* pScanInfo, const S
STableScanInfo
*
pTableScanInfo
=
pScanInfo
->
pTableScanOp
->
info
;
uint64_t
s
uid
=
0
;
uint64_t
uid
=
0
;
int32_t
type
=
0
;
tableListGetSourceTableInfo
(
pTableScanInfo
->
base
.
pTableListInfo
,
&
suid
,
&
type
);
int32_t
numOfExisted
=
tableListGetSize
(
pTableScanInfo
->
base
.
pTableListInfo
);
tableListGetSourceTableInfo
(
pTableScanInfo
->
base
.
pTableListInfo
,
&
uid
,
&
type
);
// let's discard the tables those are not created according to the queried super table.
SMetaReader
mr
=
{
0
};
...
...
@@ -354,13 +353,13 @@ static SArray* filterUnqualifiedTables(const SStreamScanInfo* pScanInfo, const S
}
else
{
if
(
type
==
TSDB_SUPER_TABLE
)
{
// this new created child table does not belong to the scanned super table.
if
(
mr
.
me
.
type
!=
TSDB_CHILD_TABLE
||
mr
.
me
.
ctbEntry
.
suid
!=
s
uid
)
{
if
(
mr
.
me
.
type
!=
TSDB_CHILD_TABLE
||
mr
.
me
.
ctbEntry
.
suid
!=
uid
)
{
continue
;
}
}
else
{
// ordinary table
// In case that the scanned target table is an ordinary table. When replay the WAL during restore the vnode, we
// should check all newly created ordinary table to make sure that this table isn't the destination table.
if
(
mr
.
me
.
uid
!=
s
uid
)
{
if
(
mr
.
me
.
uid
!=
uid
)
{
continue
;
}
}
...
...
source/libs/executor/src/scanoperator.c
浏览文件 @
eb7f510c
...
...
@@ -690,7 +690,7 @@ static SSDataBlock* doTableScanImpl(SOperatorInfo* pOperator) {
}
uint32_t
status
=
0
;
int32_t
code
=
loadDataBlock
(
pOperator
,
&
pTableScanInfo
->
base
,
pBlock
,
&
status
);
code
=
loadDataBlock
(
pOperator
,
&
pTableScanInfo
->
base
,
pBlock
,
&
status
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
T_LONG_JMP
(
pTaskInfo
->
env
,
code
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录