From: Sage Weil Date: Mon, 23 Sep 2019 15:39:56 +0000 (-0500) Subject: mon/OSDMonitor: stop recording removed_snaps in mon db X-Git-Tag: v15.1.0~1398^2~6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2435d0c9a5b3ab1f3dc88dbf71d22f945ba5f42f;p=ceph.git mon/OSDMonitor: stop recording removed_snaps in mon db We keep a window of these in the OSDMap; we don't need to duplicate that information in the mon kv store. Nobody ever looks at it! Signed-off-by: Sage Weil --- diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 9b08b0bba7b4..a01eccf9fe25 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -1970,23 +1970,7 @@ void OSDMonitor::encode_pending(MonitorDBStore::TransactionRef t) pending_metadata.clear(); pending_metadata_rm.clear(); - // removed_snaps - for (auto& i : pending_inc.new_removed_snaps) { - { - // all snaps removed this epoch - string k = make_removed_snap_epoch_key(i.first, pending_inc.epoch); - bufferlist v; - encode(i.second, v); - t->put(OSD_SNAP_PREFIX, k, v); - } - for (auto q = i.second.begin(); - q != i.second.end(); - ++q) { - insert_snap_update(false, i.first, q.get_start(), q.get_end(), - pending_inc.epoch, - t); - } - } + // purged_snaps if (tmp.require_osd_release >= ceph_release_t::octopus && !pending_inc.new_purged_snaps.empty()) { // all snaps purged this epoch (across all pools)