Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
6d0b51bf
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看板
提交
6d0b51bf
编写于
5月 16, 2022
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor: adjust SRpcMsg handle to info
上级
b765f21e
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
61 addition
and
107 deletion
+61
-107
include/libs/transport/trpc.h
include/libs/transport/trpc.h
+11
-16
source/common/src/tmsgcb.c
source/common/src/tmsgcb.c
+2
-2
source/dnode/mgmt/mgmt_dnode/src/dmHandle.c
source/dnode/mgmt/mgmt_dnode/src/dmHandle.c
+1
-1
source/dnode/mgmt/mgmt_dnode/src/dmWorker.c
source/dnode/mgmt/mgmt_dnode/src/dmWorker.c
+1
-3
source/dnode/mgmt/node_mgmt/src/dmTransport.c
source/dnode/mgmt/node_mgmt/src/dmTransport.c
+12
-10
source/dnode/mnode/impl/src/mndQuery.c
source/dnode/mnode/impl/src/mndQuery.c
+8
-8
source/dnode/vnode/src/vnd/vnodeSync.c
source/dnode/vnode/src/vnd/vnodeSync.c
+1
-3
source/libs/qworker/src/qworker.c
source/libs/qworker/src/qworker.c
+5
-15
source/libs/qworker/src/qworkerMsg.c
source/libs/qworker/src/qworkerMsg.c
+20
-49
未找到文件。
include/libs/transport/trpc.h
浏览文件 @
6d0b51bf
...
...
@@ -38,24 +38,19 @@ typedef struct {
typedef
struct
{
// rpc info
struct
{
void
*
handle
;
// rpc handle returned to app
int64_t
refId
;
// refid, used by server
int32_t
noResp
;
// has response or not(default 0, 0: resp, 1: no resp);
int32_t
persistHandle
;
// persist handle or not
};
void
*
handle
;
// rpc handle returned to app
int64_t
refId
;
// refid, used by server
int32_t
noResp
;
// has response or not(default 0, 0: resp, 1: no resp);
int32_t
persistHandle
;
// persist handle or not
// app info
struct
{
void
*
ahandle
;
// app handle set by client
void
*
proc
;
// proc handle
void
*
wrapper
;
// wrapper handle
void
*
node
;
// node mgmt handle
};
void
*
ahandle
;
// app handle set by client
void
*
wrapper
;
// wrapper handle
void
*
node
;
// node mgmt handle
// resp info
struct
{
void
*
rsp
;
int32_t
rspLen
;
};
void
*
rsp
;
int32_t
rspLen
;
}
SRpcHandleInfo
;
typedef
struct
SRpcMsg
{
...
...
source/common/src/tmsgcb.c
浏览文件 @
6d0b51bf
...
...
@@ -39,10 +39,10 @@ int32_t tmsgSendReq(const SMsgCb* pMsgCb, const SEpSet* epSet, SRpcMsg* pReq) {
return
(
*
fp
)(
pMsgCb
->
pWrapper
,
epSet
,
pReq
);
}
void
tmsgSendRsp
(
SRpcMsg
*
p
Rsp
)
{
void
tmsgSendRsp
(
SRpcMsg
*
p
Msg
)
{
// cannot be empty, but not checked for faster detect
SendRspFp
fp
=
tsDefaultMsgCb
.
sendRspFp
;
return
(
*
fp
)(
p
Rsp
);
return
(
*
fp
)(
p
Msg
);
}
void
tmsgSendRedirectRsp
(
SRpcMsg
*
pRsp
,
const
SEpSet
*
pNewEpSet
)
{
...
...
source/dnode/mgmt/mgmt_dnode/src/dmHandle.c
浏览文件 @
6d0b51bf
...
...
@@ -143,7 +143,7 @@ int32_t dmProcessServerRunStatus(SDnodeMgmt *pMgmt, SRpcMsg *pMsg) {
SServerStatusRsp
statusRsp
=
{
0
};
dmGetServerRunStatus
(
pMgmt
,
&
statusRsp
);
SRpcMsg
rspMsg
=
{.
info
.
handle
=
pMsg
->
info
.
handle
,
.
info
.
ahandle
=
pMsg
->
info
.
ahandle
,
.
info
.
refId
=
pMsg
->
info
.
refId
};
SRpcMsg
rspMsg
=
{.
info
=
pMsg
->
info
};
int32_t
rspLen
=
tSerializeSServerStatusRsp
(
NULL
,
0
,
&
statusRsp
);
if
(
rspLen
<
0
)
{
rspMsg
.
code
=
TSDB_CODE_OUT_OF_MEMORY
;
...
...
source/dnode/mgmt/mgmt_dnode/src/dmWorker.c
浏览文件 @
6d0b51bf
...
...
@@ -150,10 +150,8 @@ static void dmProcessMgmtQueue(SQueueInfo *pInfo, SRpcMsg *pMsg) {
if
(
isRequest
)
{
if
(
code
!=
0
&&
terrno
!=
0
)
code
=
terrno
;
SRpcMsg
rsp
=
{
.
info
.
handle
=
pMsg
->
info
.
handle
,
.
info
.
ahandle
=
pMsg
->
info
.
ahandle
,
.
code
=
code
,
.
info
.
refId
=
pMsg
->
info
.
refId
,
.
info
=
pMsg
->
info
,
.
pCont
=
pMsg
->
info
.
rsp
,
.
contLen
=
pMsg
->
info
.
rspLen
,
};
...
...
source/dnode/mgmt/node_mgmt/src/dmTransport.c
浏览文件 @
6d0b51bf
...
...
@@ -57,6 +57,12 @@ static void dmProcessRpcMsg(SDnode *pDnode, SRpcMsg *pRpc, SEpSet *pEpSet) {
dTrace
(
"msg:%s is received, handle:%p cont:%p len:%d code:0x%04x app:%p refId:%"
PRId64
,
TMSG_INFO
(
pRpc
->
msgType
),
pRpc
->
info
.
handle
,
pRpc
->
pCont
,
pRpc
->
contLen
,
pRpc
->
code
,
pRpc
->
info
.
ahandle
,
pRpc
->
info
.
refId
);
pRpc
->
info
.
noResp
=
0
;
pRpc
->
info
.
persistHandle
=
0
;
pRpc
->
info
.
wrapper
=
NULL
;
pRpc
->
info
.
node
=
NULL
;
pRpc
->
info
.
rsp
=
NULL
;
pRpc
->
info
.
rspLen
=
0
;
if
(
pRpc
->
msgType
==
TDMT_DND_NET_TEST
)
{
dmProcessNetTestReq
(
pDnode
,
pRpc
);
...
...
@@ -72,12 +78,7 @@ static void dmProcessRpcMsg(SDnode *pDnode, SRpcMsg *pRpc, SEpSet *pEpSet) {
if
(
pRpc
->
msgType
==
TDMT_DND_SERVER_STATUS
)
{
dmProcessServerStartupStatus
(
pDnode
,
pRpc
);
}
else
{
SRpcMsg
rspMsg
=
{
.
info
.
handle
=
pRpc
->
info
.
handle
,
.
code
=
TSDB_CODE_APP_NOT_READY
,
.
info
.
ahandle
=
pRpc
->
info
.
ahandle
,
.
info
.
refId
=
pRpc
->
info
.
refId
,
};
SRpcMsg
rspMsg
=
{.
info
=
pRpc
->
info
,
.
code
=
TSDB_CODE_APP_NOT_READY
};
rpcSendResponse
(
&
rspMsg
);
}
return
;
...
...
@@ -116,6 +117,7 @@ static void dmProcessRpcMsg(SDnode *pDnode, SRpcMsg *pRpc, SEpSet *pEpSet) {
goto
_OVER
;
}
else
{
needRelease
=
true
;
pRpc
->
info
.
wrapper
=
pWrapper
;
}
pMsg
=
taosAllocateQitem
(
sizeof
(
SRpcMsg
),
RPC_QITEM
);
...
...
@@ -251,12 +253,12 @@ static inline int32_t dmSendReq(SMgmtWrapper *pWrapper, const SEpSet *pEpSet, SR
return
0
;
}
static
inline
void
dmSendRsp
(
const
SRpcMsg
*
p
Rsp
)
{
SMgmtWrapper
*
pWrapper
=
p
Rsp
->
info
.
wrapper
;
static
inline
void
dmSendRsp
(
const
SRpcMsg
*
p
Msg
)
{
SMgmtWrapper
*
pWrapper
=
p
Msg
->
info
.
wrapper
;
if
(
InChildProc
(
pWrapper
->
proc
.
ptype
))
{
dmPutToProcPQueue
(
&
pWrapper
->
proc
,
p
Rsp
,
sizeof
(
SRpcMsg
),
pRsp
->
pCont
,
pRsp
->
contLen
,
DND_FUNC_RSP
);
dmPutToProcPQueue
(
&
pWrapper
->
proc
,
p
Msg
,
sizeof
(
SRpcMsg
),
pMsg
->
pCont
,
pMsg
->
contLen
,
DND_FUNC_RSP
);
}
else
{
dmSendRpcRsp
(
pWrapper
->
pDnode
,
p
Rsp
);
dmSendRpcRsp
(
pWrapper
->
pDnode
,
p
Msg
);
}
}
...
...
source/dnode/mnode/impl/src/mndQuery.c
浏览文件 @
6d0b51bf
...
...
@@ -34,19 +34,19 @@ int32_t mndProcessQueryMsg(SRpcMsg *pReq) {
}
}
int32_t
mndProcessFetchMsg
(
SRpcMsg
*
p
Req
)
{
SMnode
*
pMnode
=
p
Req
->
info
.
node
;
mTrace
(
"msg:%p, in fetch queue is processing"
,
p
Req
);
int32_t
mndProcessFetchMsg
(
SRpcMsg
*
p
Msg
)
{
SMnode
*
pMnode
=
p
Msg
->
info
.
node
;
mTrace
(
"msg:%p, in fetch queue is processing"
,
p
Msg
);
switch
(
p
Req
->
msgType
)
{
switch
(
p
Msg
->
msgType
)
{
case
TDMT_VND_FETCH
:
return
qWorkerProcessFetchMsg
(
pMnode
,
pMnode
->
pQuery
,
p
Req
);
return
qWorkerProcessFetchMsg
(
pMnode
,
pMnode
->
pQuery
,
p
Msg
);
case
TDMT_VND_DROP_TASK
:
return
qWorkerProcessDropMsg
(
pMnode
,
pMnode
->
pQuery
,
p
Req
);
return
qWorkerProcessDropMsg
(
pMnode
,
pMnode
->
pQuery
,
p
Msg
);
case
TDMT_VND_QUERY_HEARTBEAT
:
return
qWorkerProcessHbMsg
(
pMnode
,
pMnode
->
pQuery
,
p
Req
);
return
qWorkerProcessHbMsg
(
pMnode
,
pMnode
->
pQuery
,
p
Msg
);
default:
mError
(
"unknown msg type:%d in fetch queue"
,
p
Req
->
msgType
);
mError
(
"unknown msg type:%d in fetch queue"
,
p
Msg
->
msgType
);
return
TSDB_CODE_VND_APP_ERROR
;
}
}
...
...
source/dnode/vnode/src/vnd/vnodeSync.c
浏览文件 @
6d0b51bf
...
...
@@ -127,9 +127,7 @@ void vnodeSyncCommitCb(struct SSyncFSM *pFsm, const SRpcMsg *pMsg, SFsmCbMeta cb
SRpcMsg
saveRpcMsg
;
int32_t
ret
=
syncGetAndDelRespRpc
(
pVnode
->
sync
,
cbMeta
.
seqNum
,
&
saveRpcMsg
);
if
(
ret
==
1
&&
cbMeta
.
state
==
TAOS_SYNC_STATE_LEADER
)
{
applyMsg
.
info
.
handle
=
saveRpcMsg
.
info
.
handle
;
applyMsg
.
info
.
ahandle
=
saveRpcMsg
.
info
.
ahandle
;
applyMsg
.
info
.
refId
=
saveRpcMsg
.
info
.
refId
;
applyMsg
.
info
=
saveRpcMsg
.
info
;
}
else
{
applyMsg
.
info
.
handle
=
NULL
;
applyMsg
.
info
.
ahandle
=
NULL
;
...
...
source/libs/qworker/src/qworker.c
浏览文件 @
6d0b51bf
...
...
@@ -535,12 +535,7 @@ int32_t qwHandleTaskComplete(QW_FPARAMS_DEF, SQWTaskCtx *ctx) {
SExplainExecInfo
*
execInfo
=
NULL
;
int32_t
resNum
=
0
;
QW_ERR_RET
(
qGetExplainExecInfo
(
ctx
->
taskHandle
,
&
resNum
,
&
execInfo
));
SRpcHandleInfo
connInfo
=
{
0
};
connInfo
.
handle
=
ctx
->
ctrlConnInfo
.
handle
;
connInfo
.
refId
=
ctx
->
ctrlConnInfo
.
refId
;
QW_ERR_RET
(
qwBuildAndSendExplainRsp
(
&
connInfo
,
execInfo
,
resNum
));
QW_ERR_RET
(
qwBuildAndSendExplainRsp
(
&
ctx
->
ctrlConnInfo
,
execInfo
,
resNum
));
}
qwFreeTaskHandle
(
QW_FPARAMS
(),
taskHandle
);
...
...
@@ -865,8 +860,7 @@ int32_t qwHandlePostPhaseEvents(QW_FPARAMS_DEF, int8_t phase, SQWPhaseInput *inp
QW_SET_EVENT_PROCESSED(ctx, QW_EVENT_READY);
}
#else
connInfo
.
handle
=
ctx
->
ctrlConnInfo
.
handle
;
connInfo
.
refId
=
ctx
->
ctrlConnInfo
.
refId
;
connInfo
=
ctx
->
ctrlConnInfo
;
readyConnection
=
&
connInfo
;
QW_SET_EVENT_PROCESSED
(
ctx
,
QW_EVENT_READY
);
...
...
@@ -943,9 +937,7 @@ 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
);
atomic_store_ptr
(
&
ctx
->
ctrlConnInfo
.
handle
,
qwMsg
->
connInfo
.
handle
);
atomic_store_ptr
(
&
ctx
->
ctrlConnInfo
.
ahandle
,
qwMsg
->
connInfo
.
ahandle
);
atomic_store_64
(
&
ctx
->
ctrlConnInfo
.
refId
,
qwMsg
->
connInfo
.
refId
);
ctx
->
ctrlConnInfo
=
qwMsg
->
connInfo
;
QW_TASK_DLOGL
(
"subplan json string, len:%d, %s"
,
qwMsg
->
msgLen
,
qwMsg
->
msg
);
...
...
@@ -1010,8 +1002,7 @@ int32_t qwProcessReady(QW_FPARAMS_DEF, SQWMsg *qwMsg) {
}
if
(
ctx
->
phase
==
QW_PHASE_PRE_QUERY
)
{
ctx
->
ctrlConnInfo
.
handle
=
qwMsg
->
connInfo
.
handle
;
ctx
->
ctrlConnInfo
.
ahandle
=
qwMsg
->
connInfo
.
ahandle
;
ctx
->
ctrlConnInfo
=
qwMsg
->
connInfo
;
QW_SET_EVENT_RECEIVED
(
ctx
,
QW_EVENT_READY
);
needRsp
=
false
;
QW_TASK_DLOG_E
(
"ready msg will not rsp now"
);
...
...
@@ -1244,8 +1235,7 @@ int32_t qwProcessDrop(QW_FPARAMS_DEF, SQWMsg *qwMsg) {
}
if
(
!
rsped
)
{
ctx
->
ctrlConnInfo
.
handle
=
qwMsg
->
connInfo
.
handle
;
ctx
->
ctrlConnInfo
.
ahandle
=
qwMsg
->
connInfo
.
ahandle
;
ctx
->
ctrlConnInfo
=
qwMsg
->
connInfo
;
QW_SET_EVENT_RECEIVED
(
ctx
,
QW_EVENT_DROP
);
}
...
...
source/libs/qworker/src/qworkerMsg.c
浏览文件 @
6d0b51bf
...
...
@@ -52,10 +52,10 @@ int32_t qwBuildAndSendQueryRsp(SRpcHandleInfo *pConn, int32_t code) {
SRpcMsg
rpcRsp
=
{
.
msgType
=
TDMT_VND_QUERY_RSP
,
.
info
=
pConn
,
.
pCont
=
msg
,
.
contLen
=
contLen
,
.
code
=
code
,
.
info
=
*
pConn
,
};
tmsgSendRsp
(
&
rpcRsp
);
...
...
@@ -69,12 +69,12 @@ int32_t qwBuildAndSendReadyRsp(SRpcHandleInfo *pConn, int32_t code) {
SRpcMsg
rpcRsp
=
{
.
msgType
=
TDMT_VND_RES_READY_RSP
,
.
info
=
pConn
,
.
info
.
ahandle
=
NULL
,
.
pCont
=
pRsp
,
.
contLen
=
sizeof
(
*
pRsp
),
.
code
=
code
,
.
info
=
*
pConn
,
};
rpcRsp
.
info
.
ahandle
=
NULL
,
tmsgSendRsp
(
&
rpcRsp
);
...
...
@@ -90,10 +90,10 @@ int32_t qwBuildAndSendExplainRsp(SRpcHandleInfo *pConn, SExplainExecInfo *execIn
SRpcMsg
rpcRsp
=
{
.
msgType
=
TDMT_VND_EXPLAIN_RSP
,
.
info
=
pConn
,
.
pCont
=
pRsp
,
.
contLen
=
contLen
,
.
code
=
0
,
.
info
=
*
pConn
,
};
tmsgSendRsp
(
&
rpcRsp
);
...
...
@@ -108,10 +108,10 @@ int32_t qwBuildAndSendHbRsp(SRpcHandleInfo *pConn, SSchedulerHbRsp *pStatus, int
SRpcMsg
rpcRsp
=
{
.
msgType
=
TDMT_VND_QUERY_HEARTBEAT_RSP
,
.
info
=
pConn
,
.
pCont
=
pRsp
,
.
contLen
=
contLen
,
.
pCont
=
pRsp
,
.
code
=
code
,
.
info
=
*
pConn
,
};
tmsgSendRsp
(
&
rpcRsp
);
...
...
@@ -128,10 +128,10 @@ int32_t qwBuildAndSendFetchRsp(SRpcHandleInfo *pConn, SRetrieveTableRsp *pRsp, i
SRpcMsg
rpcRsp
=
{
.
msgType
=
TDMT_VND_FETCH_RSP
,
.
info
=
pConn
,
.
pCont
=
pRsp
,
.
contLen
=
sizeof
(
*
pRsp
)
+
dataLength
,
.
code
=
code
,
.
info
=
*
pConn
,
};
tmsgSendRsp
(
&
rpcRsp
);
...
...
@@ -145,10 +145,10 @@ int32_t qwBuildAndSendCancelRsp(SRpcHandleInfo *pConn, int32_t code) {
SRpcMsg
rpcRsp
=
{
.
msgType
=
TDMT_VND_CANCEL_TASK_RSP
,
.
info
=
pConn
,
.
pCont
=
pRsp
,
.
contLen
=
sizeof
(
*
pRsp
),
.
code
=
code
,
.
info
=
*
pConn
,
};
tmsgSendRsp
(
&
rpcRsp
);
...
...
@@ -161,10 +161,10 @@ int32_t qwBuildAndSendDropRsp(SRpcHandleInfo *pConn, int32_t code) {
SRpcMsg
rpcRsp
=
{
.
msgType
=
TDMT_VND_DROP_TASK_RSP
,
.
info
=
pConn
,
.
pCont
=
pRsp
,
.
contLen
=
sizeof
(
*
pRsp
),
.
code
=
code
,
.
info
=
*
pConn
,
};
tmsgSendRsp
(
&
rpcRsp
);
...
...
@@ -254,13 +254,11 @@ int32_t qwBuildAndSendCQueryMsg(QW_FPARAMS_DEF, SRpcHandleInfo *pConn) {
req
->
taskId
=
tId
;
SRpcMsg
pNewMsg
=
{
.
info
.
handle
=
pConn
->
handle
,
.
info
.
ahandle
=
pConn
->
ahandle
,
.
msgType
=
TDMT_VND_QUERY_CONTINUE
,
.
info
.
refId
=
pConn
->
refId
,
.
pCont
=
req
,
.
contLen
=
sizeof
(
SQueryContinueReq
),
.
code
=
0
,
.
info
=
*
pConn
,
};
int32_t
code
=
tmsgPutToQueue
(
&
mgmt
->
msgCb
,
QUERY_QUEUE
,
&
pNewMsg
);
...
...
@@ -289,13 +287,11 @@ int32_t qwRegisterQueryBrokenLinkArg(QW_FPARAMS_DEF, SRpcHandleInfo *pConn) {
req
->
refId
=
htobe64
(
rId
);
SRpcMsg
pMsg
=
{
.
info
.
handle
=
pConn
->
handle
,
.
info
.
ahandle
=
pConn
->
ahandle
,
.
info
.
refId
=
pConn
->
refId
,
.
msgType
=
TDMT_VND_DROP_TASK
,
.
pCont
=
req
,
.
contLen
=
sizeof
(
STaskDropReq
),
.
code
=
TSDB_CODE_RPC_NETWORK_UNAVAIL
,
.
info
=
*
pConn
,
};
tmsgRegisterBrokenLinkArg
(
&
mgmt
->
msgCb
,
&
pMsg
);
...
...
@@ -325,13 +321,11 @@ int32_t qwRegisterHbBrokenLinkArg(SQWorker *mgmt, uint64_t sId, SRpcHandleInfo *
}
SRpcMsg
pMsg
=
{
.
info
.
handle
=
pConn
->
handle
,
.
info
.
ahandle
=
pConn
->
ahandle
,
.
info
.
refId
=
pConn
->
refId
,
.
msgType
=
TDMT_VND_QUERY_HEARTBEAT
,
.
pCont
=
msg
,
.
contLen
=
msgSize
,
.
code
=
TSDB_CODE_RPC_NETWORK_UNAVAIL
,
.
info
=
*
pConn
,
};
tmsgRegisterBrokenLinkArg
(
&
mgmt
->
msgCb
,
&
pMsg
);
...
...
@@ -365,12 +359,8 @@ int32_t qWorkerProcessQueryMsg(void *node, void *qWorkerMgmt, SRpcMsg *pMsg) {
uint64_t
tId
=
msg
->
taskId
;
int64_t
rId
=
msg
->
refId
;
SQWMsg
qwMsg
=
{.
node
=
node
,
.
msg
=
msg
->
msg
+
msg
->
sqlLen
,
.
msgLen
=
msg
->
phyLen
};
qwMsg
.
connInfo
.
handle
=
pMsg
->
info
.
handle
;
qwMsg
.
connInfo
.
ahandle
=
pMsg
->
info
.
ahandle
;
qwMsg
.
connInfo
.
refId
=
pMsg
->
info
.
refId
;
char
*
sql
=
strndup
(
msg
->
msg
,
msg
->
sqlLen
);
SQWMsg
qwMsg
=
{.
node
=
node
,
.
msg
=
msg
->
msg
+
msg
->
sqlLen
,
.
msgLen
=
msg
->
phyLen
,
.
connInfo
=
pMsg
->
info
};
char
*
sql
=
strndup
(
msg
->
msg
,
msg
->
sqlLen
);
QW_SCH_TASK_DLOG
(
"processQuery start, node:%p, handle:%p, sql:%s"
,
node
,
pMsg
->
info
.
handle
,
sql
);
taosMemoryFreeClear
(
sql
);
...
...
@@ -400,10 +390,7 @@ int32_t qWorkerProcessCQueryMsg(void *node, void *qWorkerMgmt, SRpcMsg *pMsg) {
uint64_t
tId
=
msg
->
taskId
;
int64_t
rId
=
0
;
SQWMsg
qwMsg
=
{.
node
=
node
,
.
msg
=
NULL
,
.
msgLen
=
0
};
qwMsg
.
connInfo
.
handle
=
pMsg
->
info
.
handle
;
qwMsg
.
connInfo
.
ahandle
=
pMsg
->
info
.
ahandle
;
qwMsg
.
connInfo
.
refId
=
pMsg
->
info
.
refId
;
SQWMsg
qwMsg
=
{.
node
=
node
,
.
msg
=
NULL
,
.
msgLen
=
0
,
.
connInfo
=
pMsg
->
info
};
QW_SCH_TASK_DLOG
(
"processCQuery start, node:%p, handle:%p"
,
node
,
pMsg
->
info
.
handle
);
...
...
@@ -435,10 +422,7 @@ int32_t qWorkerProcessReadyMsg(void *node, void *qWorkerMgmt, SRpcMsg *pMsg) {
uint64_t
tId
=
msg
->
taskId
;
int64_t
rId
=
0
;
SQWMsg
qwMsg
=
{.
node
=
node
,
.
msg
=
NULL
,
.
msgLen
=
0
};
qwMsg
.
connInfo
.
handle
=
pMsg
->
info
.
handle
;
qwMsg
.
connInfo
.
ahandle
=
pMsg
->
info
.
ahandle
;
qwMsg
.
connInfo
.
refId
=
pMsg
->
info
.
refId
;
SQWMsg
qwMsg
=
{.
node
=
node
,
.
msg
=
NULL
,
.
msgLen
=
0
,
.
connInfo
=
pMsg
->
info
};
QW_SCH_TASK_DLOG
(
"processReady start, node:%p, handle:%p"
,
node
,
pMsg
->
info
.
handle
);
...
...
@@ -498,10 +482,7 @@ int32_t qWorkerProcessFetchMsg(void *node, void *qWorkerMgmt, SRpcMsg *pMsg) {
uint64_t
tId
=
msg
->
taskId
;
int64_t
rId
=
0
;
SQWMsg
qwMsg
=
{.
node
=
node
,
.
msg
=
NULL
,
.
msgLen
=
0
};
qwMsg
.
connInfo
.
handle
=
pMsg
->
info
.
handle
;
qwMsg
.
connInfo
.
ahandle
=
pMsg
->
info
.
ahandle
;
qwMsg
.
connInfo
.
refId
=
pMsg
->
info
.
refId
;
SQWMsg
qwMsg
=
{.
node
=
node
,
.
msg
=
NULL
,
.
msgLen
=
0
,
.
connInfo
=
pMsg
->
info
};
QW_SCH_TASK_DLOG
(
"processFetch start, node:%p, handle:%p"
,
node
,
pMsg
->
info
.
handle
);
...
...
@@ -540,10 +521,7 @@ int32_t qWorkerProcessCancelMsg(void *node, void *qWorkerMgmt, SRpcMsg *pMsg) {
uint64_t
tId
=
msg
->
taskId
;
int64_t
rId
=
msg
->
refId
;
SQWMsg
qwMsg
=
{.
node
=
node
,
.
msg
=
NULL
,
.
msgLen
=
0
};
qwMsg
.
connInfo
.
handle
=
pMsg
->
info
.
handle
;
qwMsg
.
connInfo
.
ahandle
=
pMsg
->
info
.
ahandle
;
qwMsg
.
connInfo
.
refId
=
pMsg
->
info
.
refId
;
SQWMsg
qwMsg
=
{.
node
=
node
,
.
msg
=
NULL
,
.
msgLen
=
0
,
.
connInfo
=
pMsg
->
info
};
// QW_ERR_JRET(qwCancelTask(qWorkerMgmt, msg->sId, msg->queryId, msg->taskId));
...
...
@@ -579,10 +557,7 @@ int32_t qWorkerProcessDropMsg(void *node, void *qWorkerMgmt, SRpcMsg *pMsg) {
uint64_t
tId
=
msg
->
taskId
;
int64_t
rId
=
msg
->
refId
;
SQWMsg
qwMsg
=
{.
node
=
node
,
.
msg
=
NULL
,
.
msgLen
=
0
,
.
code
=
pMsg
->
code
};
qwMsg
.
connInfo
.
handle
=
pMsg
->
info
.
handle
;
qwMsg
.
connInfo
.
ahandle
=
pMsg
->
info
.
ahandle
;
qwMsg
.
connInfo
.
refId
=
pMsg
->
info
.
refId
;
SQWMsg
qwMsg
=
{.
node
=
node
,
.
msg
=
NULL
,
.
msgLen
=
0
,
.
code
=
pMsg
->
code
,
.
connInfo
=
pMsg
->
info
};
if
(
TSDB_CODE_RPC_NETWORK_UNAVAIL
==
pMsg
->
code
)
{
QW_SCH_TASK_DLOG
(
"receive drop task due to network broken, error:%s"
,
tstrerror
(
pMsg
->
code
));
...
...
@@ -618,11 +593,7 @@ int32_t qWorkerProcessHbMsg(void *node, void *qWorkerMgmt, SRpcMsg *pMsg) {
}
uint64_t
sId
=
req
.
sId
;
SQWMsg
qwMsg
=
{.
node
=
node
,
.
msg
=
NULL
,
.
msgLen
=
0
,
.
code
=
pMsg
->
code
};
qwMsg
.
connInfo
.
handle
=
pMsg
->
info
.
handle
;
qwMsg
.
connInfo
.
ahandle
=
pMsg
->
info
.
ahandle
;
qwMsg
.
connInfo
.
refId
=
pMsg
->
info
.
refId
;
SQWMsg
qwMsg
=
{.
node
=
node
,
.
msg
=
NULL
,
.
msgLen
=
0
,
.
code
=
pMsg
->
code
,
.
connInfo
=
pMsg
->
info
};
if
(
TSDB_CODE_RPC_NETWORK_UNAVAIL
==
pMsg
->
code
)
{
QW_SCH_DLOG
(
"receive Hb msg due to network broken, error:%s"
,
tstrerror
(
pMsg
->
code
));
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录