]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd: drop the OSDMap caching from PG 47637/head
authorRadoslaw Zarzynski <rzarzyns@redhat.com>
Mon, 29 Aug 2022 10:52:05 +0000 (10:52 +0000)
committerRadoslaw Zarzynski <rzarzyns@redhat.com>
Thu, 27 Apr 2023 15:37:01 +0000 (15:37 +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>
src/crimson/osd/pg.cc
src/crimson/osd/pg.h

index 13e87652671b40e69ffe3c9c30fab7fa3d777ea7..3d5bb20d408b33c0b3eb995e3d9a0ac8d8ffe5b8 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 3a749df512c9a5494ea1883babe4156d0a009076..46a08c6202942582e9dbfbea3e3cec163e8662aa 100644 (file)
@@ -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);