fixed a column of __all_virtual_ha_diagnose display incorrect.

This commit is contained in:
HaHaJeff 2023-05-15 09:11:20 +00:00 committed by ob-robot
parent 8fa5fdc6e7
commit 9c2eb9db5b
4 changed files with 8 additions and 3 deletions

View File

@ -776,7 +776,10 @@ int ObServerLogBlockMgr::get_and_inc_max_block_id_guarded_by_lock_(
if (remove_block) {
block_cnt_in_use_--;
}
OB_ASSERT(block_cnt_in_use_ >= 0);
if (block_cnt_in_use_ < 0) {
CLOG_LOG(ERROR, "block_cnt_in_use_ is smaller than zero, unexpected error, may be in process of restart?",
K(ret), KPC(this), K(block_cnt_in_use_));
}
}
return ret;
}

View File

@ -717,7 +717,7 @@ int ObLogRestoreHandler::get_next_sorted_task(ObFetchLogTask *&task)
return ret;
}
int ObLogRestoreHandler::diagnose(RestoreDiagnoseInfo &diagnose_info)
int ObLogRestoreHandler::diagnose(RestoreDiagnoseInfo &diagnose_info) const
{
int ret = OB_SUCCESS;
diagnose_info.restore_context_info_.reset();

View File

@ -231,7 +231,7 @@ public:
// other code unexpected ret_code
int get_next_sorted_task(ObFetchLogTask *&task);
bool restore_to_end() const;
int diagnose(RestoreDiagnoseInfo &diagnose_info);
int diagnose(RestoreDiagnoseInfo &diagnose_info) const;
int get_ls_restore_status_info(RestoreStatusInfo &restore_status_info);
TO_STRING_KV(K_(is_inited), K_(is_in_stop_state), K_(id), K_(proposal_id), K_(role), KP_(parent), K_(context), K_(restore_context));

View File

@ -1797,6 +1797,8 @@ int ObLS::diagnose(DiagnoseInfo &info) const
STORAGE_LOG(WARN, "diagnose log handler failed", K(ret), K(ls_id));
} else if (OB_FAIL(log_handler_.diagnose_palf(info.palf_diagnose_info_))) {
STORAGE_LOG(WARN, "diagnose palf failed", K(ret), K(ls_id));
} else if (OB_FAIL(restore_handler_.diagnose(info.restore_diagnose_info_))) {
STORAGE_LOG(WARN, "diagnose restore_handler failed", K(ret), K(ls_id), K(info));
} else if (info.is_role_sync()) {
// 角色同步时不需要诊断role change service
info.rc_diagnose_info_.state_ = logservice::TakeOverState::TAKE_OVER_FINISH;