Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
fc04aa84
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看板
提交
fc04aa84
编写于
6月 04, 2022
作者:
D
dapan1121
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix qnode mnode query issue
上级
1b0e1146
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
46 addition
and
15 deletion
+46
-15
source/dnode/mgmt/mgmt_mnode/inc/mmInt.h
source/dnode/mgmt/mgmt_mnode/inc/mmInt.h
+1
-0
source/dnode/mgmt/mgmt_mnode/src/mmWorker.c
source/dnode/mgmt/mgmt_mnode/src/mmWorker.c
+2
-0
source/dnode/mgmt/mgmt_qnode/inc/qmInt.h
source/dnode/mgmt/mgmt_qnode/inc/qmInt.h
+2
-0
source/dnode/mgmt/mgmt_qnode/src/qmWorker.c
source/dnode/mgmt/mgmt_qnode/src/qmWorker.c
+2
-0
source/dnode/mnode/impl/src/mndQuery.c
source/dnode/mnode/impl/src/mndQuery.c
+8
-0
source/dnode/qnode/src/qnode.c
source/dnode/qnode/src/qnode.c
+8
-0
source/libs/qworker/src/qwDbg.c
source/libs/qworker/src/qwDbg.c
+2
-1
source/libs/qworker/src/qwMsg.c
source/libs/qworker/src/qwMsg.c
+6
-6
source/libs/qworker/src/qworker.c
source/libs/qworker/src/qworker.c
+2
-2
source/libs/scheduler/src/schRemote.c
source/libs/scheduler/src/schRemote.c
+13
-6
未找到文件。
source/dnode/mgmt/mgmt_mnode/inc/mmInt.h
浏览文件 @
fc04aa84
...
...
@@ -56,6 +56,7 @@ int32_t mmProcessDropReq(const SMgmtInputOpt *pInput, SRpcMsg *pMsg);
int32_t
mmProcessAlterReq
(
SMnodeMgmt
*
pMgmt
,
SRpcMsg
*
pMsg
);
int32_t
mmProcessGetMonitorInfoReq
(
SMnodeMgmt
*
pMgmt
,
SRpcMsg
*
pMsg
);
int32_t
mmProcessGetLoadsReq
(
SMnodeMgmt
*
pMgmt
,
SRpcMsg
*
pMsg
);
int32_t
mndPreprocessQueryMsg
(
SMnode
*
pMnode
,
SRpcMsg
*
pMsg
);
// mmWorker.c
int32_t
mmStartWorker
(
SMnodeMgmt
*
pMgmt
);
...
...
source/dnode/mgmt/mgmt_mnode/src/mmWorker.c
浏览文件 @
fc04aa84
...
...
@@ -89,6 +89,8 @@ int32_t mmPutNodeMsgToReadQueue(SMnodeMgmt *pMgmt, SRpcMsg *pMsg) {
}
int32_t
mmPutNodeMsgToQueryQueue
(
SMnodeMgmt
*
pMgmt
,
SRpcMsg
*
pMsg
)
{
mndPreprocessQueryMsg
(
pMgmt
->
pMnode
,
pMsg
);
return
mmPutNodeMsgToWorker
(
&
pMgmt
->
queryWorker
,
pMsg
);
}
...
...
source/dnode/mgmt/mgmt_qnode/inc/qmInt.h
浏览文件 @
fc04aa84
...
...
@@ -51,6 +51,8 @@ int32_t qmPutNodeMsgToQueryQueue(SQnodeMgmt *pMgmt, SRpcMsg *pMsg);
int32_t
qmPutNodeMsgToFetchQueue
(
SQnodeMgmt
*
pMgmt
,
SRpcMsg
*
pMsg
);
int32_t
qmPutNodeMsgToMonitorQueue
(
SQnodeMgmt
*
pMgmt
,
SRpcMsg
*
pMsg
);
int32_t
qndPreprocessQueryMsg
(
SQnode
*
pQnode
,
SRpcMsg
*
pMsg
);
#ifdef __cplusplus
}
#endif
...
...
source/dnode/mgmt/mgmt_qnode/src/qmWorker.c
浏览文件 @
fc04aa84
...
...
@@ -57,6 +57,8 @@ static int32_t qmPutNodeMsgToWorker(SSingleWorker *pWorker, SRpcMsg *pMsg) {
}
int32_t
qmPutNodeMsgToQueryQueue
(
SQnodeMgmt
*
pMgmt
,
SRpcMsg
*
pMsg
)
{
qndPreprocessQueryMsg
(
pMgmt
->
pQnode
,
pMsg
);
return
qmPutNodeMsgToWorker
(
&
pMgmt
->
queryWorker
,
pMsg
);
}
...
...
source/dnode/mnode/impl/src/mndQuery.c
浏览文件 @
fc04aa84
...
...
@@ -18,6 +18,14 @@
#include "mndMnode.h"
#include "qworker.h"
int32_t
mndPreprocessQueryMsg
(
SMnode
*
pMnode
,
SRpcMsg
*
pMsg
)
{
if
(
TDMT_VND_QUERY
!=
pMsg
->
msgType
)
{
return
0
;
}
return
qWorkerPreprocessQueryMsg
(
pMnode
->
pQuery
,
pMsg
);
}
int32_t
mndProcessQueryMsg
(
SRpcMsg
*
pMsg
)
{
int32_t
code
=
-
1
;
SMnode
*
pMnode
=
pMsg
->
info
.
node
;
...
...
source/dnode/qnode/src/qnode.c
浏览文件 @
fc04aa84
...
...
@@ -63,6 +63,14 @@ int32_t qndGetLoad(SQnode *pQnode, SQnodeLoad *pLoad) {
return
0
;
}
int32_t
qndPreprocessQueryMsg
(
SQnode
*
pQnode
,
SRpcMsg
*
pMsg
)
{
if
(
TDMT_VND_QUERY
!=
pMsg
->
msgType
)
{
return
0
;
}
return
qWorkerPreprocessQueryMsg
(
pQnode
->
pQuery
,
pMsg
);
}
int32_t
qndProcessQueryMsg
(
SQnode
*
pQnode
,
int64_t
ts
,
SRpcMsg
*
pMsg
)
{
int32_t
code
=
-
1
;
SReadHandle
handle
=
{.
pMsgCb
=
&
pQnode
->
msgCb
};
...
...
source/libs/qworker/src/qwDbg.c
浏览文件 @
fc04aa84
...
...
@@ -36,7 +36,8 @@ int32_t qwDbgValidateStatus(QW_FPARAMS_DEF, int8_t oriStatus, int8_t newStatus,
break
;
case
JOB_TASK_STATUS_NOT_START
:
if
(
newStatus
!=
JOB_TASK_STATUS_CANCELLED
)
{
if
(
newStatus
!=
JOB_TASK_STATUS_DROPPING
&&
newStatus
!=
JOB_TASK_STATUS_EXECUTING
&&
newStatus
!=
JOB_TASK_STATUS_FAILED
)
{
QW_ERR_JRET
(
TSDB_CODE_QRY_APP_ERROR
);
}
...
...
source/libs/qworker/src/qwMsg.c
浏览文件 @
fc04aa84
...
...
@@ -300,12 +300,12 @@ int32_t qWorkerProcessQueryMsg(void *node, void *qWorkerMgmt, SRpcMsg *pMsg, int
QW_ERR_RET
(
TSDB_CODE_QRY_INVALID_INPUT
);
}
msg
->
sId
=
be64toh
(
msg
->
sId
)
;
msg
->
queryId
=
be64toh
(
msg
->
queryId
)
;
msg
->
taskId
=
be64toh
(
msg
->
taskId
)
;
msg
->
refId
=
be64toh
(
msg
->
refId
)
;
msg
->
phyLen
=
ntohl
(
msg
->
phyLen
)
;
msg
->
sqlLen
=
ntohl
(
msg
->
sqlLen
)
;
msg
->
sId
=
msg
->
sId
;
msg
->
queryId
=
msg
->
queryId
;
msg
->
taskId
=
msg
->
taskId
;
msg
->
refId
=
msg
->
refId
;
msg
->
phyLen
=
msg
->
phyLen
;
msg
->
sqlLen
=
msg
->
sqlLen
;
uint64_t
sId
=
msg
->
sId
;
uint64_t
qId
=
msg
->
queryId
;
...
...
source/libs/qworker/src/qworker.c
浏览文件 @
fc04aa84
...
...
@@ -446,6 +446,8 @@ int32_t qwPrerocessQuery(QW_FPARAMS_DEF, SQWMsg *qwMsg) {
QW_ERR_JRET
(
qwAddAcquireTaskCtx
(
QW_FPARAMS
(),
&
ctx
));
ctx
->
ctrlConnInfo
=
qwMsg
->
connInfo
;
QW_ERR_JRET
(
qwAddTaskStatus
(
QW_FPARAMS
(),
JOB_TASK_STATUS_NOT_START
));
_return:
...
...
@@ -475,8 +477,6 @@ int32_t qwProcessQuery(QW_FPARAMS_DEF, SQWMsg *qwMsg, int8_t taskType, int8_t ex
atomic_store_8
(
&
ctx
->
taskType
,
taskType
);
atomic_store_8
(
&
ctx
->
explain
,
explain
);
ctx
->
ctrlConnInfo
=
qwMsg
->
connInfo
;
/*QW_TASK_DLOGL("subplan json string, len:%d, %s", qwMsg->msgLen, qwMsg->msg);*/
code
=
qStringToSubplan
(
qwMsg
->
msg
,
&
plan
);
...
...
source/libs/scheduler/src/schRemote.c
浏览文件 @
fc04aa84
...
...
@@ -774,13 +774,20 @@ int32_t schEnsureHbConnection(SSchJob *pJob, SSchTask *pTask) {
strcpy
(
epId
.
ep
.
fqdn
,
pEp
->
fqdn
);
epId
.
ep
.
port
=
pEp
->
port
;
SSchHbTrans
*
hb
=
taosHashGet
(
schMgmt
.
hbConnections
,
&
epId
,
sizeof
(
SQueryNodeEpId
));
if
(
NULL
==
hb
)
{
bool
exist
=
false
;
SCH_ERR_RET
(
schRegisterHbConnection
(
pJob
,
pTask
,
&
epId
,
&
exist
));
if
(
!
exist
)
{
SCH_ERR_RET
(
schBuildAndSendHbMsg
(
&
epId
,
NULL
));
SSchHbTrans
*
hb
=
NULL
;
while
(
true
)
{
hb
=
taosHashGet
(
schMgmt
.
hbConnections
,
&
epId
,
sizeof
(
SQueryNodeEpId
));
if
(
NULL
==
hb
)
{
bool
exist
=
false
;
SCH_ERR_RET
(
schRegisterHbConnection
(
pJob
,
pTask
,
&
epId
,
&
exist
));
if
(
!
exist
)
{
SCH_ERR_RET
(
schBuildAndSendHbMsg
(
&
epId
,
NULL
));
}
continue
;
}
break
;
}
atomic_add_fetch_64
(
&
hb
->
taskNum
,
1
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录