Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
16cd734b
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看板
提交
16cd734b
编写于
1月 25, 2022
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[td-11818]update log.
上级
ac260959
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
30 addition
and
15 deletion
+30
-15
source/dnode/vnode/src/tsdb/tsdbRead.c
source/dnode/vnode/src/tsdb/tsdbRead.c
+1
-1
source/libs/executor/inc/executorimpl.h
source/libs/executor/inc/executorimpl.h
+4
-2
source/libs/executor/src/executorMain.c
source/libs/executor/src/executorMain.c
+8
-6
source/libs/executor/src/executorimpl.c
source/libs/executor/src/executorimpl.c
+15
-4
source/libs/qworker/src/qworker.c
source/libs/qworker/src/qworker.c
+2
-2
未找到文件。
source/dnode/vnode/src/tsdb/tsdbRead.c
浏览文件 @
16cd734b
...
...
@@ -417,7 +417,7 @@ static STsdbReadHandle* tsdbQueryTablesImpl(STsdb* tsdb, STsdbQueryCond* pCond,
pReadHandle
->
currentLoadExternalRows
=
pCond
->
loadExternalRows
;
char
buf
[
128
]
=
{
0
};
snprintf
(
buf
,
tListLen
(
buf
),
"
0x%"
PRIx64
"
0x%"
PRIx64
,
taskId
,
qId
);
snprintf
(
buf
,
tListLen
(
buf
),
"
TID:0x%"
PRIx64
" QID:
0x%"
PRIx64
,
taskId
,
qId
);
pReadHandle
->
idStr
=
strdup
(
buf
);
if
(
tsdbInitReadH
(
&
pReadHandle
->
rhelper
,
(
STsdb
*
)
tsdb
)
!=
0
)
{
...
...
source/libs/executor/inc/executorimpl.h
浏览文件 @
16cd734b
...
...
@@ -378,8 +378,10 @@ typedef struct SExchangeInfo {
SSDataBlock
*
pResult
;
int32_t
current
;
uint64_t
rowsOfCurrentSource
;
uint64_t
bytes
;
// total load bytes from remote
uint64_t
totalRows
;
uint64_t
totalSize
;
// total load bytes from remote
uint64_t
totalRows
;
// total number of rows
uint64_t
totalElapsed
;
// total elapsed time
}
SExchangeInfo
;
typedef
struct
STableScanInfo
{
...
...
source/libs/executor/src/executorMain.c
浏览文件 @
16cd734b
...
...
@@ -154,7 +154,7 @@ int32_t qExecTask(qTaskInfo_t tinfo, SSDataBlock** pRes, uint64_t *useconds) {
}
if
(
isTaskKilled
(
pTaskInfo
))
{
qDebug
(
"%s
it is
already killed, abort"
,
GET_TASKID
(
pTaskInfo
));
qDebug
(
"%s already killed, abort"
,
GET_TASKID
(
pTaskInfo
));
return
TSDB_CODE_SUCCESS
;
}
...
...
@@ -163,12 +163,12 @@ int32_t qExecTask(qTaskInfo_t tinfo, SSDataBlock** pRes, uint64_t *useconds) {
if
(
ret
!=
TSDB_CODE_SUCCESS
)
{
publishQueryAbortEvent
(
pTaskInfo
,
ret
);
pTaskInfo
->
code
=
ret
;
qDebug
(
"%s
query
abort due to error/cancel occurs, code:%s"
,
GET_TASKID
(
pTaskInfo
),
qDebug
(
"%s
task
abort due to error/cancel occurs, code:%s"
,
GET_TASKID
(
pTaskInfo
),
tstrerror
(
pTaskInfo
->
code
));
return
pTaskInfo
->
code
;
}
qDebug
(
"%s
query t
ask is launched"
,
GET_TASKID
(
pTaskInfo
));
qDebug
(
"%s
execT
ask is launched"
,
GET_TASKID
(
pTaskInfo
));
bool
newgroup
=
false
;
publishOperatorProfEvent
(
pTaskInfo
->
pRoot
,
QUERY_PROF_BEFORE_OPERATOR_EXEC
);
...
...
@@ -177,7 +177,9 @@ int32_t qExecTask(qTaskInfo_t tinfo, SSDataBlock** pRes, uint64_t *useconds) {
st
=
taosGetTimestampUs
();
*
pRes
=
pTaskInfo
->
pRoot
->
exec
(
pTaskInfo
->
pRoot
,
&
newgroup
);
pTaskInfo
->
cost
.
elapsedTime
+=
(
taosGetTimestampUs
()
-
st
);
uint64_t
el
=
(
taosGetTimestampUs
()
-
st
);
pTaskInfo
->
cost
.
elapsedTime
+=
el
;
publishOperatorProfEvent
(
pTaskInfo
->
pRoot
,
QUERY_PROF_AFTER_OPERATOR_EXEC
);
if
(
NULL
==
*
pRes
)
{
...
...
@@ -187,8 +189,8 @@ int32_t qExecTask(qTaskInfo_t tinfo, SSDataBlock** pRes, uint64_t *useconds) {
int32_t
current
=
(
*
pRes
!=
NULL
)
?
(
*
pRes
)
->
info
.
rows
:
0
;
pTaskInfo
->
totalRows
+=
current
;
qDebug
(
"%s task
paused, %d rows returned, total:%"
PRId64
" rows, in sinkNode:%d
"
,
GET_TASKID
(
pTaskInfo
),
current
,
pTaskInfo
->
totalRows
,
0
);
qDebug
(
"%s task
suspended, %d rows returned, total:%"
PRId64
" rows, in sinkNode:%d, elapsed:%.2f ms
"
,
GET_TASKID
(
pTaskInfo
),
current
,
pTaskInfo
->
totalRows
,
0
,
el
/
1000
.
0
);
atomic_store_64
(
&
pTaskInfo
->
owner
,
0
);
return
pTaskInfo
->
code
;
...
...
source/libs/executor/src/executorimpl.c
浏览文件 @
16cd734b
...
...
@@ -5146,6 +5146,8 @@ static SSDataBlock* doLoadRemoteData(void* param, bool* newgroup) {
size_t
totalSources
=
taosArrayGetSize
(
pExchangeInfo
->
pSources
);
if
(
pExchangeInfo
->
current
>=
totalSources
)
{
qDebug
(
"%s all %"
PRIzu
" source(s) are exhausted, total rows:%"
PRIu64
" bytes:%"
PRIu64
", elapsed:%.2f ms"
,
pTaskInfo
->
id
.
idstr
,
totalSources
,
pExchangeInfo
->
totalRows
,
pExchangeInfo
->
totalSize
,
pExchangeInfo
->
totalElapsed
/
1000
.
0
);
return
NULL
;
}
...
...
@@ -5166,6 +5168,7 @@ static SSDataBlock* doLoadRemoteData(void* param, bool* newgroup) {
epSet
.
port
[
0
]
=
pSource
->
addr
.
epAddr
[
0
].
port
;
tstrncpy
(
epSet
.
fqdn
[
0
],
pSource
->
addr
.
epAddr
[
0
].
fqdn
,
tListLen
(
epSet
.
fqdn
[
0
]));
int64_t
startTs
=
taosGetTimestampUs
();
qDebug
(
"%s build fetch msg and send to vgId:%d, ep:%s, taskId:0x%"
PRIx64
", %d/%"
PRIzu
,
GET_TASKID
(
pTaskInfo
),
pSource
->
addr
.
nodeId
,
epSet
.
fqdn
[
0
],
pSource
->
taskId
,
pExchangeInfo
->
current
,
totalSources
);
...
...
@@ -5202,6 +5205,11 @@ static SSDataBlock* doLoadRemoteData(void* param, bool* newgroup) {
pExchangeInfo
->
current
+=
1
;
if
(
pExchangeInfo
->
current
>=
totalSources
)
{
int64_t
el
=
taosGetTimestampUs
()
-
startTs
;
pExchangeInfo
->
totalElapsed
+=
el
;
qDebug
(
"%s all %"
PRIzu
" sources are exhausted, total rows: %"
PRIu64
" bytes:%"
PRIu64
", elapsed:%.2f ms"
,
pTaskInfo
->
id
.
idstr
,
totalSources
,
pExchangeInfo
->
totalRows
,
pExchangeInfo
->
totalSize
,
pExchangeInfo
->
totalElapsed
/
1000
.
0
);
return
NULL
;
}
else
{
continue
;
...
...
@@ -5228,21 +5236,24 @@ static SSDataBlock* doLoadRemoteData(void* param, bool* newgroup) {
pRes
->
info
.
numOfCols
=
pOperator
->
numOfOutput
;
pRes
->
info
.
rows
=
pRsp
->
numOfRows
;
int64_t
el
=
taosGetTimestampUs
()
-
startTs
;
pExchangeInfo
->
totalRows
+=
pRsp
->
numOfRows
;
pExchangeInfo
->
bytes
+=
pRsp
->
compLen
;
pExchangeInfo
->
totalSize
+=
pRsp
->
compLen
;
pExchangeInfo
->
rowsOfCurrentSource
+=
pRsp
->
numOfRows
;
pExchangeInfo
->
totalElapsed
+=
el
;
if
(
pRsp
->
completed
==
1
)
{
qDebug
(
"%s fetch msg rsp from vgId:%d, taskId:0x%"
PRIx64
" numOfRows:%d, rowsOfSource:%"
PRIu64
", totalRows:%"
PRIu64
", totalBytes:%"
PRIu64
" try next %d/%"
PRIzu
,
GET_TASKID
(
pTaskInfo
),
pSource
->
addr
.
nodeId
,
pSource
->
taskId
,
pRes
->
info
.
rows
,
pExchangeInfo
->
rowsOfCurrentSource
,
pExchangeInfo
->
totalRows
,
pExchangeInfo
->
bytes
,
GET_TASKID
(
pTaskInfo
),
pSource
->
addr
.
nodeId
,
pSource
->
taskId
,
pRes
->
info
.
rows
,
pExchangeInfo
->
rowsOfCurrentSource
,
pExchangeInfo
->
totalRows
,
pExchangeInfo
->
totalSize
,
pExchangeInfo
->
current
+
1
,
totalSources
);
pExchangeInfo
->
rowsOfCurrentSource
=
0
;
pExchangeInfo
->
current
+=
1
;
}
else
{
qDebug
(
"%s fetch msg rsp from vgId:%d, taskId:0x%"
PRIx64
" numOfRows:%d, totalRows:%"
PRIu64
", totalBytes:%"
PRIu64
,
GET_TASKID
(
pTaskInfo
),
pSource
->
addr
.
nodeId
,
pSource
->
taskId
,
pRes
->
info
.
rows
,
pExchangeInfo
->
totalRows
,
pExchangeInfo
->
bytes
);
GET_TASKID
(
pTaskInfo
),
pSource
->
addr
.
nodeId
,
pSource
->
taskId
,
pRes
->
info
.
rows
,
pExchangeInfo
->
totalRows
,
pExchangeInfo
->
totalSize
);
}
return
pExchangeInfo
->
pResult
;
...
...
@@ -5289,7 +5300,7 @@ SOperatorInfo* createExchangeOperatorInfo(const SArray* pSources, const SArray*
SRpcInit
rpcInit
;
memset
(
&
rpcInit
,
0
,
sizeof
(
rpcInit
));
rpcInit
.
localPort
=
0
;
rpcInit
.
label
=
"
TSC
"
;
rpcInit
.
label
=
"
EX
"
;
rpcInit
.
numOfThreads
=
1
;
rpcInit
.
cfp
=
processRspMsg
;
rpcInit
.
sessions
=
tsMaxConnections
;
...
...
source/libs/qworker/src/qworker.c
浏览文件 @
16cd734b
...
...
@@ -467,11 +467,11 @@ int32_t qwExecTask(QW_FPARAMS_DEF, SQWTaskCtx *ctx) {
DataSinkHandle
sinkHandle
=
ctx
->
sinkHandle
;
while
(
true
)
{
QW_TASK_DLOG
(
"start to execTask
in executor
, loopIdx:%d"
,
i
++
);
QW_TASK_DLOG
(
"start to execTask, loopIdx:%d"
,
i
++
);
code
=
qExecTask
(
*
taskHandle
,
&
pRes
,
&
useconds
);
if
(
code
)
{
QW_TASK_ELOG
(
"qExecTask failed, code:%
x"
,
code
);
QW_TASK_ELOG
(
"qExecTask failed, code:%
s"
,
tstrerror
(
code
)
);
QW_ERR_JRET
(
code
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录