]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/OSDMonitor: remove pending_pseudo_purged_snaps 54024/head
authorMatan Breizman <mbreizma@redhat.com>
Sun, 15 Oct 2023 14:28:53 +0000 (14:28 +0000)
committerMatan Breizman <mbreizma@redhat.com>
Sun, 15 Oct 2023 14:30:51 +0000 (14:30 +0000)
pending_pseudo_purged_snaps was introduced in order to avoid discontinuity in the purged_snap monitor entries.
After this change there shouldn't be any discontinuity in the first place.

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
src/mon/OSDMonitor.cc
src/mon/OSDMonitor.h

index ac6a3f4466c28b1f23cc69834ff0027e522962c6..d7e67e49103fac23f44fb8accd62b4ba1b554c8c 100644 (file)
@@ -1162,7 +1162,6 @@ void OSDMonitor::create_pending()
   pending_inc.fsid = mon.monmap->fsid;
   pending_metadata.clear();
   pending_metadata_rm.clear();
-  pending_pseudo_purged_snaps.clear();
 
   dout(10) << "create_pending e " << pending_inc.epoch << dendl;
 
@@ -2066,13 +2065,6 @@ void OSDMonitor::encode_pending(MonitorDBStore::TransactionRef t)
                                t);
     }
   }
-  for (auto& [pool, snaps] : pending_pseudo_purged_snaps) {
-    for (auto snap : snaps) {
-      insert_purged_snap_update(pool, snap, snap + 1,
-                               pending_inc.epoch,
-                               t);
-    }
-  }
 
   // health
   health_check_map_t next;
@@ -14303,10 +14295,6 @@ bool OSDMonitor::prepare_pool_op(MonOpRequestRef op)
        m->snapid,
        osdmap.require_osd_release < ceph_release_t::octopus);
       pending_inc.new_removed_snaps[m->pool].insert(m->snapid);
-      // also record the new seq as purged: this avoids a discontinuity
-      // after all of the snaps have been purged, since the seq assigned
-      // during removal lives in the same namespace as the actual snaps.
-      pending_pseudo_purged_snaps[m->pool].insert(pp.get_snap_seq());
       changed = true;
     }
     break;
index 3f6226c057a19e67fb78892ab9465be29204f5f3..08aa4f61783b2bbf67aa0755c7be86ee8ee9264a 100644 (file)
@@ -217,7 +217,6 @@ public:
   std::map<int, failure_info_t> failure_info;
   std::map<int,utime_t>    down_pending_out;  // osd down -> out
   bool priority_convert = false;
-  std::map<int64_t,std::set<snapid_t>> pending_pseudo_purged_snaps;
   std::shared_ptr<PriorityCache::PriCache> rocksdb_binned_kv_cache = nullptr;
   std::shared_ptr<PriorityCache::Manager> pcm = nullptr;
   ceph::mutex balancer_lock = ceph::make_mutex("OSDMonitor::balancer_lock");