diff --git a/src/storage/ob_pg_storage.cpp b/src/storage/ob_pg_storage.cpp index 18754b82b1ae9df130d71f0261bc616acdd24f7a..3d4d5f78252bbb0bad1965268706e2b125570c16 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();