Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
3bae3041
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看板
提交
3bae3041
编写于
7月 05, 2022
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor: do some internal refactor.
上级
1145aabb
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
43 addition
and
7 deletion
+43
-7
source/dnode/vnode/src/tq/tqMeta.c
source/dnode/vnode/src/tq/tqMeta.c
+1
-0
source/dnode/vnode/src/tsdb/tsdbRead.c
source/dnode/vnode/src/tsdb/tsdbRead.c
+41
-3
source/libs/executor/src/executil.c
source/libs/executor/src/executil.c
+0
-3
source/libs/executor/src/executorMain.c
source/libs/executor/src/executorMain.c
+1
-1
未找到文件。
source/dnode/vnode/src/tq/tqMeta.c
浏览文件 @
3bae3041
...
...
@@ -87,6 +87,7 @@ int32_t tqMetaOpen(STQ* pTq) {
.
reader
=
handle
.
execHandle
.
pExecReader
[
i
],
.
meta
=
pTq
->
pVnode
->
pMeta
,
.
pMsgCb
=
&
pTq
->
pVnode
->
msgCb
,
.
vnode
=
pTq
->
pVnode
,
};
handle
.
execHandle
.
execCol
.
task
[
i
]
=
qCreateStreamExecTaskInfo
(
handle
.
execHandle
.
execCol
.
qmsg
,
&
reader
);
ASSERT
(
handle
.
execHandle
.
execCol
.
task
[
i
]);
...
...
source/dnode/vnode/src/tsdb/tsdbRead.c
浏览文件 @
3bae3041
...
...
@@ -154,6 +154,7 @@ static void doMergeMultiRows(TSDBROW* pRow, uint64_t uid, SIterInfo *pIter, SArr
static
void
doMergeMemIMemRows
(
TSDBROW
*
pRow
,
TSDBROW
*
piRow
,
STableBlockScanInfo
*
pBlockScanInfo
,
STsdbReader
*
pReader
,
STSRow
**
pTSRow
);
static
int32_t
initDelSkylineIterator
(
STableBlockScanInfo
*
pBlockScanInfo
,
STsdbReader
*
pReader
,
STbData
*
pMemTbData
,
STbData
*
piMemTbData
);
static
STsdb
*
getTsdbByRetentions
(
SVnode
*
pVnode
,
TSKEY
winSKey
,
SRetention
*
retentions
,
const
char
*
idstr
);
static
int32_t
setColumnIdSlotList
(
STsdbReader
*
pReader
,
SSDataBlock
*
pBlock
)
{
SBlockLoadSuppInfo
*
pSupInfo
=
&
pReader
->
suppInfo
;
...
...
@@ -373,7 +374,7 @@ static int32_t tsdbReaderCreate(SVnode* pVnode, SQueryTableDataCond* pCond, STsd
initReaderStatus
(
&
pReader
->
status
);
pReader
->
pTsdb
=
pVnode
->
pTsdb
;
pReader
->
pTsdb
=
getTsdbByRetentions
(
pVnode
,
pCond
->
twindows
[
0
].
skey
,
pVnode
->
config
.
tsdbCfg
.
retentions
,
idstr
)
;
pReader
->
suid
=
pCond
->
suid
;
pReader
->
order
=
pCond
->
order
;
pReader
->
capacity
=
4096
;
...
...
@@ -2375,6 +2376,43 @@ static int32_t buildBlockFromFiles(STsdbReader* pReader) {
}
}
STsdb
*
getTsdbByRetentions
(
SVnode
*
pVnode
,
TSKEY
winSKey
,
SRetention
*
retentions
,
const
char
*
idStr
)
{
if
(
VND_IS_RSMA
(
pVnode
))
{
int
level
=
0
;
int64_t
now
=
taosGetTimestamp
(
pVnode
->
config
.
tsdbCfg
.
precision
);
for
(
int
i
=
0
;
i
<
TSDB_RETENTION_MAX
;
++
i
)
{
SRetention
*
pRetention
=
retentions
+
level
;
if
(
pRetention
->
keep
<=
0
)
{
if
(
level
>
0
)
{
--
level
;
}
break
;
}
if
((
now
-
pRetention
->
keep
)
<=
winSKey
)
{
break
;
}
++
level
;
}
int32_t
vgId
=
TD_VID
(
pVnode
);
const
char
*
str
=
(
idStr
!=
NULL
)
?
idStr
:
""
;
if
(
level
==
TSDB_RETENTION_L0
)
{
tsdbDebug
(
"vgId:%d, read handle %p rsma level %d is selected to query %s"
,
vgId
,
TSDB_RETENTION_L0
,
str
);
return
VND_RSMA0
(
pVnode
);
}
else
if
(
level
==
TSDB_RETENTION_L1
)
{
tsdbDebug
(
"vgId:%d, read handle %p rsma level %d is selected to query %s"
,
vgId
,
TSDB_RETENTION_L1
,
str
);
return
VND_RSMA1
(
pVnode
);
}
else
{
tsdbDebug
(
"vgId:%d, read handle %p rsma level %d is selected to query %s"
,
vgId
,
TSDB_RETENTION_L2
,
str
);
return
VND_RSMA2
(
pVnode
);
}
}
return
VND_TSDB
(
pVnode
);
}
// // todo not unref yet, since it is not support multi-group interpolation query
// static UNUSED_FUNC void changeQueryHandleForInterpQuery(STsdbReader* pHandle) {
// // filter the queried time stamp in the first place
...
...
@@ -3280,8 +3318,8 @@ int32_t tsdbReaderReset(STsdbReader* pReader, SQueryTableDataCond* pCond, int32_
}
}
ASSERT
(
0
);
tsdbDebug
(
"%p reset tsdbreader in query %s"
,
pReader
,
numOfTables
,
pReader
->
idStr
);
tsdbDebug
(
"%p reset reader, suid:%"
PRIu64
", numOfTables:%d, query range:%"
PRId64
" - %"
PRId64
" in query %s"
,
pReader
,
pReader
->
suid
,
numOfTables
,
pReader
->
window
.
skey
,
pReader
->
window
.
ekey
,
pReader
->
idStr
);
return
code
;
}
...
...
source/libs/executor/src/executil.c
浏览文件 @
3bae3041
...
...
@@ -305,9 +305,6 @@ int32_t getTableList(void* metaHandle, void* pVnode, SScanPhysiNode* pScanNode,
SNode
*
pTagIndexCond
=
(
SNode
*
)
pListInfo
->
pTagIndexCond
;
if
(
pScanNode
->
tableType
==
TSDB_SUPER_TABLE
)
{
if
(
pTagIndexCond
)
{
SIndexMetaArg
metaArg
=
{
.
metaEx
=
metaHandle
,
.
idx
=
vnodeGetIdx
(
metaHandle
),
.
ivtIdx
=
vnodeGetIvtIdx
(
metaHandle
),
.
suid
=
tableUid
};
SArray
*
res
=
taosArrayInit
(
8
,
sizeof
(
uint64_t
));
// code = doFilterTag(pTagIndexCond, &metaArg, res);
code
=
TSDB_CODE_INDEX_REBUILDING
;
...
...
source/libs/executor/src/executorMain.c
浏览文件 @
3bae3041
...
...
@@ -138,7 +138,7 @@ int32_t qExecTask(qTaskInfo_t tinfo, SSDataBlock** pRes, uint64_t* useconds) {
qDebug
(
"%s execTask is launched"
,
GET_TASKID
(
pTaskInfo
));
int64_t
st
=
taosGetTimestampUs
();
int64_t
st
=
taosGetTimestampUs
();
*
pRes
=
pTaskInfo
->
pRoot
->
fpSet
.
getNextFn
(
pTaskInfo
->
pRoot
);
uint64_t
el
=
(
taosGetTimestampUs
()
-
st
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录