Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
04f08779
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22017
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
04f08779
编写于
9月 28, 2022
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor(query): do some internal refactor.
上级
59b74351
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
18 addition
and
23 deletion
+18
-23
source/client/src/clientMain.c
source/client/src/clientMain.c
+0
-1
source/dnode/vnode/src/inc/tsdb.h
source/dnode/vnode/src/inc/tsdb.h
+1
-2
source/dnode/vnode/src/tsdb/tsdbCache.c
source/dnode/vnode/src/tsdb/tsdbCache.c
+4
-1
source/dnode/vnode/src/tsdb/tsdbMergeTree.c
source/dnode/vnode/src/tsdb/tsdbMergeTree.c
+6
-15
source/dnode/vnode/src/tsdb/tsdbRead.c
source/dnode/vnode/src/tsdb/tsdbRead.c
+1
-2
source/libs/catalog/src/ctgAsync.c
source/libs/catalog/src/ctgAsync.c
+6
-2
未找到文件。
source/client/src/clientMain.c
浏览文件 @
04f08779
...
...
@@ -813,7 +813,6 @@ void doAsyncQuery(SRequestObj *pRequest, bool updateMetaForce) {
pRequest
->
metric
.
syntaxEnd
=
taosGetTimestampUs
();
if
(
!
updateMetaForce
)
{
STscObj
*
pTscObj
=
pRequest
->
pTscObj
;
SAppClusterSummary
*
pActivity
=
&
pTscObj
->
pAppInfo
->
summary
;
if
(
NULL
==
pRequest
->
pQuery
->
pRoot
)
{
atomic_add_fetch_64
((
int64_t
*
)
&
pActivity
->
numOfInsertsReq
,
1
);
...
...
source/dnode/vnode/src/inc/tsdb.h
浏览文件 @
04f08779
...
...
@@ -662,8 +662,7 @@ typedef struct {
}
SSkmInfo
;
int32_t
tMergeTreeOpen
(
SMergeTree
*
pMTree
,
int8_t
backward
,
SDataFReader
*
pFReader
,
uint64_t
suid
,
uint64_t
uid
,
STimeWindow
*
pTimeWindow
,
SVersionRange
*
pVerRange
,
void
*
pBlockLoadInfo
,
STSchema
*
pSchema
,
int16_t
*
pCols
,
int32_t
numOfCols
,
const
char
*
idStr
);
STimeWindow
*
pTimeWindow
,
SVersionRange
*
pVerRange
,
void
*
pBlockLoadInfo
,
bool
destroyLoadInfo
,
const
char
*
idStr
);
void
tMergeTreeAddIter
(
SMergeTree
*
pMTree
,
SLDataIter
*
pIter
);
bool
tMergeTreeNext
(
SMergeTree
*
pMTree
);
TSDBROW
tMergeTreeGetRow
(
SMergeTree
*
pMTree
);
...
...
source/dnode/vnode/src/tsdb/tsdbCache.c
浏览文件 @
04f08779
...
...
@@ -420,6 +420,7 @@ typedef enum {
typedef
struct
{
SFSLASTNEXTROWSTATES
state
;
// [input]
STsdb
*
pTsdb
;
// [input]
STSchema
*
pTSchema
;
// [input]
tb_uid_t
suid
;
tb_uid_t
uid
;
int32_t
nFileSet
;
...
...
@@ -455,9 +456,10 @@ static int32_t getNextRowFromFSLast(void *iter, TSDBROW **ppRow) {
code
=
tsdbDataFReaderOpen
(
&
state
->
pDataFReader
,
state
->
pTsdb
,
pFileSet
);
if
(
code
)
goto
_err
;
struct
SSttBlockLoadInfo
*
pLoadInfo
=
tCreateLastBlockLoadInfo
(
state
->
pTSchema
,
NULL
,
0
);
tMergeTreeOpen
(
&
state
->
mergeTree
,
1
,
state
->
pDataFReader
,
state
->
suid
,
state
->
uid
,
&
(
STimeWindow
){.
skey
=
TSKEY_MIN
,
.
ekey
=
TSKEY_MAX
},
&
(
SVersionRange
){.
minVer
=
0
,
.
maxVer
=
UINT64_MAX
},
NULL
,
NULL
,
NULL
,
0
,
NULL
);
&
(
SVersionRange
){.
minVer
=
0
,
.
maxVer
=
UINT64_MAX
},
pLoadInfo
,
true
,
NULL
);
bool
hasVal
=
tMergeTreeNext
(
&
state
->
mergeTree
);
if
(
!
hasVal
)
{
state
->
state
=
SFSLASTNEXTROW_FILESET
;
...
...
@@ -892,6 +894,7 @@ static int32_t nextRowIterOpen(CacheNextRowIter *pIter, tb_uid_t uid, STsdb *pTs
pIter
->
fsLastState
.
state
=
(
SFSLASTNEXTROWSTATES
)
SFSNEXTROW_FS
;
pIter
->
fsLastState
.
pTsdb
=
pTsdb
;
pIter
->
fsLastState
.
aDFileSet
=
pIter
->
pReadSnap
->
fs
.
aDFileSet
;
pIter
->
fsLastState
.
pTSchema
=
pTSchema
;
pIter
->
fsLastState
.
suid
=
suid
;
pIter
->
fsLastState
.
uid
=
uid
;
...
...
source/dnode/vnode/src/tsdb/tsdbMergeTree.c
浏览文件 @
04f08779
...
...
@@ -474,8 +474,7 @@ static FORCE_INLINE int32_t tLDataIterCmprFn(const void *p1, const void *p2) {
}
int32_t
tMergeTreeOpen
(
SMergeTree
*
pMTree
,
int8_t
backward
,
SDataFReader
*
pFReader
,
uint64_t
suid
,
uint64_t
uid
,
STimeWindow
*
pTimeWindow
,
SVersionRange
*
pVerRange
,
void
*
pBlockLoadInfo
,
STSchema
*
pSchema
,
int16_t
*
pCols
,
int32_t
numOfCols
,
const
char
*
idStr
)
{
STimeWindow
*
pTimeWindow
,
SVersionRange
*
pVerRange
,
void
*
pBlockLoadInfo
,
bool
destroyLoadInfo
,
const
char
*
idStr
)
{
pMTree
->
backward
=
backward
;
pMTree
->
pIter
=
NULL
;
pMTree
->
pIterList
=
taosArrayInit
(
4
,
POINTER_BYTES
);
...
...
@@ -488,22 +487,14 @@ int32_t tMergeTreeOpen(SMergeTree *pMTree, int8_t backward, SDataFReader *pFRead
tRBTreeCreate
(
&
pMTree
->
rbt
,
tLDataIterCmprFn
);
int32_t
code
=
TSDB_CODE_SUCCESS
;
SSttBlockLoadInfo
*
pLoadInfo
=
NULL
;
if
(
pBlockLoadInfo
==
NULL
)
{
ASSERT
(
0
);
if
(
pMTree
->
pLoadInfo
==
NULL
)
{
pMTree
->
destroyLoadInfo
=
true
;
pMTree
->
pLoadInfo
=
tCreateLastBlockLoadInfo
(
pSchema
,
pCols
,
numOfCols
);
}
pLoadInfo
=
pMTree
->
pLoadInfo
;
}
else
{
pLoadInfo
=
pBlockLoadInfo
;
}
pMTree
->
pLoadInfo
=
pBlockLoadInfo
;
pMTree
->
destroyLoadInfo
=
destroyLoadInfo
;
ASSERT
(
pMTree
->
pLoadInfo
!=
NULL
);
for
(
int32_t
i
=
0
;
i
<
pFReader
->
pSet
->
nSttF
;
++
i
)
{
// open all last file
struct
SLDataIter
*
pIter
=
NULL
;
code
=
tLDataIterOpen
(
&
pIter
,
pFReader
,
i
,
pMTree
->
backward
,
suid
,
uid
,
pTimeWindow
,
pVerRange
,
&
pLoadInfo
[
i
]);
code
=
tLDataIterOpen
(
&
pIter
,
pFReader
,
i
,
pMTree
->
backward
,
suid
,
uid
,
pTimeWindow
,
pVerRange
,
&
pMTree
->
pLoadInfo
[
i
]);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
goto
_end
;
}
...
...
source/dnode/vnode/src/tsdb/tsdbRead.c
浏览文件 @
04f08779
...
...
@@ -2000,8 +2000,7 @@ static bool initLastBlockReader(SLastBlockReader* pLBlockReader, STableBlockScan
int32_t
code
=
tMergeTreeOpen
(
&
pLBlockReader
->
mergeTree
,
(
pLBlockReader
->
order
==
TSDB_ORDER_DESC
),
pReader
->
pFileReader
,
pReader
->
suid
,
pScanInfo
->
uid
,
&
w
,
&
pLBlockReader
->
verRange
,
pLBlockReader
->
pInfo
,
pReader
->
pSchema
,
pReader
->
suppInfo
.
colIds
,
pReader
->
suppInfo
.
numOfCols
,
pReader
->
idStr
);
pReader
->
suid
,
pScanInfo
->
uid
,
&
w
,
&
pLBlockReader
->
verRange
,
pLBlockReader
->
pInfo
,
false
,
pReader
->
idStr
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
return
false
;
}
...
...
source/libs/catalog/src/ctgAsync.c
浏览文件 @
04f08779
...
...
@@ -487,6 +487,9 @@ int32_t ctgInitTask(SCtgJob* pJob, CTG_TASK_TYPE type, void* param, int32_t* tas
int32_t
ctgInitJob
(
SCatalog
*
pCtg
,
SRequestConnInfo
*
pConn
,
SCtgJob
**
job
,
const
SCatalogReq
*
pReq
,
catalogCallback
fp
,
void
*
param
)
{
int32_t
code
=
0
;
int64_t
st
=
taosGetTimestampUs
();
int32_t
tbMetaNum
=
(
int32_t
)
ctgGetTablesReqNum
(
pReq
->
pTableMeta
);
int32_t
dbVgNum
=
(
int32_t
)
taosArrayGetSize
(
pReq
->
pDbVgroup
);
int32_t
tbHashNum
=
(
int32_t
)
ctgGetTablesReqNum
(
pReq
->
pTableHash
);
...
...
@@ -634,8 +637,9 @@ int32_t ctgInitJob(SCatalog* pCtg, SRequestConnInfo* pConn, SCtgJob** job, const
taosAcquireRef
(
gCtgMgmt
.
jobPool
,
pJob
->
refId
);
qDebug
(
"QID:0x%"
PRIx64
", jobId: 0x%"
PRIx64
" initialized, task num %d, forceUpdate %d"
,
pJob
->
queryId
,
pJob
->
refId
,
taskNum
,
pReq
->
forceUpdate
);
double
el
=
(
taosGetTimestampUs
()
-
st
)
/
1000
.
0
;
qDebug
(
"QID:0x%"
PRIx64
", jobId: 0x%"
PRIx64
" initialized, task num %d, forceUpdate %d, elapsed time:%.2fms"
,
pJob
->
queryId
,
pJob
->
refId
,
taskNum
,
pReq
->
forceUpdate
,
el
);
return
TSDB_CODE_SUCCESS
;
_return:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录