Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
oceanbase
oceanbase
提交
cf98047e
O
oceanbase
项目概览
oceanbase
/
oceanbase
大约 1 年 前同步成功
通知
261
Star
6084
Fork
1301
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
oceanbase
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
cf98047e
编写于
10月 28, 2022
作者:
O
obdev
提交者:
wangzelin.wzl
10月 28, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
not retry if init_sqc message may be sent out successfully
上级
a7f88103
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
39 addition
and
5 deletion
+39
-5
src/share/ob_errno.cpp
src/share/ob_errno.cpp
+13
-0
src/share/ob_errno.def
src/share/ob_errno.def
+1
-0
src/share/ob_errno.h
src/share/ob_errno.h
+3
-0
src/sql/engine/px/ob_px_rpc_processor.cpp
src/sql/engine/px/ob_px_rpc_processor.cpp
+10
-2
src/sql/engine/px/ob_px_rpc_processor.h
src/sql/engine/px/ob_px_rpc_processor.h
+4
-2
src/sql/engine/px/ob_px_sqc_async_proxy.cpp
src/sql/engine/px/ob_px_sqc_async_proxy.cpp
+8
-1
未找到文件。
src/share/ob_errno.cpp
浏览文件 @
cf98047e
...
...
@@ -6357,6 +6357,18 @@ static const _error _error_OB_DELETE_SERVER_NOT_ALLOWED = {
.oracle_str_error = "ORA-00600: internal error code, arguments: -4745, delete server not allowed",
.oracle_str_user_error = "ORA-00600: internal error code, arguments: -4745, %s"
};
static const _error _error_OB_PACKET_STATUS_UNKNOWN = {
.error_name = "OB_PACKET_STATUS_UNKNOWN",
.error_cause = "Internal Error",
.error_solution = "Contact OceanBase Support",
.mysql_errno = -1,
.sqlstate = "HY000",
.str_error = "Network error and packet status unknown. Abort auto retry.",
.str_user_error = "Network error and packet status unknown. Abort auto retry.",
.oracle_errno = 600,
.oracle_str_error = "ORA-00600: internal error code, arguments: -4746, Network error and packet status unknown. Abort auto retry.",
.oracle_str_user_error = "ORA-00600: internal error code, arguments: -4746, Network error and packet status unknown. Abort auto retry."
};
static const _error _error_OB_ERR_PARSER_INIT = {
.error_name = "OB_ERR_PARSER_INIT",
.error_cause = "Internal Error",
...
...
@@ -22480,6 +22492,7 @@ struct ObStrErrorInit
_errors[-OB_FREEZE_SERVICE_EPOCH_MISMATCH] = &_error_OB_FREEZE_SERVICE_EPOCH_MISMATCH;
_errors[-OB_FROZEN_INFO_ALREADY_EXIST] = &_error_OB_FROZEN_INFO_ALREADY_EXIST;
_errors[-OB_DELETE_SERVER_NOT_ALLOWED] = &_error_OB_DELETE_SERVER_NOT_ALLOWED;
_errors[-OB_PACKET_STATUS_UNKNOWN] = &_error_OB_PACKET_STATUS_UNKNOWN;
_errors[-OB_ERR_PARSER_INIT] = &_error_OB_ERR_PARSER_INIT;
_errors[-OB_ERR_PARSE_SQL] = &_error_OB_ERR_PARSE_SQL;
_errors[-OB_ERR_RESOLVE_SQL] = &_error_OB_ERR_RESOLVE_SQL;
src/share/ob_errno.def
浏览文件 @
cf98047e
...
...
@@ -623,6 +623,7 @@ DEFINE_ERROR(OB_WAIT_TABLET_READY_TIMEOUT, -4742, -1, "HY000", "log stream wait
DEFINE_ERROR(OB_FREEZE_SERVICE_EPOCH_MISMATCH, -4743, -1, "HY000", "freeze service epoch is not expected");
DEFINE_ERROR_EXT_DEP(OB_FROZEN_INFO_ALREADY_EXIST, -4744, -1, "HY000", "already exist larger frozen_scn in __all_freeze_info", "%s");
DEFINE_ERROR_EXT(OB_DELETE_SERVER_NOT_ALLOWED, -4745, -1, "HY000", "delete server not allowed", "%s");
DEFINE_ERROR(OB_PACKET_STATUS_UNKNOWN, -4746, -1, "HY000", "Network error and packet status unknown. Abort auto retry.");
////////////////////////////////////////////////////////////////
// SQL & Schema specific error code, -5000 ~ -6000
...
...
src/share/ob_errno.h
浏览文件 @
cf98047e
...
...
@@ -433,6 +433,7 @@ constexpr int OB_WAIT_REPLAY_TIMEOUT = -4741;
constexpr
int
OB_WAIT_TABLET_READY_TIMEOUT
=
-
4742
;
constexpr
int
OB_FREEZE_SERVICE_EPOCH_MISMATCH
=
-
4743
;
constexpr
int
OB_DELETE_SERVER_NOT_ALLOWED
=
-
4745
;
constexpr
int
OB_PACKET_STATUS_UNKNOWN
=
-
4746
;
constexpr
int
OB_ERR_PARSER_INIT
=
-
5000
;
constexpr
int
OB_ERR_PARSE_SQL
=
-
5001
;
constexpr
int
OB_ERR_RESOLVE_SQL
=
-
5002
;
...
...
@@ -2126,6 +2127,7 @@ constexpr int OB_ERR_INVALID_DATE_MSG_FMT_V2 = -4219;
#define OB_FREEZE_SERVICE_EPOCH_MISMATCH__USER_ERROR_MSG "freeze service epoch is not expected"
#define OB_FROZEN_INFO_ALREADY_EXIST__USER_ERROR_MSG "%s"
#define OB_DELETE_SERVER_NOT_ALLOWED__USER_ERROR_MSG "%s"
#define OB_PACKET_STATUS_UNKNOWN__USER_ERROR_MSG "Network error and packet status unknown. Abort auto retry."
#define OB_ERR_PARSER_INIT__USER_ERROR_MSG "Failed to init SQL parser"
#define OB_ERR_PARSE_SQL__USER_ERROR_MSG "%s near \'%.*s\' at line %d"
#define OB_ERR_RESOLVE_SQL__USER_ERROR_MSG "Resolve error"
...
...
@@ -3956,6 +3958,7 @@ constexpr int OB_ERR_INVALID_DATE_MSG_FMT_V2 = -4219;
#define OB_FREEZE_SERVICE_EPOCH_MISMATCH__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -4743, freeze service epoch is not expected"
#define OB_FROZEN_INFO_ALREADY_EXIST__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -4744, %s"
#define OB_DELETE_SERVER_NOT_ALLOWED__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -4745, %s"
#define OB_PACKET_STATUS_UNKNOWN__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -4746, Network error and packet status unknown. Abort auto retry."
#define OB_ERR_PARSER_INIT__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -5000, Failed to init SQL parser"
#define OB_ERR_PARSE_SQL__ORA_USER_ERROR_MSG "ORA-00900: %s near \'%.*s\' at line %d"
#define OB_ERR_RESOLVE_SQL__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -5002, Resolve error"
...
...
src/sql/engine/px/ob_px_rpc_processor.cpp
浏览文件 @
cf98047e
...
...
@@ -476,7 +476,10 @@ int ObFastInitSqcCB::deal_with_rpc_timeout_err_safely()
{
int
ret
=
OB_SUCCESS
;
ObDealWithRpcTimeoutCall
call
(
addr_
,
retry_info_
,
timeout_ts_
,
trace_id_
);
// only if it's sure init_sqc msg is not sent to sqc successfully, we can retry the query.
bool
init_sqc_not_send_out
=
(
get_error
()
==
EASY_TIMEOUT_NOT_SENT_OUT
||
get_error
()
==
EASY_DISCONNECT_NOT_SENT_OUT
);
ObDealWithRpcTimeoutCall
call
(
addr_
,
retry_info_
,
timeout_ts_
,
trace_id_
,
init_sqc_not_send_out
);
call
.
ret_
=
OB_TIMEOUT
;
ObGlobalInterruptManager
*
manager
=
ObGlobalInterruptManager
::
getInstance
();
if
(
OB_NOT_NULL
(
manager
))
{
...
...
@@ -529,7 +532,12 @@ void ObDealWithRpcTimeoutCall::deal_with_rpc_timeout_err()
LOG_WARN
(
"fail to add invalid server distinctly"
,
K_
(
trace_id
),
K
(
a_ret
),
K_
(
addr
));
}
}
if
(
can_retry_
)
{
// return OB_RPC_CONNECT_ERROR to retry.
ret_
=
OB_RPC_CONNECT_ERROR
;
}
else
{
ret_
=
OB_PACKET_STATUS_UNKNOWN
;
}
}
else
{
LOG_DEBUG
(
"rpc return OB_TIMEOUT, and it is actually timeout, "
"do not change error code"
,
K
(
ret_
),
...
...
src/sql/engine/px/ob_px_rpc_processor.h
浏览文件 @
cf98047e
...
...
@@ -120,8 +120,9 @@ public:
ObDealWithRpcTimeoutCall
(
common
::
ObAddr
addr
,
ObQueryRetryInfo
*
retry_info
,
int64_t
timeout_ts
,
common
::
ObCurTraceId
::
TraceId
&
trace_id
)
:
addr_
(
addr
),
retry_info_
(
retry_info
),
timeout_ts_
(
timeout_ts
),
trace_id_
(
trace_id
),
ret_
(
common
::
OB_TIMEOUT
)
{}
common
::
ObCurTraceId
::
TraceId
&
trace_id
,
bool
retry
)
:
addr_
(
addr
),
retry_info_
(
retry_info
),
timeout_ts_
(
timeout_ts
),
trace_id_
(
trace_id
),
ret_
(
common
::
OB_TIMEOUT
),
can_retry_
(
retry
)
{}
~
ObDealWithRpcTimeoutCall
()
=
default
;
void
operator
()
(
hash
::
HashMapPair
<
ObInterruptibleTaskID
,
ObInterruptCheckerNode
*>
&
entry
);
...
...
@@ -132,6 +133,7 @@ public:
int64_t
timeout_ts_
;
common
::
ObCurTraceId
::
TraceId
trace_id_
;
int
ret_
;
bool
can_retry_
;
};
class
ObFastInitSqcCB
...
...
src/sql/engine/px/ob_px_sqc_async_proxy.cpp
浏览文件 @
cf98047e
...
...
@@ -185,7 +185,14 @@ int ObPxSqcAsyncProxy::wait_all() {
if
(
phy_plan_ctx_
->
get_timeout_timestamp
()
-
ObTimeUtility
::
current_time
()
>
0
)
{
error_index_
=
idx
;
bool
init_sqc_not_send_out
=
(
callback
.
get_error
()
==
EASY_TIMEOUT_NOT_SENT_OUT
||
callback
.
get_error
()
==
EASY_DISCONNECT_NOT_SENT_OUT
);
if
(
init_sqc_not_send_out
)
{
// only if it's sure init_sqc msg is not sent to sqc successfully, return OB_RPC_CONNECT_ERROR to retry.
ret
=
OB_RPC_CONNECT_ERROR
;
}
else
{
ret
=
OB_PACKET_STATUS_UNKNOWN
;
}
}
else
{
ret
=
OB_TIMEOUT
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录