Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
363fc8b9
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看板
提交
363fc8b9
编写于
6月 02, 2020
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[td-225] update the output log format
上级
fa27be4f
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
17 addition
and
17 deletion
+17
-17
src/tsdb/src/tsdbRead.c
src/tsdb/src/tsdbRead.c
+17
-17
未找到文件。
src/tsdb/src/tsdbRead.c
浏览文件 @
363fc8b9
...
...
@@ -193,7 +193,7 @@ TsdbQueryHandleT* tsdbQueryTables(TsdbRepoT* tsdb, STsdbQueryCond* pCond, STable
}
}
u
Trace
(
"%p total numOfTable:%d in query"
,
pQueryHandle
,
taosArrayGetSize
(
pQueryHandle
->
pTableCheckInfo
));
tsdb
Trace
(
"%p total numOfTable:%d in query"
,
pQueryHandle
,
taosArrayGetSize
(
pQueryHandle
->
pTableCheckInfo
));
tsdbInitDataBlockLoadInfo
(
&
pQueryHandle
->
dataBlockLoadInfo
);
tsdbInitCompBlockLoadInfo
(
&
pQueryHandle
->
compBlockLoadInfo
);
...
...
@@ -282,10 +282,10 @@ static bool initTableMemIterator(STsdbQueryHandle* pHandle, STableCheckInfo* pCh
SDataRow
row
=
SL_GET_NODE_DATA
(
node
);
TSKEY
key
=
dataRowKey
(
row
);
// first timestamp in buffer
u
Trace
(
"%p uid:%"
PRId64
", tid:%d check data in mem from skey:%"
PRId64
", order:%d, %p"
,
pHandle
,
tsdb
Trace
(
"%p uid:%"
PRId64
", tid:%d check data in mem from skey:%"
PRId64
", order:%d, %p"
,
pHandle
,
pCheckInfo
->
tableId
.
uid
,
pCheckInfo
->
tableId
.
tid
,
key
,
order
,
pHandle
->
qinfo
);
}
else
{
u
Trace
(
"%p uid:%"
PRId64
", tid:%d no data in mem"
,
pHandle
,
pCheckInfo
->
tableId
.
uid
,
pCheckInfo
->
tableId
.
tid
);
tsdb
Trace
(
"%p uid:%"
PRId64
", tid:%d no data in mem"
,
pHandle
,
pCheckInfo
->
tableId
.
uid
,
pCheckInfo
->
tableId
.
tid
);
}
if
(
!
imemEmpty
)
{
...
...
@@ -294,10 +294,10 @@ static bool initTableMemIterator(STsdbQueryHandle* pHandle, STableCheckInfo* pCh
SDataRow
row
=
SL_GET_NODE_DATA
(
node
);
TSKEY
key
=
dataRowKey
(
row
);
// first timestamp in buffer
u
Trace
(
"%p uid:%"
PRId64
", tid:%d check data in imem from skey:%"
PRId64
", order:%d, %p"
,
pHandle
,
tsdb
Trace
(
"%p uid:%"
PRId64
", tid:%d check data in imem from skey:%"
PRId64
", order:%d, %p"
,
pHandle
,
pCheckInfo
->
tableId
.
uid
,
pCheckInfo
->
tableId
.
tid
,
key
,
order
,
pHandle
->
qinfo
);
}
else
{
u
Trace
(
"%p uid:%"
PRId64
", tid:%d no data in imem"
,
pHandle
,
pCheckInfo
->
tableId
.
uid
,
pCheckInfo
->
tableId
.
tid
);
tsdb
Trace
(
"%p uid:%"
PRId64
", tid:%d no data in imem"
,
pHandle
,
pCheckInfo
->
tableId
.
uid
,
pCheckInfo
->
tableId
.
tid
);
}
return
true
;
...
...
@@ -338,7 +338,7 @@ static bool hasMoreDataInCache(STsdbQueryHandle* pHandle) {
SDataRow
row
=
SL_GET_NODE_DATA
(
node
);
pCheckInfo
->
lastKey
=
dataRowKey
(
row
);
// first timestamp in buffer
u
Trace
(
"%p uid:%"
PRId64
", tid:%d check data in buffer from skey:%"
PRId64
", order:%d, %p"
,
pHandle
,
tsdb
Trace
(
"%p uid:%"
PRId64
", tid:%d check data in buffer from skey:%"
PRId64
", order:%d, %p"
,
pHandle
,
pCheckInfo
->
tableId
.
uid
,
pCheckInfo
->
tableId
.
tid
,
pCheckInfo
->
lastKey
,
pHandle
->
order
,
pHandle
->
qinfo
);
// all data in mem are checked already.
...
...
@@ -1038,7 +1038,7 @@ static void doMergeTwoLevelData(STsdbQueryHandle* pQueryHandle, STableCheckInfo*
cur
->
rows
=
numOfRows
;
cur
->
pos
=
pos
;
u
Trace
(
"%p uid:%"
PRIu64
",tid:%d data block created, brange:%"
PRIu64
"-%"
PRIu64
" %p"
,
pQueryHandle
,
cur
->
win
.
skey
,
tsdb
Trace
(
"%p uid:%"
PRIu64
",tid:%d data block created, brange:%"
PRIu64
"-%"
PRIu64
" %p"
,
pQueryHandle
,
cur
->
win
.
skey
,
cur
->
win
.
ekey
,
cur
->
rows
,
pQueryHandle
->
qinfo
);
}
...
...
@@ -1138,7 +1138,7 @@ static int32_t dataBlockOrderCompar(const void* pLeft, const void* pRight, void*
if
(
pLeftBlockInfoEx
->
compBlock
->
offset
==
pRightBlockInfoEx
->
compBlock
->
offset
&&
pLeftBlockInfoEx
->
compBlock
->
last
==
pRightBlockInfoEx
->
compBlock
->
last
)
{
// todo add more information
u
Error
(
"error in header file, two block with same offset:%p"
,
pLeftBlockInfoEx
->
compBlock
->
offset
);
tsdb
Error
(
"error in header file, two block with same offset:%p"
,
pLeftBlockInfoEx
->
compBlock
->
offset
);
}
return
pLeftBlockInfoEx
->
compBlock
->
offset
>
pRightBlockInfoEx
->
compBlock
->
offset
?
1
:
-
1
;
...
...
@@ -1200,7 +1200,7 @@ static int32_t createDataBlocksInfo(STsdbQueryHandle* pQueryHandle, int32_t numO
numOfQualTables
++
;
}
u
Trace
(
"%p create data blocks info struct completed, %d blocks in %d tables"
,
pQueryHandle
,
cnt
,
numOfQualTables
);
tsdb
Trace
(
"%p create data blocks info struct completed, %d blocks in %d tables"
,
pQueryHandle
,
cnt
,
numOfQualTables
);
assert
(
cnt
<=
numOfBlocks
&&
numOfQualTables
<=
numOfTables
);
// the pTableQueryInfo[j]->numOfBlocks may be 0
sup
.
numOfTables
=
numOfQualTables
;
...
...
@@ -1236,7 +1236,7 @@ static int32_t createDataBlocksInfo(STsdbQueryHandle* pQueryHandle, int32_t numO
* }
*/
u
Trace
(
"%p %d data blocks sort completed"
,
pQueryHandle
,
cnt
);
tsdb
Trace
(
"%p %d data blocks sort completed"
,
pQueryHandle
,
cnt
);
cleanBlockOrderSupporter
(
&
sup
,
numOfTables
);
free
(
pTree
);
...
...
@@ -1257,7 +1257,7 @@ static bool getDataBlocksInFilesImpl(STsdbQueryHandle* pQueryHandle) {
break
;
}
u
Trace
(
"%p %d blocks found in file for %d table(s), fid:%d"
,
pQueryHandle
,
numOfBlocks
,
tsdb
Trace
(
"%p %d blocks found in file for %d table(s), fid:%d"
,
pQueryHandle
,
numOfBlocks
,
numOfTables
,
pQueryHandle
->
pFileGroup
->
fileId
);
assert
(
numOfBlocks
>=
0
);
...
...
@@ -1583,7 +1583,7 @@ static int tsdbReadRowsFromCache(SSkipListIterator* pIter, STable* pTable, TSKEY
if
((
key
>
maxKey
&&
ASCENDING_TRAVERSE
(
pQueryHandle
->
order
))
||
(
key
<
maxKey
&&
!
ASCENDING_TRAVERSE
(
pQueryHandle
->
order
)))
{
u
Trace
(
"%p key:%"
PRIu64
" beyond qrange:%"
PRId64
" - %"
PRId64
", no more data in buffer"
,
pQueryHandle
,
key
,
pQueryHandle
->
window
.
skey
,
tsdb
Trace
(
"%p key:%"
PRIu64
" beyond qrange:%"
PRId64
" - %"
PRId64
", no more data in buffer"
,
pQueryHandle
,
key
,
pQueryHandle
->
window
.
skey
,
pQueryHandle
->
window
.
ekey
);
break
;
...
...
@@ -1958,7 +1958,7 @@ SArray* createTableGroup(SArray* pTableList, STSchema* pTagSchema, SColIndex* pC
size_t
size
=
taosArrayGetSize
(
pTableList
);
if
(
size
==
0
)
{
u
Trace
(
"no qualified tables"
);
tsdb
Trace
(
"no qualified tables"
);
return
pTableGroup
;
}
...
...
@@ -1970,7 +1970,7 @@ SArray* createTableGroup(SArray* pTableList, STSchema* pTagSchema, SColIndex* pC
}
taosArrayPush
(
pTableGroup
,
&
sa
);
u
Trace
(
"all %d tables belong to one group"
,
size
);
tsdb
Trace
(
"all %d tables belong to one group"
,
size
);
}
else
{
STableGroupSupporter
*
pSupp
=
(
STableGroupSupporter
*
)
calloc
(
1
,
sizeof
(
STableGroupSupporter
));
pSupp
->
tsdbMeta
=
tsdbGetMeta
(
tsdb
);
...
...
@@ -2069,12 +2069,12 @@ int32_t tsdbQuerySTableByTagCond(TsdbRepoT* tsdb, uint64_t uid, const char* pTag
SColIndex
*
pColIndex
,
int32_t
numOfCols
)
{
STable
*
pTable
=
tsdbGetTableByUid
(
tsdbGetMeta
(
tsdb
),
uid
);
if
(
pTable
==
NULL
)
{
u
Error
(
"%p failed to get stable, uid:%"
PRIu64
,
tsdb
,
uid
);
tsdb
Error
(
"%p failed to get stable, uid:%"
PRIu64
,
tsdb
,
uid
);
return
TSDB_CODE_INVALID_TABLE_ID
;
}
if
(
pTable
->
type
!=
TSDB_SUPER_TABLE
)
{
u
Error
(
"%p query normal tag not allowed, uid:%"
PRIu64
", tid:%d, name:%s"
,
tsdb
Error
(
"%p query normal tag not allowed, uid:%"
PRIu64
", tid:%d, name:%s"
,
tsdb
,
uid
,
pTable
->
tableId
.
tid
,
pTable
->
name
);
return
TSDB_CODE_OPS_NOT_SUPPORT
;
//basically, this error is caused by invalid sql issued by client
...
...
@@ -2090,7 +2090,7 @@ int32_t tsdbQuerySTableByTagCond(TsdbRepoT* tsdb, uint64_t uid, const char* pTag
pGroupInfo
->
numOfTables
=
taosArrayGetSize
(
res
);
pGroupInfo
->
pGroupList
=
createTableGroup
(
res
,
pTagSchema
,
pColIndex
,
numOfCols
,
tsdb
);
u
Trace
(
"no tbname condition or tagcond, all tables belongs to one group, numOfTables:%d"
,
pGroupInfo
->
numOfTables
);
tsdb
Trace
(
"no tbname condition or tagcond, all tables belongs to one group, numOfTables:%d"
,
pGroupInfo
->
numOfTables
);
}
else
{
// todo add error
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录