Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
ef21c6b3
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看板
提交
ef21c6b3
编写于
6月 20, 2022
作者:
D
dapan1121
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
enh: add rpc msg abort preprocess
上级
a8694bd8
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
40 addition
and
0 deletion
+40
-0
include/dnode/mnode/mnode.h
include/dnode/mnode/mnode.h
+1
-0
include/libs/qworker/qworker.h
include/libs/qworker/qworker.h
+2
-0
source/dnode/mnode/impl/src/mndMain.c
source/dnode/mnode/impl/src/mndMain.c
+2
-0
source/dnode/mnode/impl/src/mndQuery.c
source/dnode/mnode/impl/src/mndQuery.c
+7
-0
source/libs/qworker/inc/qwMsg.h
source/libs/qworker/inc/qwMsg.h
+1
-0
source/libs/qworker/src/qwMsg.c
source/libs/qworker/src/qwMsg.c
+20
-0
source/libs/qworker/src/qworker.c
source/libs/qworker/src/qworker.c
+7
-0
未找到文件。
include/dnode/mnode/mnode.h
浏览文件 @
ef21c6b3
...
...
@@ -96,6 +96,7 @@ int32_t mndGetLoad(SMnode *pMnode, SMnodeLoad *pLoad);
int32_t
mndProcessRpcMsg
(
SRpcMsg
*
pMsg
);
int32_t
mndProcessSyncMsg
(
SRpcMsg
*
pMsg
);
int32_t
mndPreProcessMsg
(
SRpcMsg
*
pMsg
);
void
mndAbortPreprocessMsg
(
SRpcMsg
*
pMsg
);
/**
* @brief Generate machine code
...
...
include/libs/qworker/qworker.h
浏览文件 @
ef21c6b3
...
...
@@ -64,6 +64,8 @@ typedef struct {
int32_t
qWorkerInit
(
int8_t
nodeType
,
int32_t
nodeId
,
SQWorkerCfg
*
cfg
,
void
**
qWorkerMgmt
,
const
SMsgCb
*
pMsgCb
);
int32_t
qWorkerAbortPreprocessQueryMsg
(
void
*
qWorkerMgmt
,
SRpcMsg
*
pMsg
);
int32_t
qWorkerPreprocessQueryMsg
(
void
*
qWorkerMgmt
,
SRpcMsg
*
pMsg
);
int32_t
qWorkerProcessQueryMsg
(
void
*
node
,
void
*
qWorkerMgmt
,
SRpcMsg
*
pMsg
,
int64_t
ts
);
...
...
source/dnode/mnode/impl/src/mndMain.c
浏览文件 @
ef21c6b3
...
...
@@ -550,6 +550,8 @@ static int32_t mndCheckMnodeState(SRpcMsg *pMsg) {
pMsg
->
msgType
!=
TDMT_MND_TRANS_TIMER
)
{
mError
(
"msg:%p, failed to check mnode state since %s, type:%s"
,
pMsg
,
terrstr
(),
TMSG_INFO
(
pMsg
->
msgType
));
mndAbortPreprocessMsg
(
pMsg
);
SEpSet
epSet
=
{
0
};
mndGetMnodeEpSet
(
pMsg
->
info
.
node
,
&
epSet
);
...
...
source/dnode/mnode/impl/src/mndQuery.c
浏览文件 @
ef21c6b3
...
...
@@ -25,6 +25,13 @@ int32_t mndPreProcessMsg(SRpcMsg *pMsg) {
return
qWorkerPreprocessQueryMsg
(
pMnode
->
pQuery
,
pMsg
);
}
void
mndAbortPreprocessMsg
(
SRpcMsg
*
pMsg
)
{
if
(
TDMT_VND_QUERY
!=
pMsg
->
msgType
)
return
;
SMnode
*
pMnode
=
pMsg
->
info
.
node
;
qWorkerAbortPreprocessQueryMsg
(
pMnode
->
pQuery
,
pMsg
);
}
int32_t
mndProcessQueryMsg
(
SRpcMsg
*
pMsg
)
{
int32_t
code
=
-
1
;
SMnode
*
pMnode
=
pMsg
->
info
.
node
;
...
...
source/libs/qworker/inc/qwMsg.h
浏览文件 @
ef21c6b3
...
...
@@ -23,6 +23,7 @@ extern "C" {
#include "qwInt.h"
#include "dataSinkMgt.h"
int32_t
qwAbortPrerocessQuery
(
QW_FPARAMS_DEF
);
int32_t
qwPrerocessQuery
(
QW_FPARAMS_DEF
,
SQWMsg
*
qwMsg
);
int32_t
qwProcessQuery
(
QW_FPARAMS_DEF
,
SQWMsg
*
qwMsg
,
int8_t
taskType
,
int8_t
explain
,
const
char
*
sql
);
int32_t
qwProcessCQuery
(
QW_FPARAMS_DEF
,
SQWMsg
*
qwMsg
);
...
...
source/libs/qworker/src/qwMsg.c
浏览文件 @
ef21c6b3
...
...
@@ -283,6 +283,26 @@ int32_t qWorkerPreprocessQueryMsg(void *qWorkerMgmt, SRpcMsg *pMsg) {
return
TSDB_CODE_SUCCESS
;
}
int32_t
qWorkerAbortPreprocessQueryMsg
(
void
*
qWorkerMgmt
,
SRpcMsg
*
pMsg
)
{
if
(
NULL
==
qWorkerMgmt
||
NULL
==
pMsg
)
{
QW_ERR_RET
(
TSDB_CODE_QRY_INVALID_INPUT
);
}
SSubQueryMsg
*
msg
=
pMsg
->
pCont
;
SQWorker
*
mgmt
=
(
SQWorker
*
)
qWorkerMgmt
;
uint64_t
sId
=
msg
->
sId
;
uint64_t
qId
=
msg
->
queryId
;
uint64_t
tId
=
msg
->
taskId
;
int64_t
rId
=
msg
->
refId
;
QW_SCH_TASK_DLOG
(
"Abort prerocessQuery start, handle:%p"
,
pMsg
->
info
.
handle
);
qwAbortPrerocessQuery
(
QW_FPARAMS
());
QW_SCH_TASK_DLOG
(
"Abort prerocessQuery end, handle:%p"
,
pMsg
->
info
.
handle
);
return
TSDB_CODE_SUCCESS
;
}
int32_t
qWorkerProcessQueryMsg
(
void
*
node
,
void
*
qWorkerMgmt
,
SRpcMsg
*
pMsg
,
int64_t
ts
)
{
if
(
NULL
==
node
||
NULL
==
qWorkerMgmt
||
NULL
==
pMsg
)
{
QW_ERR_RET
(
TSDB_CODE_QRY_INVALID_INPUT
);
...
...
source/libs/qworker/src/qworker.c
浏览文件 @
ef21c6b3
...
...
@@ -482,6 +482,13 @@ _return:
QW_RET
(
code
);
}
int32_t
qwAbortPrerocessQuery
(
QW_FPARAMS_DEF
)
{
QW_ERR_RET
(
qwDropTask
(
QW_FPARAMS
()));
QW_RET
(
TSDB_CODE_SUCCESS
);
}
int32_t
qwPrerocessQuery
(
QW_FPARAMS_DEF
,
SQWMsg
*
qwMsg
)
{
int32_t
code
=
0
;
bool
queryRsped
=
false
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录