]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd: drop the OSDMap caching from PG 51675/head
authorRadoslaw Zarzynski <rzarzyns@redhat.com>
Mon, 29 Aug 2022 10:52:05 +0000 (10:52 +0000)
committerMatan Breizman <mbreizma@redhat.com>
Mon, 22 May 2023 15:50:43 +0000 (15:50 +0000)
`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 <rzarzyns@redhat.com>
(cherry picked from commit d8655c08ab51e2c5b1437c7a46498d5450a1bac0)

src/crimson/osd/pg.cc
src/crimson/osd/pg.h

index e0ef06c767337387bd35cbe932b6ffaddc7b0ea9..667c6e14d61b65a37f5ba2dd6d33321f48240c65 100644 (file)
@@ -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,
index 6a0b198972fec30e69c3ec01d4e2d44c5f5d86d0..68f46469d36f0a8464a042e278be85bb6e5aea01 100644 (file)
@@ -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);