Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
f60441e2
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看板
提交
f60441e2
编写于
11月 11, 2022
作者:
D
dapan1121
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: fix query thread quitting issue
上级
89c13efb
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
16 addition
and
9 deletion
+16
-9
include/libs/qworker/qworker.h
include/libs/qworker/qworker.h
+2
-0
include/util/taoserror.h
include/util/taoserror.h
+1
-0
source/dnode/vnode/src/vnd/vnodeQuery.c
source/dnode/vnode/src/vnd/vnodeQuery.c
+1
-1
source/libs/executor/inc/executorimpl.h
source/libs/executor/inc/executorimpl.h
+1
-0
source/libs/executor/src/executor.c
source/libs/executor/src/executor.c
+1
-1
source/libs/qworker/inc/qwInt.h
source/libs/qworker/inc/qwInt.h
+3
-3
source/libs/qworker/src/qworker.c
source/libs/qworker/src/qworker.c
+6
-4
source/util/src/terror.c
source/util/src/terror.c
+1
-0
未找到文件。
include/libs/qworker/qworker.h
浏览文件 @
f60441e2
...
...
@@ -94,6 +94,8 @@ int32_t qWorkerProcessHbMsg(void *node, void *qWorkerMgmt, SRpcMsg *pMsg, int64_
int32_t
qWorkerProcessDeleteMsg
(
void
*
node
,
void
*
qWorkerMgmt
,
SRpcMsg
*
pMsg
,
SDeleteRes
*
pRes
);
void
qWorkerStopAllTasks
(
void
*
qWorkerMgmt
);
void
qWorkerDestroy
(
void
**
qWorkerMgmt
);
int32_t
qWorkerGetStat
(
SReadHandle
*
handle
,
void
*
qWorkerMgmt
,
SQWorkerStat
*
pStat
);
...
...
include/util/taoserror.h
浏览文件 @
f60441e2
...
...
@@ -385,6 +385,7 @@ int32_t* taosGetErrno();
#define TSDB_CODE_QRY_JSON_NOT_SUPPORT_ERROR TAOS_DEF_ERROR_CODE(0, 0x072D)
#define TSDB_CODE_QRY_JSON_IN_GROUP_ERROR TAOS_DEF_ERROR_CODE(0, 0x072E)
#define TSDB_CODE_QRY_JOB_NOT_EXIST TAOS_DEF_ERROR_CODE(0, 0x072F)
#define TSDB_CODE_QRY_QWORKER_QUIT TAOS_DEF_ERROR_CODE(0, 0x0730)
// grant
#define TSDB_CODE_GRANT_EXPIRED TAOS_DEF_ERROR_CODE(0, 0x0800)
...
...
source/dnode/vnode/src/vnd/vnodeQuery.c
浏览文件 @
f60441e2
...
...
@@ -28,7 +28,7 @@ int vnodeQueryOpen(SVnode *pVnode) {
return
qWorkerInit
(
NODE_TYPE_VNODE
,
TD_VID
(
pVnode
),
(
void
**
)
&
pVnode
->
pQuery
,
&
pVnode
->
msgCb
);
}
void
vnodeQueryPreClose
(
SVnode
*
pVnode
)
{
q
w
orkerStopAllTasks
((
void
*
)
pVnode
->
pQuery
);
}
void
vnodeQueryPreClose
(
SVnode
*
pVnode
)
{
q
W
orkerStopAllTasks
((
void
*
)
pVnode
->
pQuery
);
}
void
vnodeQueryClose
(
SVnode
*
pVnode
)
{
qWorkerDestroy
((
void
**
)
&
pVnode
->
pQuery
);
}
...
...
source/libs/executor/inc/executorimpl.h
浏览文件 @
f60441e2
...
...
@@ -1058,6 +1058,7 @@ int32_t setOutputBuf(SStreamState* pState, STimeWindow* win, SResultRow** pResul
int32_t
releaseOutputBuf
(
SStreamState
*
pState
,
SWinKey
*
pKey
,
SResultRow
*
pResult
);
int32_t
saveOutputBuf
(
SStreamState
*
pState
,
SWinKey
*
pKey
,
SResultRow
*
pResult
,
int32_t
resSize
);
void
getNextIntervalWindow
(
SInterval
*
pInterval
,
STimeWindow
*
tw
,
int32_t
order
);
int32_t
qAppendTaskStopInfo
(
SExecTaskInfo
*
pTaskInfo
,
SExchangeOpStopInfo
*
pInfo
);
#ifdef __cplusplus
}
...
...
source/libs/executor/src/executor.c
浏览文件 @
f60441e2
...
...
@@ -688,7 +688,7 @@ void qRemoveTaskStopInfo(SExecTaskInfo* pTaskInfo, SExchangeOpStopInfo *pInfo) {
}
taosWUnLockLatch
(
&
pTaskInfo
->
stopInfo
.
lock
);
return
TSDB_CODE_SUCCESS
;
return
;
}
void
qStopTaskOperators
(
SExecTaskInfo
*
pTaskInfo
)
{
...
...
source/libs/qworker/inc/qwInt.h
浏览文件 @
f60441e2
...
...
@@ -246,7 +246,7 @@ typedef struct SQWorkerMgmt {
#define QW_ERR_RET(c) \
do { \
int32_t _code =
c
; \
int32_t _code =
(c)
; \
if (_code != TSDB_CODE_SUCCESS) { \
terrno = _code; \
return _code; \
...
...
@@ -254,7 +254,7 @@ typedef struct SQWorkerMgmt {
} while (0)
#define QW_RET(c) \
do { \
int32_t _code =
c
; \
int32_t _code =
(c)
; \
if (_code != TSDB_CODE_SUCCESS) { \
terrno = _code; \
} \
...
...
@@ -262,7 +262,7 @@ typedef struct SQWorkerMgmt {
} while (0)
#define QW_ERR_JRET(c) \
do { \
code =
c
; \
code =
(c)
; \
if (code != TSDB_CODE_SUCCESS) { \
terrno = code; \
goto _return; \
...
...
source/libs/qworker/src/qworker.c
浏览文件 @
f60441e2
...
...
@@ -683,6 +683,8 @@ int32_t qwProcessCQuery(QW_FPARAMS_DEF, SQWMsg *qwMsg) {
bool
queryStop
=
false
;
do
{
ctx
=
NULL
;
QW_ERR_JRET
(
qwHandlePrePhaseEvents
(
QW_FPARAMS
(),
QW_PHASE_PRE_CQUERY
,
&
input
,
NULL
));
QW_ERR_JRET
(
qwGetTaskCtx
(
QW_FPARAMS
(),
&
ctx
));
...
...
@@ -1162,11 +1164,13 @@ _return:
QW_RET
(
code
);
}
void
q
w
orkerStopAllTasks
(
void
*
qWorkerMgmt
)
{
void
q
W
orkerStopAllTasks
(
void
*
qWorkerMgmt
)
{
SQWorker
*
mgmt
=
(
SQWorker
*
)
qWorkerMgmt
;
QW_DLOG
(
"start to stop all tasks, taskNum:%d"
,
taosHashGetSize
(
mgmt
->
ctxHash
));
uint64_t
qId
,
tId
;
int32_t
eId
;
void
*
pIter
=
taosHashIterate
(
mgmt
->
ctxHash
,
NULL
);
while
(
pIter
)
{
SQWTaskCtx
*
ctx
=
(
SQWTaskCtx
*
)
pIter
;
...
...
@@ -1187,8 +1191,6 @@ void qworkerStopAllTasks(void *qWorkerMgmt) {
if
(
QW_QUERY_RUNNING
(
ctx
))
{
qwKillTaskHandle
(
ctx
);
}
else
{
qwDropTask
(
QW_FPARAMS
());
}
QW_UNLOCK
(
QW_WRITE
,
&
ctx
->
lock
);
...
...
source/util/src/terror.c
浏览文件 @
f60441e2
...
...
@@ -377,6 +377,7 @@ TAOS_DEFINE_ERROR(TSDB_CODE_QRY_JSON_IN_ERROR, "Json not support in i
TAOS_DEFINE_ERROR
(
TSDB_CODE_QRY_JSON_NOT_SUPPORT_ERROR
,
"Json not support in this place"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_QRY_JSON_IN_GROUP_ERROR
,
"Json not support in group/partition by"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_QRY_JOB_NOT_EXIST
,
"Job not exist"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_QRY_QWORKER_QUIT
,
"Vnode/Qnode is quitting"
)
// grant
TAOS_DEFINE_ERROR
(
TSDB_CODE_GRANT_EXPIRED
,
"License expired"
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录