reset return code to TIMEOUT, to prevent the error code which not user unfriendly

This commit is contained in:
obdev
2023-06-16 04:42:23 +00:00
committed by ob-robot
parent 5008e20ff1
commit 3340486d7a

View File

@ -138,6 +138,11 @@ int ObPrimaryStandbyService::switch_tenant(const obrpc::ObSwitchTenantArg &arg)
LOG_USER_ERROR(OB_OP_NOT_ALLOW, "tenant status is not normal, switch tenant is");
}
// reset return code to TIMEOUT, to prevent the error code which not user unfriendly
if (THIS_WORKER.is_timeout() && OB_ERR_EXCLUSIVE_LOCK_CONFLICT == ret) {
ret = OB_TIMEOUT;
}
int64_t cost = ObTimeUtility::current_time() - begin_time;
CLUSTER_EVENT_ADD_CONTROL_FINISH(ret, alter_cluster_event,
K(cost),