Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
b043c544
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
b043c544
编写于
1月 06, 2022
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[td-11818] add log.
上级
0f2a175e
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
17 addition
and
19 deletion
+17
-19
source/client/test/clientTests.cpp
source/client/test/clientTests.cpp
+13
-11
source/libs/scheduler/src/scheduler.c
source/libs/scheduler/src/scheduler.c
+4
-8
未找到文件。
source/client/test/clientTests.cpp
浏览文件 @
b043c544
...
...
@@ -152,7 +152,7 @@ TEST(testCase, create_db_Test) {
TAOS
*
pConn
=
taos_connect
(
"localhost"
,
"root"
,
"taosdata"
,
NULL
,
0
);
assert
(
pConn
!=
NULL
);
TAOS_RES
*
pRes
=
taos_query
(
pConn
,
"create database abc1"
);
TAOS_RES
*
pRes
=
taos_query
(
pConn
,
"create database abc1
vgroups 2
"
);
if
(
taos_errno
(
pRes
)
!=
0
)
{
printf
(
"error in create db, reason:%s
\n
"
,
taos_errstr
(
pRes
));
}
...
...
@@ -254,7 +254,7 @@ TEST(testCase, use_db_test) {
TAOS
*
pConn
=
taos_connect
(
"localhost"
,
"root"
,
"taosdata"
,
NULL
,
0
);
assert
(
pConn
!=
NULL
);
TAOS_RES
*
pRes
=
taos_query
(
pConn
,
"create database abc1"
);
TAOS_RES
*
pRes
=
taos_query
(
pConn
,
"create database abc1
vgroups 2
"
);
if
(
taos_errno
(
pRes
)
!=
0
)
{
printf
(
"error in create db, reason:%s
\n
"
,
taos_errstr
(
pRes
));
}
...
...
@@ -505,15 +505,17 @@ 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
<
200000
;
++
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
));
}
printf
(
"%d
\n
"
,
i
);
taos_free_result
(
pres
);
}
taos_close
(
pConn
);
}
...
...
source/libs/scheduler/src/scheduler.c
浏览文件 @
b043c544
...
...
@@ -273,21 +273,20 @@ int32_t schSetTaskCandidateAddrs(SSchJob *job, SSchTask *task) {
return
TSDB_CODE_SUCCESS
;
}
int32_t
schPushTaskToExecList
(
SSchJob
*
pJob
,
SSchTask
*
pTask
)
{
if
(
0
!=
taosHashPut
(
pJob
->
execTasks
,
&
pTask
->
taskId
,
sizeof
(
pTask
->
taskId
),
&
pTask
,
POINTER_BYTES
))
{
qError
(
"failed to add new task, taskId:
%"
PRId
64
", reqId:0x"
PRIx64
", out of memory"
,
pJob
->
queryId
);
qError
(
"failed to add new task, taskId:
0x%"
PRIx
64
", reqId:0x"
PRIx64
", out of memory"
,
pJob
->
queryId
);
SCH_ERR_RET
(
TSDB_CODE_QRY_OUT_OF_MEMORY
);
}
qDebug
(
"add one task, taskId:
%"
PRId
64
", numOfTasks:%d, reqId:0x%"
PRIx64
,
pTask
->
taskId
,
taosHashGetSize
(
pJob
->
execTasks
),
qDebug
(
"add one task, taskId:
0x%"
PRIx
64
", numOfTasks:%d, reqId:0x%"
PRIx64
,
pTask
->
taskId
,
taosHashGetSize
(
pJob
->
execTasks
),
pJob
->
queryId
);
return
TSDB_CODE_SUCCESS
;
}
int32_t
schMoveTaskToSuccList
(
SSchJob
*
job
,
SSchTask
*
task
,
bool
*
moved
)
{
if
(
0
!=
taosHashRemove
(
job
->
execTasks
,
&
task
->
taskId
,
sizeof
(
task
->
taskId
)))
{
q
Warn
(
"remove task[%"
PRIx64
"] from execTasks failed"
,
task
->
task
Id
);
q
Error
(
"remove task taskId:0x%"
PRIx64
" from execTasks failed, reqId:0x%"
PRIx64
,
task
->
taskId
,
job
->
query
Id
);
return
TSDB_CODE_SUCCESS
;
}
...
...
@@ -590,10 +589,7 @@ int32_t schHandleCallback(void* param, const SDataBuf* pMsg, int32_t msgType, in
SSchTask
**
task
=
taosHashGet
((
*
job
)
->
execTasks
,
&
pParam
->
taskId
,
sizeof
(
pParam
->
taskId
));
if
(
NULL
==
task
||
NULL
==
(
*
task
))
{
void
*
f1
=
taosHashGet
((
*
job
)
->
execTasks
,
&
pParam
->
taskId
,
sizeof
(
pParam
->
taskId
));
assert
(
0
);
qError
(
"taosHashGet taskId:%"
PRIx64
" not exist"
,
pParam
->
taskId
);
qError
(
"failed to get task, taskId:%"
PRIx64
" not exist, reqId:0x%"
PRIx64
,
pParam
->
taskId
,
(
*
job
)
->
queryId
);
SCH_ERR_JRET
(
TSDB_CODE_SCH_INTERNAL_ERROR
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录