Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
b4ca6c84
T
TDengine
项目概览
taosdata
/
TDengine
大约 2 年 前同步成功
通知
1193
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看板
未验证
提交
b4ca6c84
编写于
12月 09, 2022
作者:
S
Shengliang Guan
提交者:
GitHub
12月 09, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #18857 from taosdata/enh/changeDefaultValue
fix: change default sch value
上级
7c82e8ab
e150913c
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
31 addition
and
21 deletion
+31
-21
source/libs/qworker/inc/qwInt.h
source/libs/qworker/inc/qwInt.h
+4
-4
source/libs/qworker/src/qwUtil.c
source/libs/qworker/src/qwUtil.c
+9
-2
source/libs/qworker/src/qworker.c
source/libs/qworker/src/qworker.c
+18
-15
未找到文件。
source/libs/qworker/inc/qwInt.h
浏览文件 @
b4ca6c84
...
@@ -31,7 +31,7 @@ extern "C" {
...
@@ -31,7 +31,7 @@ extern "C" {
#define QW_DEFAULT_SCHEDULER_NUMBER 100
#define QW_DEFAULT_SCHEDULER_NUMBER 100
#define QW_DEFAULT_TASK_NUMBER 10000
#define QW_DEFAULT_TASK_NUMBER 10000
#define QW_DEFAULT_SCH_TASK_NUMBER
10
000
#define QW_DEFAULT_SCH_TASK_NUMBER
3
000
#define QW_DEFAULT_SHORT_RUN_TIMES 2
#define QW_DEFAULT_SHORT_RUN_TIMES 2
#define QW_DEFAULT_HEARTBEAT_MSEC 5000
#define QW_DEFAULT_HEARTBEAT_MSEC 5000
#define QW_SCH_TIMEOUT_MSEC 180000
#define QW_SCH_TIMEOUT_MSEC 180000
...
...
source/libs/qworker/src/qwUtil.c
浏览文件 @
b4ca6c84
...
@@ -463,6 +463,8 @@ void qwDestroyImpl(void *pMgmt) {
...
@@ -463,6 +463,8 @@ void qwDestroyImpl(void *pMgmt) {
int8_t
nodeType
=
mgmt
->
nodeType
;
int8_t
nodeType
=
mgmt
->
nodeType
;
int32_t
nodeId
=
mgmt
->
nodeId
;
int32_t
nodeId
=
mgmt
->
nodeId
;
int32_t
taskCount
=
0
;
int32_t
schStatusCount
=
0
;
qDebug
(
"start to destroy qworker, type:%d, id:%d, handle:%p"
,
nodeType
,
nodeId
,
mgmt
);
qDebug
(
"start to destroy qworker, type:%d, id:%d, handle:%p"
,
nodeType
,
nodeId
,
mgmt
);
taosTmrStop
(
mgmt
->
hbTimer
);
taosTmrStop
(
mgmt
->
hbTimer
);
...
@@ -472,6 +474,7 @@ void qwDestroyImpl(void *pMgmt) {
...
@@ -472,6 +474,7 @@ void qwDestroyImpl(void *pMgmt) {
uint64_t
qId
,
tId
;
uint64_t
qId
,
tId
;
int32_t
eId
;
int32_t
eId
;
void
*
pIter
=
taosHashIterate
(
mgmt
->
ctxHash
,
NULL
);
void
*
pIter
=
taosHashIterate
(
mgmt
->
ctxHash
,
NULL
);
while
(
pIter
)
{
while
(
pIter
)
{
SQWTaskCtx
*
ctx
=
(
SQWTaskCtx
*
)
pIter
;
SQWTaskCtx
*
ctx
=
(
SQWTaskCtx
*
)
pIter
;
void
*
key
=
taosHashGetKey
(
pIter
,
NULL
);
void
*
key
=
taosHashGetKey
(
pIter
,
NULL
);
...
@@ -480,6 +483,7 @@ void qwDestroyImpl(void *pMgmt) {
...
@@ -480,6 +483,7 @@ void qwDestroyImpl(void *pMgmt) {
qwFreeTaskCtx
(
ctx
);
qwFreeTaskCtx
(
ctx
);
QW_TASK_DLOG_E
(
"task ctx freed"
);
QW_TASK_DLOG_E
(
"task ctx freed"
);
pIter
=
taosHashIterate
(
mgmt
->
ctxHash
,
pIter
);
pIter
=
taosHashIterate
(
mgmt
->
ctxHash
,
pIter
);
taskCount
++
;
}
}
taosHashCleanup
(
mgmt
->
ctxHash
);
taosHashCleanup
(
mgmt
->
ctxHash
);
...
@@ -487,7 +491,9 @@ void qwDestroyImpl(void *pMgmt) {
...
@@ -487,7 +491,9 @@ void qwDestroyImpl(void *pMgmt) {
while
(
pIter
)
{
while
(
pIter
)
{
SQWSchStatus
*
sch
=
(
SQWSchStatus
*
)
pIter
;
SQWSchStatus
*
sch
=
(
SQWSchStatus
*
)
pIter
;
qwDestroySchStatus
(
sch
);
qwDestroySchStatus
(
sch
);
pIter
=
taosHashIterate
(
mgmt
->
schHash
,
pIter
);
pIter
=
taosHashIterate
(
mgmt
->
schHash
,
pIter
);
schStatusCount
++
;
}
}
taosHashCleanup
(
mgmt
->
schHash
);
taosHashCleanup
(
mgmt
->
schHash
);
...
@@ -499,7 +505,8 @@ void qwDestroyImpl(void *pMgmt) {
...
@@ -499,7 +505,8 @@ void qwDestroyImpl(void *pMgmt) {
qwCloseRef
();
qwCloseRef
();
qDebug
(
"qworker destroyed, type:%d, id:%d, handle:%p"
,
nodeType
,
nodeId
,
mgmt
);
qDebug
(
"qworker destroyed, type:%d, id:%d, handle:%p, taskCount:%d, schStatusCount: %d"
,
nodeType
,
nodeId
,
mgmt
,
taskCount
,
schStatusCount
);
}
}
int32_t
qwOpenRef
(
void
)
{
int32_t
qwOpenRef
(
void
)
{
...
...
source/libs/qworker/src/qworker.c
浏览文件 @
b4ca6c84
...
@@ -8,9 +8,9 @@
...
@@ -8,9 +8,9 @@
#include "qwMsg.h"
#include "qwMsg.h"
#include "tcommon.h"
#include "tcommon.h"
#include "tdatablock.h"
#include "tdatablock.h"
#include "tglobal.h"
#include "tmsg.h"
#include "tmsg.h"
#include "tname.h"
#include "tname.h"
#include "tglobal.h"
SQWorkerMgmt
gQwMgmt
=
{
SQWorkerMgmt
gQwMgmt
=
{
.
lock
=
0
,
.
lock
=
0
,
...
@@ -275,7 +275,7 @@ int32_t qwGetQueryResFromSink(QW_FPARAMS_DEF, SQWTaskCtx *ctx, int32_t *dataLen,
...
@@ -275,7 +275,7 @@ int32_t qwGetQueryResFromSink(QW_FPARAMS_DEF, SQWTaskCtx *ctx, int32_t *dataLen,
QW_ERR_RET
(
code
);
QW_ERR_RET
(
code
);
}
}
QW_TASK_DLOG
(
"no more data in sink and query end, fetched blocks %d rows %"
PRId64
,
pOutput
->
numOfBlocks
,
QW_TASK_DLOG
(
"no more data in sink and query end, fetched blocks %d rows %"
PRId64
,
pOutput
->
numOfBlocks
,
pOutput
->
numOfRows
);
pOutput
->
numOfRows
);
qwUpdateTaskStatus
(
QW_FPARAMS
(),
JOB_TASK_STATUS_SUCC
);
qwUpdateTaskStatus
(
QW_FPARAMS
(),
JOB_TASK_STATUS_SUCC
);
...
@@ -327,12 +327,14 @@ int32_t qwGetQueryResFromSink(QW_FPARAMS_DEF, SQWTaskCtx *ctx, int32_t *dataLen,
...
@@ -327,12 +327,14 @@ int32_t qwGetQueryResFromSink(QW_FPARAMS_DEF, SQWTaskCtx *ctx, int32_t *dataLen,
}
}
if
(
0
==
ctx
->
level
)
{
if
(
0
==
ctx
->
level
)
{
QW_TASK_DLOG
(
"task fetched blocks %d rows %"
PRId64
", level %d"
,
pOutput
->
numOfBlocks
,
pOutput
->
numOfRows
,
ctx
->
level
);
QW_TASK_DLOG
(
"task fetched blocks %d rows %"
PRId64
", level %d"
,
pOutput
->
numOfBlocks
,
pOutput
->
numOfRows
,
ctx
->
level
);
break
;
break
;
}
}
if
(
pOutput
->
numOfRows
>=
QW_MIN_RES_ROWS
)
{
if
(
pOutput
->
numOfRows
>=
QW_MIN_RES_ROWS
)
{
QW_TASK_DLOG
(
"task fetched blocks %d rows %"
PRId64
" reaches the min rows"
,
pOutput
->
numOfBlocks
,
pOutput
->
numOfRows
);
QW_TASK_DLOG
(
"task fetched blocks %d rows %"
PRId64
" reaches the min rows"
,
pOutput
->
numOfBlocks
,
pOutput
->
numOfRows
);
break
;
break
;
}
}
}
}
...
@@ -671,8 +673,8 @@ _return:
...
@@ -671,8 +673,8 @@ _return:
qwBuildAndSendFetchRsp
(
ctx
->
fetchType
,
&
qwMsg
->
connInfo
,
rsp
,
dataLen
,
code
);
qwBuildAndSendFetchRsp
(
ctx
->
fetchType
,
&
qwMsg
->
connInfo
,
rsp
,
dataLen
,
code
);
rsp
=
NULL
;
rsp
=
NULL
;
QW_TASK_DLOG
(
"fetch rsp send, handle:%p, code:%x - %s, dataLen:%d"
,
qwMsg
->
connInfo
.
handle
,
code
,
QW_TASK_DLOG
(
"fetch rsp send, handle:%p, code:%x - %s, dataLen:%d"
,
qwMsg
->
connInfo
.
handle
,
code
,
tstrerror
(
code
),
tstrerror
(
code
),
dataLen
);
dataLen
);
}
}
}
}
...
@@ -748,7 +750,8 @@ int32_t qwProcessCQuery(QW_FPARAMS_DEF, SQWMsg *qwMsg) {
...
@@ -748,7 +750,8 @@ int32_t qwProcessCQuery(QW_FPARAMS_DEF, SQWMsg *qwMsg) {
}
}
QW_LOCK
(
QW_WRITE
,
&
ctx
->
lock
);
QW_LOCK
(
QW_WRITE
,
&
ctx
->
lock
);
if
((
queryStop
&&
(
0
==
atomic_load_8
((
int8_t
*
)
&
ctx
->
queryContinue
)))
||
code
||
0
==
atomic_load_8
((
int8_t
*
)
&
ctx
->
queryContinue
))
{
if
((
queryStop
&&
(
0
==
atomic_load_8
((
int8_t
*
)
&
ctx
->
queryContinue
)))
||
code
||
0
==
atomic_load_8
((
int8_t
*
)
&
ctx
->
queryContinue
))
{
// Note: query is not running anymore
// Note: query is not running anymore
QW_SET_PHASE
(
ctx
,
0
);
QW_SET_PHASE
(
ctx
,
0
);
QW_UNLOCK
(
QW_WRITE
,
&
ctx
->
lock
);
QW_UNLOCK
(
QW_WRITE
,
&
ctx
->
lock
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录