From: Radoslaw Zarzynski Date: Mon, 29 Aug 2022 10:52:05 +0000 (+0000) Subject: crimson/osd: drop the OSDMap caching from PG X-Git-Tag: v18.1.0~54^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F51675%2Fhead;p=ceph.git 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 (cherry picked from commit d8655c08ab51e2c5b1437c7a46498d5450a1bac0) --- diff --git a/src/crimson/osd/pg.cc b/src/crimson/osd/pg.cc index e0ef06c76733..667c6e14d61b 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 6a0b198972fe..68f46469d36f 100644 --- a/src/crimson/osd/pg.h +++ b/src/crimson/osd/pg.h @@ -598,10 +598,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);