Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
15160544
TDengine
项目概览
taosdata
/
TDengine
大约 2 年 前同步成功
通知
1193
Star
22018
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
15160544
编写于
12月 21, 2022
作者:
A
Alex Duan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat(rpc): move the check msgType to client
上级
37ea86f8
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
26 addition
and
10 deletion
+26
-10
include/util/taoserror.h
include/util/taoserror.h
+1
-0
source/client/src/clientImpl.c
source/client/src/clientImpl.c
+20
-0
source/libs/transport/src/transCli.c
source/libs/transport/src/transCli.c
+5
-10
未找到文件。
include/util/taoserror.h
浏览文件 @
15160544
...
@@ -66,6 +66,7 @@ int32_t* taosGetErrno();
...
@@ -66,6 +66,7 @@ int32_t* taosGetErrno();
#define TSDB_CODE_RPC_BROKEN_LINK TAOS_DEF_ERROR_CODE(0, 0x0018) //
#define TSDB_CODE_RPC_BROKEN_LINK TAOS_DEF_ERROR_CODE(0, 0x0018) //
#define TSDB_CODE_RPC_TIMEOUT TAOS_DEF_ERROR_CODE(0, 0x0019) //
#define TSDB_CODE_RPC_TIMEOUT TAOS_DEF_ERROR_CODE(0, 0x0019) //
#define TSDB_CODE_RPC_VGROUP_NOT_CONNECTED TAOS_DEF_ERROR_CODE(0, 0x0020) // "Vgroup could not be connected"
#define TSDB_CODE_RPC_VGROUP_NOT_CONNECTED TAOS_DEF_ERROR_CODE(0, 0x0020) // "Vgroup could not be connected"
#define TSDB_CODE_RPC_VGROUP_BROKEN_LINK TAOS_DEF_ERROR_CODE(0, 0x0021) //
//common & util
//common & util
#define TSDB_CODE_OPS_NOT_SUPPORT TAOS_DEF_ERROR_CODE(0, 0x0100) //
#define TSDB_CODE_OPS_NOT_SUPPORT TAOS_DEF_ERROR_CODE(0, 0x0100) //
...
...
source/client/src/clientImpl.c
浏览文件 @
15160544
...
@@ -1424,6 +1424,26 @@ void processMsgFromServer(void* parent, SRpcMsg* pMsg, SEpSet* pEpSet) {
...
@@ -1424,6 +1424,26 @@ void processMsgFromServer(void* parent, SRpcMsg* pMsg, SEpSet* pEpSet) {
memcpy
((
void
*
)
tEpSet
,
(
void
*
)
pEpSet
,
sizeof
(
SEpSet
));
memcpy
((
void
*
)
tEpSet
,
(
void
*
)
pEpSet
,
sizeof
(
SEpSet
));
}
}
switch
(
pMsg
->
msg
.
msgType
)
{
case
TDMT_VND_BATCH_META
:
case
TDMT_VND_SUBMIT
:
case
TDMT_SCH_QUERY
:
case
TDMT_SCH_MERGE_QUERY
:
// uniform to one error code: TSDB_CODE_RPC_VGROUP_NOT_CONNECTED
if
(
pMsg
->
code
==
TSDB_CODE_RPC_VGROUP_BROKEN_LINK
)
{
pMsg
->
code
=
TSDB_CODE_RPC_VGROUP_NOT_CONNECTED
;
}
break
;
default:
// restore origin code
if
(
pMsg
->
code
==
TSDB_CODE_RPC_VGROUP_NOT_CONNECTED
)
{
pMsg
->
code
=
TSDB_CODE_RPC_NETWORK_UNAVAIL
;
}
else
if
(
pMsg
->
code
==
TSDB_CODE_RPC_VGROUP_BROKEN_LINK
)
{
pMsg
->
code
=
TSDB_CODE_RPC_BROKEN_LINK
;
}
break
;
}
AsyncArg
*
arg
=
taosMemoryCalloc
(
1
,
sizeof
(
AsyncArg
));
AsyncArg
*
arg
=
taosMemoryCalloc
(
1
,
sizeof
(
AsyncArg
));
arg
->
msg
=
*
pMsg
;
arg
->
msg
=
*
pMsg
;
arg
->
pEpset
=
tEpSet
;
arg
->
pEpset
=
tEpSet
;
...
...
source/libs/transport/src/transCli.c
浏览文件 @
15160544
...
@@ -1671,16 +1671,11 @@ int cliAppCb(SCliConn* pConn, STransMsg* pResp, SCliMsg* pMsg) {
...
@@ -1671,16 +1671,11 @@ int cliAppCb(SCliConn* pConn, STransMsg* pResp, SCliMsg* pMsg) {
}
}
// check whole vnodes is offline on this vgroup
// check whole vnodes is offline on this vgroup
if
(
pResp
->
code
==
TSDB_CODE_RPC_NETWORK_UNAVAIL
||
pResp
->
code
==
TSDB_CODE_RPC_BROKEN_LINK
)
{
if
(
pCtx
->
epsetRetryCnt
>=
pCtx
->
epSet
.
numOfEps
||
pCtx
->
retryStep
>
0
)
{
if
(
pCtx
->
epsetRetryCnt
>=
pCtx
->
epSet
.
numOfEps
||
pCtx
->
retryStep
>
0
)
{
if
(
pResp
->
code
==
TSDB_CODE_RPC_NETWORK_UNAVAIL
)
{
switch
(
pMsg
->
msg
.
msgType
)
{
pResp
->
code
=
TSDB_CODE_RPC_VGROUP_NOT_CONNECTED
;
case
TDMT_VND_BATCH_META
:
}
else
if
(
pResp
->
code
==
TSDB_CODE_RPC_BROKEN_LINK
)
{
case
TDMT_VND_SUBMIT
:
pResp
->
code
=
TSDB_CODE_RPC_VGROUP_BROKEN_LINK
;
case
TDMT_SCH_QUERY
:
case
TDMT_SCH_MERGE_QUERY
:
pResp
->
code
=
TSDB_CODE_RPC_VGROUP_NOT_CONNECTED
;
break
;
}
}
}
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录