Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
9b4bda4f
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看板
提交
9b4bda4f
编写于
3月 05, 2022
作者:
D
dapan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feature/scheduler
上级
6830d866
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
16 addition
and
11 deletion
+16
-11
source/libs/scheduler/src/scheduler.c
source/libs/scheduler/src/scheduler.c
+3
-3
source/libs/scheduler/test/schedulerTests.cpp
source/libs/scheduler/test/schedulerTests.cpp
+13
-8
未找到文件。
source/libs/scheduler/src/scheduler.c
浏览文件 @
9b4bda4f
...
...
@@ -114,18 +114,18 @@ int32_t schValidateTaskReceivedMsgType(SSchJob *pJob, SSchTask *pTask, int32_t m
case
TDMT_VND_FETCH_RSP
:
case
TDMT_VND_DROP_TASK
:
if
(
lastMsgType
!=
(
msgType
-
1
))
{
SCH_TASK_ELOG
(
"rsp msg type mis-match, last sent msgType:%
d, rspType:%d"
,
lastMsgType
,
msgType
);
SCH_TASK_ELOG
(
"rsp msg type mis-match, last sent msgType:%
s, rspType:%s"
,
TMSG_INFO
(
lastMsgType
),
TMSG_INFO
(
msgType
)
);
SCH_ERR_RET
(
TSDB_CODE_SCH_STATUS_ERROR
);
}
if
(
SCH_GET_TASK_STATUS
(
pTask
)
!=
JOB_TASK_STATUS_EXECUTING
&&
SCH_GET_TASK_STATUS
(
pTask
)
!=
JOB_TASK_STATUS_PARTIAL_SUCCEED
)
{
SCH_TASK_ELOG
(
"rsp msg conflicted with task status, status:%d, rspType:%
d"
,
SCH_GET_TASK_STATUS
(
pTask
),
msgType
);
SCH_TASK_ELOG
(
"rsp msg conflicted with task status, status:%d, rspType:%
s"
,
SCH_GET_TASK_STATUS
(
pTask
),
TMSG_INFO
(
msgType
)
);
SCH_ERR_RET
(
TSDB_CODE_SCH_STATUS_ERROR
);
}
break
;
default:
SCH_TASK_ELOG
(
"unknown rsp msg, type:%
d, status:%d"
,
msgType
,
SCH_GET_TASK_STATUS
(
pTask
));
SCH_TASK_ELOG
(
"unknown rsp msg, type:%
s, status:%d"
,
TMSG_INFO
(
msgType
)
,
SCH_GET_TASK_STATUS
(
pTask
));
SCH_ERR_RET
(
TSDB_CODE_QRY_INVALID_INPUT
);
}
...
...
source/libs/scheduler/test/schedulerTests.cpp
浏览文件 @
9b4bda4f
...
...
@@ -113,6 +113,9 @@ void schtBuildQueryDag(SQueryPlan *dag) {
mergePlan
->
pNode
=
(
SPhysiNode
*
)
calloc
(
1
,
sizeof
(
SPhysiNode
));
mergePlan
->
msgType
=
TDMT_VND_QUERY
;
merge
->
pNodeList
=
nodesMakeList
();
scan
->
pNodeList
=
nodesMakeList
();
nodesListAppend
(
merge
->
pNodeList
,
(
SNode
*
)
mergePlan
);
nodesListAppend
(
scan
->
pNodeList
,
(
SNode
*
)
scanPlan
);
...
...
@@ -170,6 +173,8 @@ void schtBuildInsertDag(SQueryPlan *dag) {
insertPlan
[
1
].
pDataSink
=
(
SDataSinkNode
*
)
calloc
(
1
,
sizeof
(
SDataSinkNode
));
insertPlan
[
1
].
msgType
=
TDMT_VND_SUBMIT
;
inserta
->
pNodeList
=
nodesMakeList
();
nodesListAppend
(
inserta
->
pNodeList
,
(
SNode
*
)
insertPlan
);
insertPlan
+=
1
;
nodesListAppend
(
inserta
->
pNodeList
,
(
SNode
*
)
insertPlan
);
...
...
@@ -537,8 +542,6 @@ TEST(queryTest, normalCase) {
int64_t
job
=
0
;
SQueryPlan
dag
;
schtInitLogFile
();
SArray
*
qnodeList
=
taosArrayInit
(
1
,
sizeof
(
SEp
));
SEp
qnodeAddr
=
{
0
};
...
...
@@ -675,7 +678,8 @@ TEST(queryTest, flowCtrlCase) {
code
=
schHandleResponseMsg
(
pJob
,
task
,
TDMT_VND_QUERY_RSP
,
(
char
*
)
&
rsp
,
sizeof
(
rsp
),
0
);
ASSERT_EQ
(
code
,
0
);
pIter
=
taosHashIterate
(
pJob
->
execTasks
,
pIter
);
taosHashCancelIterate
(
pJob
->
execTasks
,
pIter
);
pIter
=
NULL
;
}
pIter
=
taosHashIterate
(
pJob
->
execTasks
,
NULL
);
...
...
@@ -686,7 +690,8 @@ TEST(queryTest, flowCtrlCase) {
code
=
schHandleResponseMsg
(
pJob
,
task
,
TDMT_VND_RES_READY_RSP
,
(
char
*
)
&
rsp
,
sizeof
(
rsp
),
0
);
printf
(
"code:%d"
,
code
);
ASSERT_EQ
(
code
,
0
);
pIter
=
taosHashIterate
(
pJob
->
execTasks
,
pIter
);
taosHashCancelIterate
(
pJob
->
execTasks
,
pIter
);
pIter
=
NULL
;
}
pIter
=
taosHashIterate
(
pJob
->
execTasks
,
NULL
);
...
...
@@ -697,7 +702,8 @@ TEST(queryTest, flowCtrlCase) {
code
=
schHandleResponseMsg
(
pJob
,
task
,
TDMT_VND_QUERY_RSP
,
(
char
*
)
&
rsp
,
sizeof
(
rsp
),
0
);
ASSERT_EQ
(
code
,
0
);
pIter
=
taosHashIterate
(
pJob
->
execTasks
,
pIter
);
taosHashCancelIterate
(
pJob
->
execTasks
,
pIter
);
pIter
=
NULL
;
}
pIter
=
taosHashIterate
(
pJob
->
execTasks
,
NULL
);
...
...
@@ -708,7 +714,8 @@ TEST(queryTest, flowCtrlCase) {
code
=
schHandleResponseMsg
(
pJob
,
task
,
TDMT_VND_RES_READY_RSP
,
(
char
*
)
&
rsp
,
sizeof
(
rsp
),
0
);
ASSERT_EQ
(
code
,
0
);
pIter
=
taosHashIterate
(
pJob
->
execTasks
,
pIter
);
taosHashCancelIterate
(
pJob
->
execTasks
,
pIter
);
pIter
=
NULL
;
}
pthread_attr_t
thattr
;
...
...
@@ -750,8 +757,6 @@ TEST(insertTest, normalCase) {
SQueryPlan
dag
;
uint64_t
numOfRows
=
0
;
schtInitLogFile
();
SArray
*
qnodeList
=
taosArrayInit
(
1
,
sizeof
(
SEp
));
SEp
qnodeAddr
=
{
0
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录