fix ret missed and overwrite
This commit is contained in:
parent
854a7a24df
commit
f143ab3f5e
6
deps/oblib/src/common/log/ob_log_reader.cpp
vendored
6
deps/oblib/src/common/log/ob_log_reader.cpp
vendored
@ -151,11 +151,13 @@ int ObLogReader::revise_log(const bool force)
|
||||
} else {
|
||||
if (OB_LAST_LOG_NOT_COMPLETE == ret || (force && OB_LAST_LOG_RUINNED == ret)) {
|
||||
uint64_t file_id = cur_log_file_id_ + 1;
|
||||
int tmp_ret = OB_SUCCESS;
|
||||
if (log_file_reader_->if_file_exist(file_id)) {
|
||||
// ignore ret
|
||||
SHARE_LOG(WARN, "the log is not the last", K(cur_log_file_id_), K(ret));
|
||||
} else {
|
||||
if (OB_FAIL(log_file_reader_->revise())) {
|
||||
SHARE_LOG(WARN, "revise log failed", K(cur_log_file_id_), K(ret));
|
||||
if (OB_TMP_FAIL(log_file_reader_->revise())) {
|
||||
SHARE_LOG(WARN, "revise log failed", K(cur_log_file_id_), K(tmp_ret), K(ret));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
1
deps/oblib/src/common/row/ob_row_store.cpp
vendored
1
deps/oblib/src/common/row/ob_row_store.cpp
vendored
@ -967,6 +967,7 @@ int ObRowStore::assign(const ObRowStore &other_store)
|
||||
if (OB_FAIL(set_col_count(col_count))) {
|
||||
OB_LOG(WARN, "fail to set rowstore columns count", K(ret));
|
||||
} else if (OB_ISNULL(cell = static_cast<ObObj *>(alloca(sizeof(ObObj) * col_count)))) {
|
||||
ret = OB_ALLOCATE_MEMORY_FAILED;
|
||||
OB_LOG(WARN, "fail to alloc obj array", K(ret));
|
||||
} else {
|
||||
cur_row.cells_ = cell;
|
||||
|
@ -138,7 +138,9 @@ void *ObMallocAllocator::alloc(const int64_t size, const oceanbase::lib::ObMemAt
|
||||
allocator = get_tenant_ctx_allocator(inner_attr.tenant_id_, inner_attr.ctx_id_);
|
||||
}
|
||||
}
|
||||
|
||||
if (OB_ISNULL(allocator)) {
|
||||
// ignore ret
|
||||
ret = OB_ENTRY_NOT_EXIST;
|
||||
LOG_ERROR("tenant allocator not exist", K(inner_attr.tenant_id_), K(inner_attr.ctx_id_),
|
||||
K(ret));
|
||||
|
4
deps/oblib/src/lib/container/ob_2d_array.h
vendored
4
deps/oblib/src/lib/container/ob_2d_array.h
vendored
@ -404,7 +404,7 @@ template <typename T, int max_block_size,
|
||||
bool use_trivial_ctor>
|
||||
int Ob2DArray<T, max_block_size, BlockAllocatorT, auto_free, BlockPointerArrayT, use_trivial_ctor>::pop_back(T &obj)
|
||||
{
|
||||
int ret = OB_ENTRY_NOT_EXIST;
|
||||
int ret = OB_SUCCESS;
|
||||
if (OB_LIKELY(0 < count_)) {
|
||||
T *obj_ptr = get_obj_pos(count_ - 1);
|
||||
// assign
|
||||
@ -414,6 +414,8 @@ int Ob2DArray<T, max_block_size, BlockAllocatorT, auto_free, BlockPointerArrayT,
|
||||
obj_ptr->~T();
|
||||
--count_;
|
||||
}
|
||||
} else {
|
||||
ret = OB_ENTRY_NOT_EXIST;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
@ -442,7 +442,9 @@ int FileDirectoryUtils::delete_directory_rec(const char *path)
|
||||
}
|
||||
}
|
||||
}
|
||||
if (OB_FAIL(delete_directory(path))) {
|
||||
if (OB_FAIL(ret)) {
|
||||
LIB_LOG(WARN, "delete directory rec failed", K(ret), K(path));
|
||||
} else if (OB_FAIL(delete_directory(path))) {
|
||||
LIB_LOG(WARN, "delete_directory failed", K(ret), K(path));
|
||||
}
|
||||
if (NULL != dir) {
|
||||
|
@ -459,10 +459,12 @@ int ObMySQLConnectionPool::acquire(const uint64_t tenant_id, ObMySQLConnection *
|
||||
}
|
||||
}
|
||||
if (OB_FAIL(ret)) {
|
||||
// do nothing
|
||||
connection = NULL;
|
||||
}
|
||||
|
||||
if (OB_ISNULL(connection)) {
|
||||
//overwrite ret
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
LOG_WARN("failed to acquire connection",
|
||||
K(this), K(tenant_id), K(server_count), K(busy_conn_count_), K(ret));
|
||||
@ -679,6 +681,7 @@ void ObMySQLConnectionPool::runTimerTask()
|
||||
// - close long idle connection
|
||||
// - renew tenant_server_conn_pool_map
|
||||
if (OB_FAIL(purge_connection_pool())) {
|
||||
// ignore ret
|
||||
LOG_ERROR("fail to update mysql connection pool", K(ret));
|
||||
}
|
||||
}
|
||||
@ -688,9 +691,9 @@ void ObMySQLConnectionPool::runTimerTask()
|
||||
if (MySQLConnectionPoolType::TENANT_POOL == pool_type_ && OB_FAIL(renew_tenant_server_pool_map())) {
|
||||
LOG_ERROR("renew_tenant_server_pool_map failed", K(ret));
|
||||
}
|
||||
|
||||
if (OB_FAIL(server_provider_->end_refresh())) {
|
||||
LOG_WARN("server_provider_ end_refresh failed", K(ret), K(this));
|
||||
if (OB_TMP_FAIL(server_provider_->end_refresh())) {
|
||||
ret = OB_FAIL(ret) ? ret : tmp_ret;
|
||||
LOG_WARN("server_provider_ end_refresh failed", K(ret), K(tmp_ret), K(this));
|
||||
}
|
||||
// end LOCK BLOCK
|
||||
if (count > 0) {
|
||||
@ -935,6 +938,7 @@ int ObMySQLConnectionPool::renew_tenant_server_pool_map()
|
||||
} // end for tenant_array
|
||||
|
||||
if (OB_FAIL(purge_tenant_server_pool_map_(tenant_array))) {
|
||||
//ignore ret
|
||||
LOG_WARN("purge_tenant_server_pool_map_ failed, skip this error", K(ret), K(tenant_array));
|
||||
ret = OB_SUCCESS;
|
||||
} else {
|
||||
|
@ -330,7 +330,8 @@ void ObTCFactory<T, MAX_CLASS_NUM, LABEL, MEM_LIMIT, MAX_FREE_LIST_LENGTH>::garb
|
||||
int ret = OB_SUCCESS;
|
||||
global_factory_t *gfactory = global_factory_t::get_instance();
|
||||
if (OB_ISNULL(gfactory)) {
|
||||
LIB_LOG(ERROR, "gfactory is NULL");
|
||||
ret = OB_INVALID_ARGUMENT;
|
||||
LIB_LOG(ERROR, "gfactory is NULL", K(ret));
|
||||
} else {
|
||||
common::ObDList<T> range;
|
||||
for (int32_t type_id = 0; OB_SUCC(ret) && type_id < MAX_CLASS_NUM; ++type_id) {
|
||||
|
1
deps/oblib/src/lib/queue/ob_dedup_queue.cpp
vendored
1
deps/oblib/src/lib/queue/ob_dedup_queue.cpp
vendored
@ -180,6 +180,7 @@ int ObDedupQueue::add_task(const IObDedupTask &task)
|
||||
if (REACH_TIME_INTERVAL(THREAD_CHECK_INTERVAL)) {
|
||||
for (int64_t i = 0; i < thread_num_; i++) {
|
||||
if (thread_metas_[i].check_dead(thread_dead_threshold_)) {
|
||||
// ignore ret
|
||||
COMMON_LOG(WARN, "thread maybe dead", K(i), K(thread_metas_[i]));
|
||||
}
|
||||
}
|
||||
|
3
deps/oblib/src/lib/thread/thread_mgr.h
vendored
3
deps/oblib/src/lib/thread/thread_mgr.h
vendored
@ -1029,7 +1029,8 @@ public:
|
||||
TGHelper *tg_helper = get_tenant_tg_helper();
|
||||
// 目前只打印日志
|
||||
if (OB_ISNULL(tg_helper)) {
|
||||
OB_LOG(WARN, "create tg tenant but tenant tg helper is null", K(tg_def_id), K(tg_id));
|
||||
// ignore ret
|
||||
OB_LOG(WARN, "create tg tenant but tenant tg helper is null", K(tg_def_id), K(tg_id), K(ret));
|
||||
} else {
|
||||
tg->tg_helper_ = tg_helper;
|
||||
tg_helper->tg_create_cb(tg_id);
|
||||
|
14
deps/oblib/src/rpc/frame/ob_sql_processor.cpp
vendored
14
deps/oblib/src/rpc/frame/ob_sql_processor.cpp
vendored
@ -43,12 +43,16 @@ int ObSqlProcessor::run()
|
||||
} else {
|
||||
}
|
||||
}
|
||||
|
||||
if (OB_FAIL(response(ret))) {
|
||||
LOG_WARN("response rpc result fail", K(ret));
|
||||
int tmp_ret = OB_SUCCESS;
|
||||
int tmp_ret_2 = OB_SUCCESS;
|
||||
if (OB_TMP_FAIL(response(ret))) {
|
||||
ret = (OB_SUCCESS != ret) ? ret : tmp_ret;
|
||||
LOG_WARN("response rpc result fail", K(ret), K(tmp_ret));
|
||||
}
|
||||
if (deseri_succ && OB_FAIL(after_process(ret))) {
|
||||
LOG_WARN("after process fail", K(ret));
|
||||
|
||||
if (deseri_succ && OB_UNLIKELY(OB_SUCCESS != (tmp_ret_2 = after_process(ret)))) {
|
||||
ret = (OB_SUCCESS != ret) ? ret : tmp_ret_2;
|
||||
LOG_WARN("after process fail", K(ret), K(tmp_ret_2));
|
||||
}
|
||||
|
||||
cleanup();
|
||||
|
@ -2077,15 +2077,14 @@ int ObMultiTenant::get_active_tenant_with_tenant_lock(
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ObMultiTenant::get_tenant_unsafe( const uint64_t tenant_id, ObTenant *&tenant) const
|
||||
int ObMultiTenant::get_tenant_unsafe(const uint64_t tenant_id, ObTenant *&tenant) const
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
|
||||
tenant = NULL;
|
||||
for (TenantList::iterator it = tenants_.begin();
|
||||
it != tenants_.end() && NULL == tenant;
|
||||
it++) {
|
||||
for (TenantList::iterator it = tenants_.begin(); it != tenants_.end() && NULL == tenant; it++) {
|
||||
if (OB_ISNULL(*it)) {
|
||||
// ignore ret
|
||||
// process the remains anyway
|
||||
LOG_ERROR("unexpected condition");
|
||||
} else if ((*it)->id() == tenant_id) {
|
||||
@ -2240,10 +2239,9 @@ int ObMultiTenant::get_mtl_tenant_ids(ObIArray<uint64_t> &tenant_ids)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
SpinRLockGuard guard(lock_);
|
||||
for (TenantList::iterator it = tenants_.begin();
|
||||
it != tenants_.end() && OB_SUCC(ret);
|
||||
it++) {
|
||||
for (TenantList::iterator it = tenants_.begin(); it != tenants_.end() && OB_SUCC(ret); it++) {
|
||||
if (OB_ISNULL(*it)) {
|
||||
// ignore ret
|
||||
LOG_ERROR("unexpected condition", K(*it));
|
||||
} else if (is_virtual_tenant_id((*it)->id())) {
|
||||
// do nothing
|
||||
|
@ -195,6 +195,7 @@ void ObPxPools::mtl_stop(ObPxPools *&pools)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
if (OB_ISNULL(pools)) {
|
||||
// ignore ret
|
||||
// pools will be null if it's creating tenant and failed.
|
||||
LOG_WARN("pools is null");
|
||||
} else {
|
||||
|
@ -226,19 +226,19 @@ int ObTenantConfigMgr::refresh_tenants(const ObIArray<uint64_t> &tenants)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int tmp_ret = OB_SUCCESS;
|
||||
// 加 config
|
||||
for (int i = 0; i < new_tenants.count(); ++i) {
|
||||
if (OB_FAIL(add_tenant_config(new_tenants.at(i)))) {
|
||||
LOG_WARN("fail add tenant config", K(i), K(new_tenants.at(i)), K(ret));
|
||||
if (OB_TMP_FAIL(add_tenant_config(new_tenants.at(i)))) {
|
||||
LOG_WARN("fail add tenant config", K(i), K(new_tenants.at(i)), K(ret), K(tmp_ret));
|
||||
} else {
|
||||
LOG_INFO("add created tenant config succ", K(i), K(new_tenants.at(i)));
|
||||
}
|
||||
}
|
||||
// 删 config
|
||||
for (int i = 0; i < del_tenants.count(); ++i) {
|
||||
if (OB_FAIL(del_tenant_config(del_tenants.at(i)))) {
|
||||
LOG_WARN("fail del tenant config, will try later", K(i), K(del_tenants.at(i)), K(ret));
|
||||
if (OB_TMP_FAIL(del_tenant_config(del_tenants.at(i)))) {
|
||||
LOG_WARN("fail del tenant config, will try later", K(i), K(del_tenants.at(i)), K(ret), K(tmp_ret));
|
||||
} else {
|
||||
LOG_INFO("del dropped tenant config succ.", K(i), K(del_tenants.at(i)));
|
||||
}
|
||||
|
@ -622,11 +622,13 @@ int ObTenantNodeBalancer::refresh_tenant(TenantUnits &units)
|
||||
omt_->set_synced();
|
||||
}
|
||||
|
||||
if (OB_FAIL(check_del_tenants(local_units, units))) { // overwrite ret
|
||||
if (OB_FAIL(check_del_tenants(local_units, units))) {
|
||||
// overwrite ret
|
||||
LOG_WARN("check delete tenant fail", K(ret));
|
||||
}
|
||||
|
||||
if (OB_FAIL(refresh_hidden_sys_memory())) { // overwrite ret
|
||||
if (OB_FAIL(refresh_hidden_sys_memory())) {
|
||||
// overwrite ret
|
||||
LOG_WARN("refresh hidden sys memory failed", K(ret));
|
||||
}
|
||||
}
|
||||
|
@ -324,7 +324,8 @@ private:
|
||||
#define PRINT_WRAPPER KR(ret), K(MTL_ID()), K(table), K(condition)
|
||||
int ret = common::OB_SUCCESS;
|
||||
if (OB_ISNULL(GCTX.sql_proxy_)) {
|
||||
OB_LOG_(WARN, "GCTX.sql_proxy_ is null");
|
||||
ret = OB_NULL_CHECK_ERROR;
|
||||
OB_LOG_(WARN, "GCTX.sql_proxy_ is null", K(ret));
|
||||
} else {
|
||||
HEAP_VAR(ObMySQLProxy::MySQLResult, res) {
|
||||
common::sqlclient::ObMySQLResult *result = nullptr;
|
||||
@ -371,6 +372,7 @@ private:
|
||||
#define PRINT_WRAPPER KR(ret), K(MTL_ID()), K(table), K(condition)
|
||||
int ret = common::OB_SUCCESS;
|
||||
if (OB_ISNULL(GCTX.sql_proxy_)) {
|
||||
ret = OB_NULL_CHECK_ERROR;
|
||||
OB_LOG_(WARN, "GCTX.sql_proxy_ is null");
|
||||
} else {
|
||||
HEAP_VAR(ObMySQLProxy::MySQLResult, res) {
|
||||
|
@ -559,7 +559,8 @@ void ObRatelimitMgr::calculate_s2r_max_bw(ObRegionBwStat *region_bw_stat)
|
||||
if (IS_NOT_INIT) {
|
||||
OB_LOG(ERROR, "ObRatelimitMgr not inited.");
|
||||
} else if (OB_ISNULL(region_bw_stat)) {
|
||||
OB_LOG(ERROR, "invalid argument", KP(region_bw_stat));
|
||||
ret = OB_INVALID_ARGUMENT;
|
||||
OB_LOG(ERROR, "invalid argument", KP(region_bw_stat), K(ret));
|
||||
} else if (OB_FAIL(net_->get_easy_region_latest_bw(region_bw_stat->region_.ptr(),
|
||||
&(region_bw_stat->local_server_cur_bw_),
|
||||
&(region_bw_stat->local_server_max_bw_)))) {
|
||||
|
@ -206,6 +206,7 @@ int ObCgroupCtrl::recursion_remove_group_(const char *curr_path)
|
||||
}
|
||||
}
|
||||
if (OB_FAIL(remove_dir_(curr_path))) {
|
||||
// ignore ret
|
||||
LOG_WARN("remove sub group directory failed", K(ret), K(curr_path));
|
||||
} else {
|
||||
LOG_INFO("remove sub group directory success", K(curr_path));
|
||||
|
@ -418,11 +418,13 @@ int ObAsyncRpcProxy<PC, RpcArg, RpcResult, Func, RpcProxy>::wait(
|
||||
const int rc = cb->get_ret_code();
|
||||
if (common::OB_SUCCESS != rc) {
|
||||
if (index <= (args_.count() -1)) {
|
||||
// ignore ret
|
||||
RPC_LOG(WARN, "execute rpc failed", K(rc), "server", cb->get_dst(), "timeout", cb->get_timeout(),
|
||||
"packet code", PC, "arg", args_.at(index));
|
||||
"packet code", PC, "arg", args_.at(index), K(ret));
|
||||
} else {
|
||||
// ignore ret
|
||||
RPC_LOG(WARN, "execute rpc failed and args_ count is not correct", K(rc), "server", cb->get_dst(), "timeout", cb->get_timeout(),
|
||||
"packet code", PC, K(args_.count()), K(index));
|
||||
"packet code", PC, K(args_.count()), K(index), K(ret));
|
||||
}
|
||||
}
|
||||
if (NULL != return_code_array) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user