From d8655c08ab51e2c5b1437c7a46498d5450a1bac0 Mon Sep 17 00:00:00 2001 From: Radoslaw Zarzynski Date: Mon, 29 Aug 2022 10:52:05 +0000 Subject: [PATCH] crimson/osd: drop the OSDMap caching from PG `PG` directly aggregates both `OSDMap` and `PeeringState` which maintains its own `OSDMap` instance. This duplication leads to issues as the `PG::osdmap` never gets updated. Signed-off-by: Radoslaw Zarzynski --- src/crimson/osd/pg.cc | 1 - src/crimson/osd/pg.h | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/crimson/osd/pg.cc b/src/crimson/osd/pg.cc index 13e87652671b4..3d5bb20d408b3 100644 --- a/src/crimson/osd/pg.cc +++ b/src/crimson/osd/pg.cc @@ -110,7 +110,6 @@ PG::PG( pgmeta_oid{pgid.make_pgmeta_oid()}, osdmap_gate("PG::osdmap_gate"), shard_services{shard_services}, - osdmap{osdmap}, backend( PGBackend::create( pgid.pgid, diff --git a/src/crimson/osd/pg.h b/src/crimson/osd/pg.h index 3a749df512c9a..46a08c6202942 100644 --- a/src/crimson/osd/pg.h +++ b/src/crimson/osd/pg.h @@ -590,10 +590,9 @@ private: PG_OSDMapGate osdmap_gate; ShardServices &shard_services; - cached_map_t osdmap; public: - cached_map_t get_osdmap() { return osdmap; } + cached_map_t get_osdmap() { return peering_state.get_osdmap(); } eversion_t next_version() { return eversion_t(get_osdmap_epoch(), ++projected_last_update.version); -- 2.39.5