Fix the problem that restore proxy connect to oracle sys database failed when part of the observers are inactive

This commit is contained in:
obdev
2023-05-25 14:40:57 +00:00
committed by ob-robot
parent 10925c4366
commit ed21e5ac27
5 changed files with 281 additions and 2 deletions

View File

@ -887,7 +887,11 @@ void ObRecoveryLSService::try_update_primary_ip_list()
LOG_WARN("get servcie attr password failed", K(service_attr));
} else if (OB_FAIL(service_attr.get_user_str_(user_and_tenant))) {
LOG_WARN("get user str failed", K(service_attr.user_.user_name_), K(service_attr.user_.tenant_name_));
} else if (OB_FAIL(proxy.try_init(tenant_id_/*standby*/, service_attr.addr_, user_and_tenant.ptr(), passwd))) {
} else if (OB_FAIL(proxy.init(tenant_id_/*standby*/,
service_attr.addr_,
user_and_tenant.ptr(),
passwd,
service_attr.user_.mode_ == ObCompatibilityMode::MYSQL_MODE ? OB_SYS_DATABASE_NAME : OB_ORA_SYS_SCHEMA_NAME))) {
LOG_WARN("proxy fail to connect to primary", K_(tenant_id), K(service_attr.addr_), K(user_and_tenant));
bool cur_primary_state = false;
if (cur_primary_state != primary_is_avaliable_) {