add errno code OB_TABLET_GC_LOCK_CONFLICT and OB_LS_WAITING_SAFE_DESTROY
This commit is contained in:
parent
aa35cdae5f
commit
0e211a956d
1
deps/oblib/src/lib/ob_errno.h
vendored
1
deps/oblib/src/lib/ob_errno.h
vendored
@ -139,6 +139,7 @@ constexpr int OB_ERR_INTERVAL_PARTITION_EXIST = -4728;
|
||||
constexpr int OB_ERR_INTERVAL_PARTITION_ERROR = -4729;
|
||||
constexpr int OB_FROZEN_INFO_ALREADY_EXIST = -4744;
|
||||
constexpr int OB_CREATE_STANDBY_TENANT_FAILED = -4765;
|
||||
constexpr int OB_LS_WAITING_SAFE_DESTROY = -4766;
|
||||
constexpr int OB_ERR_PARSER_SYNTAX = -5006;
|
||||
constexpr int OB_ERR_COLUMN_NOT_FOUND = -5031;
|
||||
constexpr int OB_ERR_SYS_VARIABLE_UNKNOWN = -5044;
|
||||
|
@ -263,7 +263,7 @@ TEST_F(TestLSService, ls_safe_destroy)
|
||||
// 4. create again and check waiting = true
|
||||
LOG_INFO("TestLSService::ls_safe_destroy 1.4");
|
||||
LOG_INFO("create_ls", K(arg), K(id_104));
|
||||
ASSERT_EQ(OB_EAGAIN, ls_svr->create_ls(arg));
|
||||
ASSERT_EQ(OB_LS_WAITING_SAFE_DESTROY, ls_svr->create_ls(arg));
|
||||
ASSERT_EQ(OB_SUCCESS, ls_svr->check_ls_waiting_safe_destroy(id_104, waiting));
|
||||
ASSERT_TRUE(waiting);
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
@ -656,6 +656,7 @@ DEFINE_ERROR(OB_SKIP_CHECKING_LS_STATUS, -4762, -1, "HY000", "This operation has
|
||||
DEFINE_ORACLE_ERROR(OB_ERR_USE_ROWID_FOR_UPDATE, -4763, -1, "HY000", "invalid user.table.column, table.column, or column specification", 1747, "invalid user.table.column, table.column, or column specification");
|
||||
DEFINE_ORACLE_ERROR_EXT(OB_ERR_UNKNOWN_SET_OPTION, -4764, -1, "HY000", "unknown SET option", "unknown SET option \'%s\'", 600, "unknown SET option", "unknown SET option \'%s\'");
|
||||
DEFINE_ERROR_EXT_DEP(OB_CREATE_STANDBY_TENANT_FAILED, -4765, -1, "HY000", "create standby tenant may fail", "create standby tenant may fail, %s");
|
||||
DEFINE_ERROR_EXT_DEP(OB_LS_WAITING_SAFE_DESTROY, -4766, -1, "HY000", "ls waiting safe destory", "ls waiting safe destory, %s");
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
// SQL & Schema specific error code, -5000 ~ -6000
|
||||
@ -1799,6 +1800,7 @@ DEFINE_ERROR(OB_TRANSFER_SRC_TABLET_NOT_EXIST, -7116, -1, "HY000", "transfer src
|
||||
DEFINE_ERROR(OB_LS_NEED_REBUILD, -7117, -1, "HY000", "ls need rebuild");
|
||||
DEFINE_ERROR(OB_OBSOLETE_CLOG_NEED_SKIP, -7118, -1, "HY000", "obsolete clog need skip");
|
||||
DEFINE_ERROR(OB_TRANSFER_WAIT_TRANSACTION_END_TIMEOUT, -7119, -1, "HY000", "transfer wait transactions end timeout");
|
||||
DEFINE_ERROR(OB_TABLET_GC_LOCK_CONFLICT, -7120, -1, "HY000", "tablet GC lock conflict");
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//error code for gis -7201 ---- -7300
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -1408,6 +1408,7 @@ constexpr int OB_TRANSFER_SRC_TABLET_NOT_EXIST = -7116;
|
||||
constexpr int OB_LS_NEED_REBUILD = -7117;
|
||||
constexpr int OB_OBSOLETE_CLOG_NEED_SKIP = -7118;
|
||||
constexpr int OB_TRANSFER_WAIT_TRANSACTION_END_TIMEOUT = -7119;
|
||||
constexpr int OB_TABLET_GC_LOCK_CONFLICT = -7120;
|
||||
constexpr int OB_ERR_INVALID_XML_DATATYPE = -7402;
|
||||
constexpr int OB_ERR_XML_MISSING_COMMA = -7403;
|
||||
constexpr int OB_ERR_INVALID_XPATH_EXPRESSION = -7404;
|
||||
@ -2322,6 +2323,7 @@ constexpr int OB_ERR_INVALID_DATE_MSG_FMT_V2 = -4219;
|
||||
#define OB_ERR_USE_ROWID_FOR_UPDATE__USER_ERROR_MSG "invalid user.table.column, table.column, or column specification"
|
||||
#define OB_ERR_UNKNOWN_SET_OPTION__USER_ERROR_MSG "unknown SET option \'%s\'"
|
||||
#define OB_CREATE_STANDBY_TENANT_FAILED__USER_ERROR_MSG "create standby tenant may fail, %s"
|
||||
#define OB_LS_WAITING_SAFE_DESTROY__USER_ERROR_MSG "ls waiting safe destory, %s"
|
||||
#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"
|
||||
@ -3398,6 +3400,7 @@ constexpr int OB_ERR_INVALID_DATE_MSG_FMT_V2 = -4219;
|
||||
#define OB_LS_NEED_REBUILD__USER_ERROR_MSG "ls need rebuild"
|
||||
#define OB_OBSOLETE_CLOG_NEED_SKIP__USER_ERROR_MSG "obsolete clog need skip"
|
||||
#define OB_TRANSFER_WAIT_TRANSACTION_END_TIMEOUT__USER_ERROR_MSG "transfer wait transactions end timeout"
|
||||
#define OB_TABLET_GC_LOCK_CONFLICT__USER_ERROR_MSG "tablet GC lock conflict"
|
||||
#define OB_ERR_GIS_DIFFERENT_SRIDS__USER_ERROR_MSG "Binary geometry function %s given two geometries of different srids: %u and %u, which should have been identical."
|
||||
#define OB_ERR_GIS_UNSUPPORTED_ARGUMENT__USER_ERROR_MSG "Calling geometry function %s with unsupported types of arguments."
|
||||
#define OB_ERR_GIS_UNKNOWN_ERROR__USER_ERROR_MSG "Unknown GIS error occurred in function %s."
|
||||
@ -4423,6 +4426,7 @@ constexpr int OB_ERR_INVALID_DATE_MSG_FMT_V2 = -4219;
|
||||
#define OB_ERR_USE_ROWID_FOR_UPDATE__ORA_USER_ERROR_MSG "ORA-01747: invalid user.table.column, table.column, or column specification"
|
||||
#define OB_ERR_UNKNOWN_SET_OPTION__ORA_USER_ERROR_MSG "ORA-00600: unknown SET option \'%s\'"
|
||||
#define OB_CREATE_STANDBY_TENANT_FAILED__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -4765, create standby tenant may fail, %s"
|
||||
#define OB_LS_WAITING_SAFE_DESTROY__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -4766, ls waiting safe destory, %s"
|
||||
#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"
|
||||
@ -5499,6 +5503,7 @@ constexpr int OB_ERR_INVALID_DATE_MSG_FMT_V2 = -4219;
|
||||
#define OB_LS_NEED_REBUILD__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -7117, ls need rebuild"
|
||||
#define OB_OBSOLETE_CLOG_NEED_SKIP__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -7118, obsolete clog need skip"
|
||||
#define OB_TRANSFER_WAIT_TRANSACTION_END_TIMEOUT__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -7119, transfer wait transactions end timeout"
|
||||
#define OB_TABLET_GC_LOCK_CONFLICT__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -7120, tablet GC lock conflict"
|
||||
#define OB_ERR_GIS_DIFFERENT_SRIDS__ORA_USER_ERROR_MSG "ORA-00600: Binary geometry function %s given two geometries of different srids: %u and %u, which should have been identical."
|
||||
#define OB_ERR_GIS_UNSUPPORTED_ARGUMENT__ORA_USER_ERROR_MSG "ORA-00600: Calling geometry function %s with unsupported types of arguments."
|
||||
#define OB_ERR_GIS_UNKNOWN_ERROR__ORA_USER_ERROR_MSG "ORA-00600: Unknown GIS error occurred in function %s."
|
||||
@ -5966,7 +5971,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[2097];
|
||||
extern int g_all_ob_errnos[2099];
|
||||
|
||||
const char *ob_error_name(const int oberr);
|
||||
const char* ob_error_cause(const int oberr);
|
||||
|
@ -455,7 +455,7 @@ int ObLSService::create_ls(const obrpc::ObCreateLSArg &arg)
|
||||
waiting_destroy))) {
|
||||
LOG_WARN("check ls waiting safe destroy failed", K(ret), K(arg));
|
||||
} else if (waiting_destroy) {
|
||||
ret = OB_EAGAIN;
|
||||
ret = OB_LS_WAITING_SAFE_DESTROY;
|
||||
LOG_WARN("ls waiting for destroy, need retry later", K(ret), K(arg));
|
||||
} else if (OB_FAIL(inner_create_ls_(arg.get_ls_id(),
|
||||
migration_status,
|
||||
@ -1067,7 +1067,7 @@ int ObLSService::create_ls_for_ha(
|
||||
waiting_destroy))) {
|
||||
LOG_WARN("check ls waiting safe destroy failed", K(ret), K(arg));
|
||||
} else if (waiting_destroy) {
|
||||
ret = OB_EAGAIN;
|
||||
ret = OB_LS_WAITING_SAFE_DESTROY;
|
||||
LOG_WARN("ls waiting for destroy, need retry later", K(ret), K(arg));
|
||||
} else if (OB_FAIL(ObMigrationStatusHelper::trans_migration_op(arg.type_, migration_status))) {
|
||||
LOG_WARN("failed to trans migration op", K(ret), K(arg), K(task_id));
|
||||
|
@ -287,7 +287,7 @@ int ObTabletGCHandler::disable_gc()
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
if (OB_FAIL(gc_lock_.trylock())) {
|
||||
ret = OB_EAGAIN;
|
||||
ret = OB_TABLET_GC_LOCK_CONFLICT;
|
||||
LOG_WARN("try lock failed, please retry later", K(ret));
|
||||
}
|
||||
|
||||
@ -303,7 +303,7 @@ int ObTabletGCHandler::set_tablet_change_checkpoint_scn(const share::SCN &scn)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
if (OB_FAIL(gc_lock_.trylock())) {
|
||||
ret = OB_EAGAIN;
|
||||
ret = OB_TABLET_GC_LOCK_CONFLICT;
|
||||
LOG_WARN("try lock failed, please retry later", K(ret));
|
||||
} else {
|
||||
if (OB_FAIL(ls_->set_tablet_change_checkpoint_scn(scn))) {
|
||||
@ -701,7 +701,7 @@ int ObTabletGCHandler::offline()
|
||||
STORAGE_LOG(INFO, "tablet gc handler not finish, retry", KR(ret), KPC(this), KPC(ls_), K(ls_->get_ls_meta()));
|
||||
} else if (OB_FAIL(gc_lock_.trylock())) {
|
||||
// make sure 'gc_lock_' is not using.
|
||||
ret = OB_EAGAIN;
|
||||
ret = OB_TABLET_GC_LOCK_CONFLICT;
|
||||
LOG_WARN("tablet gc handler not finish, retry", K(ret));
|
||||
} else {
|
||||
gc_lock_.unlock();
|
||||
|
Loading…
x
Reference in New Issue
Block a user