From 8167156cf561a46d3534dc4bd12d1744f5be3c08 Mon Sep 17 00:00:00 2001 From: hohice Date: Mon, 16 May 2022 21:54:33 +0800 Subject: [PATCH] Replica cache fix (#854) * prepare replica type cache update * repare replica cache --- src/storage/ob_pg_storage.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/storage/ob_pg_storage.cpp b/src/storage/ob_pg_storage.cpp index 18754b82b1..3d4d5f7825 100644 --- a/src/storage/ob_pg_storage.cpp +++ b/src/storage/ob_pg_storage.cpp @@ -2342,7 +2342,8 @@ int ObPGStorage::set_pg_replica_type(const ObReplicaType& replica_type, const bo } } switch_meta_(next_meta_ptr); - LOG_INFO("succeed to set replica type", K(*meta_)); + ATOMIC_STORE(&cached_replica_type_, replica_type); + LOG_INFO("succeed to set replica type", K(*meta_), K(cached_replica_type_)); if (need_clean_memtable) { pg_memtable_mgr_.clean_memtables(); -- GitLab