From f0726b6b6cba0d44b35193182bbf792f6b24ac98 Mon Sep 17 00:00:00 2001 From: zs0 Date: Tue, 27 Jul 2021 14:45:14 +0800 Subject: [PATCH] create pg failed --- deps/oblib/src/lib/utility/ob_tracepoint.h | 2 ++ src/observer/ob_partition_table_updater.cpp | 6 +++++- src/observer/ob_service.cpp | 7 ++++++- src/rootserver/ob_ddl_service.cpp | 7 ++++++- src/share/ob_debug_sync_point.h | 1 + 5 files changed, 20 insertions(+), 3 deletions(-) diff --git a/deps/oblib/src/lib/utility/ob_tracepoint.h b/deps/oblib/src/lib/utility/ob_tracepoint.h index 16419c927..b827dc96d 100644 --- a/deps/oblib/src/lib/utility/ob_tracepoint.h +++ b/deps/oblib/src/lib/utility/ob_tracepoint.h @@ -483,6 +483,8 @@ public: EN_CLOG_DUMP_ILOG_MEMSTORE_RENAME_FAILURE = 267, EN_CLOG_ILOG_MEMSTORE_ALLOC_MEMORY_FAILURE = 268, + EN_PREVENT_SYNC_REPORT = 360, + EN_PREVENT_ASYNC_REPORT = 361, EVENT_TABLE_MAX = SIZE_OF_EVENT_TABLE }; diff --git a/src/observer/ob_partition_table_updater.cpp b/src/observer/ob_partition_table_updater.cpp index 9ec089048..728cc32a5 100644 --- a/src/observer/ob_partition_table_updater.cpp +++ b/src/observer/ob_partition_table_updater.cpp @@ -634,7 +634,11 @@ int ObPartitionTableUpdater::batch_process_tasks(const ObIArray& bool skip_to_reput_tasks = false; const int64_t start_time = ObTimeUtility::current_time(); ObCurTraceId::init(GCONF.self_addr_); - if (OB_ISNULL(GCTX.pt_operator_) || OB_ISNULL(GCTX.ob_service_)) { + if (OB_SUCC(ret)) { + ret = E(EventTable::EN_PREVENT_ASYNC_REPORT) OB_SUCCESS; + } + if (OB_FAIL(ret)) { + } else if (OB_ISNULL(GCTX.pt_operator_) || OB_ISNULL(GCTX.ob_service_)) { ret = OB_ERR_UNEXPECTED; LOG_WARN("invalid argument", K(GCTX.pt_operator_)); } else if (OB_UNLIKELY(batch_tasks.count() <= 0)) { diff --git a/src/observer/ob_service.cpp b/src/observer/ob_service.cpp index 217f85890..159654ebb 100644 --- a/src/observer/ob_service.cpp +++ b/src/observer/ob_service.cpp @@ -1497,7 +1497,12 @@ int ObService::sync_report_replica_info( { int ret = OB_SUCCESS; - if (OB_ISNULL(gctx_.sql_proxy_)) { + DEBUG_SYNC(SYNC_REPORT); + if (OB_SUCC(ret)) { + ret = E(EventTable::EN_PREVENT_SYNC_REPORT) OB_SUCCESS; + } + if (OB_FAIL(ret)) { + } else if (OB_ISNULL(gctx_.sql_proxy_)) { ret = OB_ERR_UNEXPECTED; LOG_WARN("sql proxy is null", KR(ret)); } else { diff --git a/src/rootserver/ob_ddl_service.cpp b/src/rootserver/ob_ddl_service.cpp index 8dcc7a520..4b4585820 100644 --- a/src/rootserver/ob_ddl_service.cpp +++ b/src/rootserver/ob_ddl_service.cpp @@ -6636,7 +6636,12 @@ int ObDDLService::binding_table_partitions(const share::schema::ObTableSchema& t int64_t part_cnt = -1; common::ObPGKey pg_key; if (OB_FAIL(pg_info.get_partition_cnt(part_cnt))) { - LOG_WARN("fail to get partition cnt", K(ret)); + if (OB_PARTITION_NOT_EXIST == ret) { + ret = OB_SUCCESS; + // because of don't wait leader, here maybe all replica is FLAG_REPLICA + } else { + LOG_WARN("fail to get partition cnt", KR(ret)); + } } else if (OB_FAIL(pg_key.init(pg_info.get_table_id(), pg_info.get_partition_id(), part_cnt))) { LOG_WARN("fail to init pg key", K(ret)); } else if (OB_FAIL(pg_info.find_leader_v2(leader_replica))) { diff --git a/src/share/ob_debug_sync_point.h b/src/share/ob_debug_sync_point.h index 1dffd9830..b060c5946 100644 --- a/src/share/ob_debug_sync_point.h +++ b/src/share/ob_debug_sync_point.h @@ -270,6 +270,7 @@ class ObString; ACT(SLOW_TXN_DURING_2PC_COMMIT_PHASE_FOR_PHYSICAL_BACKUP_1055, ) \ ACT(BEFORE_FORCE_DROP_SCHEMA, ) \ ACT(BLOCK_CLOG_PRIMARY_RECONFIRM,) \ + ACT(SYNC_REPORT, ) \ ACT(MAX_DEBUG_SYNC_POINT, ) DECLARE_ENUM(ObDebugSyncPoint, debug_sync_point, OB_DEBUG_SYNC_POINT_DEF); -- GitLab