Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
11a07e7d
T
TDengine
项目概览
taosdata
/
TDengine
大约 2 年 前同步成功
通知
1192
Star
22018
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看板
提交
11a07e7d
编写于
1月 05, 2022
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/3.0' into feature/dnode3
上级
41d8c7a6
c8de167e
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
36 addition
and
32 deletion
+36
-32
source/client/src/clientImpl.c
source/client/src/clientImpl.c
+0
-2
source/client/test/clientTests.cpp
source/client/test/clientTests.cpp
+21
-21
source/libs/scheduler/src/scheduler.c
source/libs/scheduler/src/scheduler.c
+15
-9
未找到文件。
source/client/src/clientImpl.c
浏览文件 @
11a07e7d
...
...
@@ -535,9 +535,7 @@ void* doFetchRow(SRequestObj* pRequest) {
int64_t
transporterId
=
0
;
STscObj
*
pTscObj
=
pRequest
->
pTscObj
;
asyncSendMsgToServer
(
pTscObj
->
pTransporter
,
&
pTscObj
->
pAppInfo
->
mgmtEp
.
epSet
,
&
transporterId
,
body
);
tsem_wait
(
&
pRequest
->
body
.
rspSem
);
destroySendMsgInfo
(
body
);
pRequest
->
type
=
TDMT_VND_SHOW_TABLES_FETCH
;
}
...
...
source/client/test/clientTests.cpp
浏览文件 @
11a07e7d
...
...
@@ -281,18 +281,18 @@ TEST(testCase, use_db_test) {
taos_close
(
pConn
);
}
TEST
(
testCase
,
create_table_Test
)
{
TAOS
*
pConn
=
taos_connect
(
"localhost"
,
"root"
,
"taosdata"
,
NULL
,
0
);
assert
(
pConn
!=
NULL
);
TAOS_RES
*
pRes
=
taos_query
(
pConn
,
"use abc1"
);
taos_free_result
(
pRes
);
pRes
=
taos_query
(
pConn
,
"create table tm0(ts timestamp, k int)"
);
taos_free_result
(
pRes
);
taos_close
(
pConn
);
}
//
TEST(testCase, create_table_Test) {
//
TAOS* pConn = taos_connect("localhost", "root", "taosdata", NULL, 0);
//
assert(pConn != NULL);
//
//
TAOS_RES* pRes = taos_query(pConn, "use abc1");
//
taos_free_result(pRes);
//
//
pRes = taos_query(pConn, "create table tm0(ts timestamp, k int)");
//
taos_free_result(pRes);
//
//
taos_close(pConn);
//
}
//TEST(testCase, create_ctable_Test) {
// TAOS* pConn = taos_connect("localhost", "root", "taosdata", NULL, 0);
...
...
@@ -505,15 +505,15 @@ TEST(testCase, create_multiple_tables) {
taos_free_result
(
pRes
);
for
(
int32_t
i
=
0
;
i
<
1000
;
++
i
)
{
char
sql
[
512
]
=
{
0
};
snprintf
(
sql
,
tListLen
(
sql
),
"create table t_x_%d using st1 tags(2)"
,
i
);
TAOS_RES
*
pres
=
taos_query
(
pConn
,
sql
);
if
(
taos_errno
(
pres
)
!=
0
)
{
printf
(
"failed to create table %d
\n
, reason:%s"
,
i
,
taos_errstr
(
pres
));
}
taos_free_result
(
pres
);
}
//
for(int32_t i = 0; i < 1000; ++i) {
//
char sql[512] = {0};
//
snprintf(sql, tListLen(sql), "create table t_x_%d using st1 tags(2)", i);
//
TAOS_RES* pres = taos_query(pConn, sql);
//
if (taos_errno(pres) != 0) {
//
printf("failed to create table %d\n, reason:%s", i, taos_errstr(pres));
//
}
//
taos_free_result(pres);
//
}
taos_close
(
pConn
);
}
...
...
source/libs/scheduler/src/scheduler.c
浏览文件 @
11a07e7d
...
...
@@ -352,11 +352,12 @@ _return:
int32_t
schProcessOnJobPartialSuccess
(
SSchJob
*
job
)
{
job
->
status
=
JOB_TASK_STATUS_PARTIAL_SUCCEED
;
bool
needFetch
=
job
->
userFetch
;
if
((
!
job
->
attr
.
needFetch
)
&&
job
->
attr
.
syncSchedule
)
{
tsem_post
(
&
job
->
rspSem
);
}
if
(
job
->
user
Fetch
)
{
if
(
need
Fetch
)
{
SCH_ERR_RET
(
schFetchFromRemote
(
job
));
}
...
...
@@ -426,7 +427,6 @@ int32_t schProcessOnTaskSuccess(SSchJob *job, SSchTask *task) {
}
job
->
fetchTask
=
task
;
SCH_ERR_RET
(
schProcessOnJobPartialSuccess
(
job
));
return
TSDB_CODE_SUCCESS
;
...
...
@@ -501,7 +501,6 @@ int32_t schProcessRspMsg(SSchJob *job, SSchTask *task, int32_t msgType, char *ms
if
(
rspCode
!=
TSDB_CODE_SUCCESS
)
{
SCH_ERR_JRET
(
schProcessOnTaskFailure
(
job
,
task
,
rspCode
));
}
else
{
// job->resNumOfRows += rsp->affectedRows;
code
=
schProcessOnTaskSuccess
(
job
,
task
);
if
(
code
)
{
goto
_task_error
;
...
...
@@ -835,8 +834,6 @@ int32_t schLaunchTask(SSchJob *job, SSchTask *task) {
SCH_ERR_RET
(
TSDB_CODE_SCH_INTERNAL_ERROR
);
}
// int32_t msgType = (plan->type == QUERY_TYPE_MODIFY)? TDMT_VND_SUBMIT : TDMT_VND_QUERY;
SCH_ERR_RET
(
schBuildAndSendMsg
(
job
,
task
,
plan
->
msgType
));
SCH_ERR_RET
(
schPushTaskToExecList
(
job
,
task
));
...
...
@@ -860,8 +857,13 @@ void schDropJobAllTasks(SSchJob *job) {
void
*
pIter
=
taosHashIterate
(
job
->
succTasks
,
NULL
);
while
(
pIter
)
{
SSchTask
*
task
=
*
(
SSchTask
**
)
pIter
;
schBuildAndSendMsg
(
job
,
task
,
TDMT_VND_DROP_TASK
);
int32_t
msgType
=
task
->
plan
->
msgType
;
if
(
msgType
==
TDMT_VND_CREATE_TABLE
||
msgType
==
TDMT_VND_SUBMIT
)
{
break
;
}
schBuildAndSendMsg
(
job
,
task
,
TDMT_VND_DROP_TASK
);
pIter
=
taosHashIterate
(
job
->
succTasks
,
pIter
);
}
...
...
@@ -869,8 +871,12 @@ void schDropJobAllTasks(SSchJob *job) {
while
(
pIter
)
{
SSchTask
*
task
=
*
(
SSchTask
**
)
pIter
;
schBuildAndSendMsg
(
job
,
task
,
TDMT_VND_DROP_TASK
);
int32_t
msgType
=
task
->
plan
->
msgType
;
if
(
msgType
==
TDMT_VND_CREATE_TABLE
||
msgType
==
TDMT_VND_SUBMIT
)
{
break
;
}
schBuildAndSendMsg
(
job
,
task
,
TDMT_VND_DROP_TASK
);
pIter
=
taosHashIterate
(
job
->
succTasks
,
pIter
);
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录