add error code ob_ls_offline

This commit is contained in:
Minionyh
2023-05-29 10:11:11 +00:00
committed by ob-robot
parent 27419972a7
commit 6ed7d37499
5 changed files with 21 additions and 4 deletions

File diff suppressed because one or more lines are too long

View File

@ -649,6 +649,7 @@ DEFINE_ERROR(OB_CLUSTER_INFO_MAYBE_REMAINED, -4757, -1, "HY000", "Cluster info m
//DEFINE_ERROR(OB_CLUSTER_INFO_MAYBE_REMAINED, -4757, -1, "HY000", "Cluster info may remain on arbitration server '%.*s', please make sure whether to use ob_admin to clean it.");
DEFINE_ERROR(OB_ARBITRATION_INFO_QUERY_FAILED, -4758, -1, "HY000", "the arbitration service may be unavailable, please check and retry");
DEFINE_ERROR(OB_IGNORE_ERR_ACCESS_VIRTUAL_TABLE, -4759, -1, "HY000", "An error was ignored when accessing virtual table, actual error code: %d");
DEFINE_ERROR(OB_LS_OFFLINE, -4760, -1, "HY000", "log stream is offline");
////////////////////////////////////////////////////////////////
// SQL & Schema specific error code, -5000 ~ -6000

View File

@ -451,6 +451,7 @@ constexpr int OB_MIGRATE_NOT_COMPATIBLE = -4756;
constexpr int OB_CLUSTER_INFO_MAYBE_REMAINED = -4757;
constexpr int OB_ARBITRATION_INFO_QUERY_FAILED = -4758;
constexpr int OB_IGNORE_ERR_ACCESS_VIRTUAL_TABLE = -4759;
constexpr int OB_LS_OFFLINE = -4760;
constexpr int OB_ERR_PARSER_INIT = -5000;
constexpr int OB_ERR_PARSE_SQL = -5001;
constexpr int OB_ERR_RESOLVE_SQL = -5002;
@ -2299,6 +2300,7 @@ constexpr int OB_ERR_INVALID_DATE_MSG_FMT_V2 = -4219;
#define OB_CLUSTER_INFO_MAYBE_REMAINED__USER_ERROR_MSG "Cluster info may remain on arbitration server '%.*s', please make sure whether to use ob_admin to clean it."
#define OB_ARBITRATION_INFO_QUERY_FAILED__USER_ERROR_MSG "the arbitration service may be unavailable, please check and retry"
#define OB_IGNORE_ERR_ACCESS_VIRTUAL_TABLE__USER_ERROR_MSG "An error was ignored when accessing virtual table, actual error code: %d"
#define OB_LS_OFFLINE__USER_ERROR_MSG "log stream is offline"
#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"
@ -4382,6 +4384,7 @@ constexpr int OB_ERR_INVALID_DATE_MSG_FMT_V2 = -4219;
#define OB_CLUSTER_INFO_MAYBE_REMAINED__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -4757, Cluster info may remain on arbitration server '%.*s', please make sure whether to use ob_admin to clean it."
#define OB_ARBITRATION_INFO_QUERY_FAILED__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -4758, the arbitration service may be unavailable, please check and retry"
#define OB_IGNORE_ERR_ACCESS_VIRTUAL_TABLE__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -4759, An error was ignored when accessing virtual table, actual error code: %d"
#define OB_LS_OFFLINE__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -4760, log stream is offline"
#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"
@ -5915,7 +5918,7 @@ constexpr int OB_ERR_INVALID_DATE_MSG_FMT_V2 = -4219;
#define OB_ERR_DATA_TOO_LONG_MSG_FMT_V2__ORA_USER_ERROR_MSG "ORA-12899: value too large for column %.*s (actual: %ld, maximum: %ld)"
#define OB_ERR_INVALID_DATE_MSG_FMT_V2__ORA_USER_ERROR_MSG "ORA-01861: Incorrect datetime value for column '%.*s' at row %ld"
extern int g_all_ob_errnos[2079];
extern int g_all_ob_errnos[2080];
const char *ob_error_name(const int oberr);
const char* ob_error_cause(const int oberr);

View File

@ -573,7 +573,7 @@ int ObTableScanIterator::check_ls_offline_after_read()
auto &acc_ctx = ctx_guard_.get_store_ctx().mvcc_acc_ctx_;
if (acc_ctx.tx_table_guard_.check_ls_offline()) {
ret = OB_NOT_MASTER;
ret = OB_LS_OFFLINE;
STORAGE_LOG(WARN, "ls offline during the read operation", K(ret), K(acc_ctx.snapshot_));
}

View File

@ -1276,7 +1276,7 @@ int ObTransService::revert_store_ctx(storage::ObStoreCtx &store_ctx)
if (OB_SUCC(ret) && (acc_ctx.is_read())) {
if (acc_ctx.tx_table_guard_.check_ls_offline()) {
ret = OB_NOT_MASTER;
ret = OB_LS_OFFLINE;
STORAGE_LOG(WARN, "ls offline during the read operation", K(ret), K(acc_ctx.snapshot_));
}
}