Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
0cd87101
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看板
提交
0cd87101
编写于
3月 07, 2023
作者:
5
54liuyao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix:fix fill history bug
上级
325b3439
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
19 addition
and
4 deletion
+19
-4
include/libs/executor/executor.h
include/libs/executor/executor.h
+1
-0
source/libs/executor/src/executor.c
source/libs/executor/src/executor.c
+7
-1
source/libs/executor/src/scanoperator.c
source/libs/executor/src/scanoperator.c
+1
-0
source/libs/stream/src/streamExec.c
source/libs/stream/src/streamExec.c
+9
-2
source/libs/stream/src/streamRecover.c
source/libs/stream/src/streamRecover.c
+1
-1
未找到文件。
include/libs/executor/executor.h
浏览文件 @
0cd87101
...
...
@@ -219,6 +219,7 @@ int32_t qStreamRecoverFinish(qTaskInfo_t tinfo);
int32_t
qStreamRestoreParam
(
qTaskInfo_t
tinfo
);
bool
qStreamRecoverScanFinished
(
qTaskInfo_t
tinfo
);
void
qStreamCloseTsdbReader
(
void
*
task
);
void
resetTaskInfo
(
qTaskInfo_t
tinfo
);
#ifdef __cplusplus
}
...
...
source/libs/executor/src/executor.c
浏览文件 @
0cd87101
...
...
@@ -104,6 +104,12 @@ static void clearStreamBlock(SOperatorInfo* pOperator) {
}
}
void
resetTaskInfo
(
qTaskInfo_t
tinfo
)
{
SExecTaskInfo
*
pTaskInfo
=
(
SExecTaskInfo
*
)
tinfo
;
pTaskInfo
->
code
=
0
;
clearStreamBlock
(
pTaskInfo
->
pRoot
);
}
static
int32_t
doSetStreamBlock
(
SOperatorInfo
*
pOperator
,
void
*
input
,
size_t
numOfBlocks
,
int32_t
type
,
char
*
id
)
{
if
(
pOperator
->
operatorType
!=
QUERY_NODE_PHYSICAL_PLAN_STREAM_SCAN
)
{
if
(
pOperator
->
numOfDownstream
==
0
)
{
...
...
@@ -618,7 +624,7 @@ int32_t qExecTask(qTaskInfo_t tinfo, SSDataBlock** pRes, uint64_t* useconds) {
pTaskInfo
->
cost
.
start
=
taosGetTimestampUs
();
}
if
(
isTaskKilled
(
pTaskInfo
)
&&
pTaskInfo
->
code
!=
TSDB_CODE_QRY_IN_EXEC
)
{
if
(
isTaskKilled
(
pTaskInfo
))
{
clearStreamBlock
(
pTaskInfo
->
pRoot
);
atomic_store_64
(
&
pTaskInfo
->
owner
,
0
);
qDebug
(
"%s already killed, abort"
,
GET_TASKID
(
pTaskInfo
));
...
...
source/libs/executor/src/scanoperator.c
浏览文件 @
0cd87101
...
...
@@ -946,6 +946,7 @@ SOperatorInfo* createTableSeqScanOperatorInfo(void* pReadHandle, SExecTaskInfo*
}
FORCE_INLINE
void
doClearBufferedBlocks
(
SStreamScanInfo
*
pInfo
)
{
qDebug
(
"clear buff blocks:%d"
,
(
int32_t
)
taosArrayGetSize
(
pInfo
->
pBlockLists
));
taosArrayClear
(
pInfo
->
pBlockLists
);
pInfo
->
validBlockIndex
=
0
;
}
...
...
source/libs/stream/src/streamExec.c
浏览文件 @
0cd87101
...
...
@@ -20,6 +20,11 @@
static
int32_t
streamTaskExecImpl
(
SStreamTask
*
pTask
,
const
void
*
data
,
SArray
*
pRes
)
{
int32_t
code
;
void
*
exec
=
pTask
->
exec
.
executor
;
while
(
atomic_load_8
(
&
pTask
->
taskStatus
)
!=
TASK_STATUS__NORMAL
)
{
qError
(
"stream task wait for the end of fill history"
);
taosMsleep
(
2
);
continue
;
}
// set input
const
SStreamQueueItem
*
pItem
=
(
const
SStreamQueueItem
*
)
data
;
...
...
@@ -58,6 +63,9 @@ static int32_t streamTaskExecImpl(SStreamTask* pTask, const void* data, SArray*
SSDataBlock
*
output
=
NULL
;
uint64_t
ts
=
0
;
if
((
code
=
qExecTask
(
exec
,
&
output
,
&
ts
))
<
0
)
{
if
(
code
==
TSDB_CODE_QRY_IN_EXEC
)
{
resetTaskInfo
(
exec
);
}
/*ASSERT(false);*/
qError
(
"unexpected stream execution, stream %"
PRId64
" task: %d, since %s"
,
pTask
->
streamId
,
pTask
->
taskId
,
terrstr
());
...
...
@@ -121,8 +129,7 @@ int32_t streamScanExec(SStreamTask* pTask, int32_t batchSz) {
SSDataBlock
*
output
=
NULL
;
uint64_t
ts
=
0
;
if
(
qExecTask
(
exec
,
&
output
,
&
ts
)
<
0
)
{
taosArrayDestroy
(
pRes
);
return
-
1
;
continue
;
}
if
(
output
==
NULL
)
{
if
(
qStreamRecoverScanFinished
(
exec
))
{
...
...
source/libs/stream/src/streamRecover.c
浏览文件 @
0cd87101
...
...
@@ -168,7 +168,7 @@ int32_t streamRestoreParam(SStreamTask* pTask) {
return
qStreamRestoreParam
(
exec
);
}
int32_t
streamSetStatusNormal
(
SStreamTask
*
pTask
)
{
pTask
->
taskStatus
=
TASK_STATUS__NORMAL
;
atomic_store_8
(
&
pTask
->
taskStatus
,
TASK_STATUS__NORMAL
)
;
return
0
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录