[CP] to issue<55208177>:fix fail to execute store routine in standby tenant

This commit is contained in:
hanr881
2024-03-05 09:44:51 +00:00
committed by ob-robot
parent cf66e2cf1f
commit 09286b4e0d
2 changed files with 4 additions and 2 deletions

View File

@ -544,7 +544,7 @@ int ObPLCompiler::update_schema_object_dep_info(ObIArray<ObSchemaObjVersion> &dp
ObMySQLProxy *sql_proxy = nullptr;
ObMySQLTransaction trans;
bool skip = false;
if (GCTX.is_standby_cluster()) {
if (!MTL_TENANT_ROLE_CACHE_IS_PRIMARY()) {
skip = true;
} else if (ObTriggerInfo::is_trigger_package_id(dep_obj_id)) {
if (lib::is_oracle_mode()) {

View File

@ -462,7 +462,9 @@ int ObErrorInfo::delete_error(const IObErrorInfo *info)
{
int ret = OB_SUCCESS;
ObMySQLProxy *sql_proxy = nullptr;
if (OB_ISNULL(sql_proxy = GCTX.sql_proxy_)) {
if (!MTL_TENANT_ROLE_CACHE_IS_PRIMARY()) {
// do nothing
} else if (OB_ISNULL(sql_proxy = GCTX.sql_proxy_)) {
ret = OB_ERR_UNEXPECTED;
} else {
if (OB_FAIL(collect_error_info(info, NULL, true))) {