Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
53efe751
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看板
提交
53efe751
编写于
6月 29, 2022
作者:
D
dapan1121
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: query redirect
上级
8dfe07e1
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
15 addition
and
12 deletion
+15
-12
include/libs/qcom/query.h
include/libs/qcom/query.h
+4
-3
source/dnode/mgmt/node_mgmt/src/dmTransport.c
source/dnode/mgmt/node_mgmt/src/dmTransport.c
+1
-1
source/libs/function/src/udfd.c
source/libs/function/src/udfd.c
+1
-1
source/libs/qworker/src/qwMsg.c
source/libs/qworker/src/qwMsg.c
+4
-4
source/libs/scheduler/inc/schedulerInt.h
source/libs/scheduler/inc/schedulerInt.h
+2
-0
source/libs/scheduler/src/schRemote.c
source/libs/scheduler/src/schRemote.c
+2
-2
source/libs/transport/src/transCli.c
source/libs/transport/src/transCli.c
+1
-1
未找到文件。
include/libs/qcom/query.h
浏览文件 @
53efe751
...
...
@@ -239,7 +239,7 @@ extern int32_t (*queryProcessMsgRsp[TDMT_MAX])(void* output, char* msg, int32_t
#define NEED_REDIRECT_ERROR(_code) \
((_code) == TSDB_CODE_RPC_REDIRECT || (_code) == TSDB_CODE_RPC_NETWORK_UNAVAIL || \
(_code) == TSDB_CODE_NODE_NOT_DEPLOYED || (_code) == TSDB_CODE_SYN_NOT_LEADER || \
(_code) == TSDB_CODE_APP_NOT_READY)
(_code) == TSDB_CODE_APP_NOT_READY
|| (_code) == TSDB_CODE_RPC_BROKEN_LINK
)
#define NEED_CLIENT_RM_TBLMETA_REQ(_type) \
((_type) == TDMT_VND_CREATE_TABLE || (_type) == TDMT_VND_CREATE_STB || (_type) == TDMT_VND_DROP_TABLE || \
...
...
@@ -249,8 +249,9 @@ extern int32_t (*queryProcessMsgRsp[TDMT_MAX])(void* output, char* msg, int32_t
((_code) == TSDB_CODE_RPC_REDIRECT || (_code) == TSDB_CODE_NODE_NOT_DEPLOYED || \
(_code) == TSDB_CODE_SYN_NOT_LEADER || (_code) == TSDB_CODE_APP_NOT_READY)
#define NEED_SCHEDULER_RETRY_ERROR(_code) \
(NEED_SCHEDULER_REDIRECT_ERROR(_code) || (_code) == TSDB_CODE_RPC_NETWORK_UNAVAIL || (_code) == TSDB_CODE_SCH_TIMEOUT_ERROR)
#define NEED_SCHEDULER_RETRY_ERROR(_code) \
(NEED_SCHEDULER_REDIRECT_ERROR(_code) || (_code) == TSDB_CODE_RPC_NETWORK_UNAVAIL || \
(_code) == TSDB_CODE_SCH_TIMEOUT_ERROR || (_code) == TSDB_CODE_RPC_BROKEN_LINK)
...
...
source/dnode/mgmt/node_mgmt/src/dmTransport.c
浏览文件 @
53efe751
...
...
@@ -250,7 +250,7 @@ static inline void dmReleaseHandle(SRpcHandleInfo *pHandle, int8_t type) {
static
bool
rpcRfp
(
int32_t
code
,
tmsg_t
msgType
)
{
if
(
code
==
TSDB_CODE_RPC_REDIRECT
||
code
==
TSDB_CODE_RPC_NETWORK_UNAVAIL
||
code
==
TSDB_CODE_NODE_NOT_DEPLOYED
||
code
==
TSDB_CODE_SYN_NOT_LEADER
||
code
==
TSDB_CODE_APP_NOT_READY
)
{
code
==
TSDB_CODE_SYN_NOT_LEADER
||
code
==
TSDB_CODE_APP_NOT_READY
||
code
==
TSDB_CODE_RPC_BROKEN_LINK
)
{
if
(
msgType
==
TDMT_SCH_QUERY
||
msgType
==
TDMT_SCH_MERGE_QUERY
||
msgType
==
TDMT_SCH_FETCH
)
{
return
false
;
}
...
...
source/libs/function/src/udfd.c
浏览文件 @
53efe751
...
...
@@ -548,7 +548,7 @@ int32_t udfdLoadUdf(char *udfName, SUdf *udf) {
}
static
bool
udfdRpcRfp
(
int32_t
code
,
tmsg_t
msgType
)
{
if
(
code
==
TSDB_CODE_RPC_REDIRECT
||
code
==
TSDB_CODE_RPC_NETWORK_UNAVAIL
||
code
==
TSDB_CODE_NODE_NOT_DEPLOYED
||
code
==
TSDB_CODE_SYN_NOT_LEADER
||
code
==
TSDB_CODE_APP_NOT_READY
)
{
code
==
TSDB_CODE_SYN_NOT_LEADER
||
code
==
TSDB_CODE_APP_NOT_READY
||
code
==
TSDB_CODE_RPC_BROKEN_LINK
)
{
if
(
msgType
==
TDMT_SCH_QUERY
||
msgType
==
TDMT_SCH_MERGE_QUERY
||
msgType
==
TDMT_SCH_FETCH
)
{
return
false
;
}
...
...
source/libs/qworker/src/qwMsg.c
浏览文件 @
53efe751
...
...
@@ -205,7 +205,7 @@ int32_t qwRegisterQueryBrokenLinkArg(QW_FPARAMS_DEF, SRpcHandleInfo *pConn) {
.
msgType
=
TDMT_SCH_DROP_TASK
,
.
pCont
=
req
,
.
contLen
=
sizeof
(
STaskDropReq
),
.
code
=
TSDB_CODE_RPC_
NETWORK_UNAVAIL
,
.
code
=
TSDB_CODE_RPC_
BROKEN_LINK
,
.
info
=
*
pConn
,
};
...
...
@@ -239,7 +239,7 @@ int32_t qwRegisterHbBrokenLinkArg(SQWorker *mgmt, uint64_t sId, SRpcHandleInfo *
.
msgType
=
TDMT_SCH_QUERY_HEARTBEAT
,
.
pCont
=
msg
,
.
contLen
=
msgSize
,
.
code
=
TSDB_CODE_RPC_
NETWORK_UNAVAIL
,
.
code
=
TSDB_CODE_RPC_
BROKEN_LINK
,
.
info
=
*
pConn
,
};
...
...
@@ -484,7 +484,7 @@ int32_t qWorkerProcessDropMsg(void *node, void *qWorkerMgmt, SRpcMsg *pMsg, int6
SQWMsg
qwMsg
=
{.
node
=
node
,
.
msg
=
NULL
,
.
msgLen
=
0
,
.
code
=
pMsg
->
code
,
.
connInfo
=
pMsg
->
info
};
if
(
TSDB_CODE_RPC_
NETWORK_UNAVAIL
==
pMsg
->
code
)
{
if
(
TSDB_CODE_RPC_
BROKEN_LINK
==
pMsg
->
code
)
{
QW_SCH_TASK_DLOG
(
"receive drop task due to network broken, error:%s"
,
tstrerror
(
pMsg
->
code
));
}
...
...
@@ -522,7 +522,7 @@ int32_t qWorkerProcessHbMsg(void *node, void *qWorkerMgmt, SRpcMsg *pMsg, int64_
uint64_t
sId
=
req
.
sId
;
SQWMsg
qwMsg
=
{.
node
=
node
,
.
msg
=
NULL
,
.
msgLen
=
0
,
.
code
=
pMsg
->
code
,
.
connInfo
=
pMsg
->
info
};
if
(
TSDB_CODE_RPC_
NETWORK_UNAVAIL
==
pMsg
->
code
)
{
if
(
TSDB_CODE_RPC_
BROKEN_LINK
==
pMsg
->
code
)
{
QW_SCH_DLOG
(
"receive Hb msg due to network broken, error:%s"
,
tstrerror
(
pMsg
->
code
));
}
...
...
source/libs/scheduler/inc/schedulerInt.h
浏览文件 @
53efe751
...
...
@@ -306,6 +306,8 @@ extern SSchedulerMgmt schMgmt;
#define SCH_IS_WAIT_ALL_JOB(_job) (!SCH_IS_QUERY_JOB(_job))
#define SCH_IS_NEED_DROP_JOB(_job) (SCH_IS_QUERY_JOB(_job))
#define SCH_IS_EXPLAIN_JOB(_job) (EXPLAIN_MODE_ANALYZE == (_job)->attr.explainMode)
#define SCH_NETWORK_ERR(_code) ((_code) == TSDB_CODE_RPC_BROKEN_LINK || (_code) == TSDB_CODE_RPC_NETWORK_UNAVAIL)
#define SCH_SUB_TASK_NETWORK_ERR(_code, _len) (((_code) == TSDB_CODE_RPC_NETWORK_UNAVAIL || (_code) == TSDB_CODE_RPC_BROKEN_LINK) && ((_len) > 0))
#define SCH_IS_LEVEL_UNFINISHED(_level) ((_level)->taskLaunchedNum < (_level)->taskNum)
#define SCH_GET_CUR_EP(_addr) (&(_addr)->epSet.eps[(_addr)->epSet.inUse])
...
...
source/libs/scheduler/src/schRemote.c
浏览文件 @
53efe751
...
...
@@ -384,7 +384,7 @@ int32_t schHandleCallback(void *param, SDataBuf *pMsg, int32_t rspCode) {
goto
_return
;
}
bool
dropExecNode
=
(
msgType
==
TDMT_SCH_LINK_BROKEN
||
rspCode
==
TSDB_CODE_RPC_NETWORK_UNAVAIL
);
bool
dropExecNode
=
(
msgType
==
TDMT_SCH_LINK_BROKEN
||
SCH_NETWORK_ERR
(
rspCode
)
);
SCH_ERR_JRET
(
schUpdateTaskHandle
(
pJob
,
pTask
,
dropExecNode
,
pMsg
->
handle
,
pParam
->
execIdx
));
int8_t
status
=
0
;
...
...
@@ -396,7 +396,7 @@ int32_t schHandleCallback(void *param, SDataBuf *pMsg, int32_t rspCode) {
SCH_ERR_JRET
(
schValidateReceivedMsgType
(
pJob
,
pTask
,
msgType
));
if
(
NEED_SCHEDULER_REDIRECT_ERROR
(
rspCode
)
||
((
rspCode
==
TSDB_CODE_RPC_NETWORK_UNAVAIL
)
&&
pMsg
->
len
>
0
))
{
if
(
NEED_SCHEDULER_REDIRECT_ERROR
(
rspCode
)
||
SCH_SUB_TASK_NETWORK_ERR
(
rspCode
,
pMsg
->
len
>
0
))
{
code
=
schHandleRedirect
(
pJob
,
pTask
,
(
SDataBuf
*
)
pMsg
,
rspCode
);
goto
_return
;
}
...
...
source/libs/transport/src/transCli.c
浏览文件 @
53efe751
...
...
@@ -328,7 +328,7 @@ void cliHandleResp(SCliConn* conn) {
tDebug
(
"%s conn %p construct ahandle %p by %s, persist: 1"
,
CONN_GET_INST_LABEL
(
conn
),
conn
,
transMsg
.
info
.
ahandle
,
TMSG_INFO
(
transMsg
.
msgType
));
if
(
!
CONN_RELEASE_BY_SERVER
(
conn
)
&&
transMsg
.
info
.
ahandle
==
NULL
)
{
transMsg
.
code
=
TSDB_CODE_RPC_
NETWORK_UNAVAIL
;
transMsg
.
code
=
TSDB_CODE_RPC_
BROKEN_LINK
;
transMsg
.
info
.
ahandle
=
transCtxDumpBrokenlinkVal
(
&
conn
->
ctx
,
(
int32_t
*
)
&
(
transMsg
.
msgType
));
tDebug
(
"%s conn %p construct ahandle %p due brokenlink, persist: 1"
,
CONN_GET_INST_LABEL
(
conn
),
conn
,
transMsg
.
info
.
ahandle
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录