From: Sage Weil Date: Wed, 12 Jun 2019 21:47:29 +0000 (-0500) Subject: osdc/Objecter: don't worry about gap_removed_snaps from map gaps X-Git-Tag: v15.1.0~2308^2~14 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=d3d06bcd7c1230e8f4d49a0dafa7b32d3860f39a;p=ceph-ci.git osdc/Objecter: don't worry about gap_removed_snaps from map gaps This was an attempt to ensure that we didn't let removed_snaps slip by when we had a discontiguous stream of OSDMaps. In octopus, this can still happen, but it's mostly harmless--the OSDs will periodically scrub to clean up any resulting stray clones. It's not worth the complexity. Signed-off-by: Sage Weil --- diff --git a/src/osdc/Objecter.cc b/src/osdc/Objecter.cc index 256b2d6918c..edca8255bbd 100644 --- a/src/osdc/Objecter.cc +++ b/src/osdc/Objecter.cc @@ -1035,8 +1035,7 @@ void Objecter::_scan_requests( map& need_resend, list& need_resend_linger, map& need_resend_command, - shunique_lock& sul, - const mempool::osdmap::map *gap_removed_snaps) + shunique_lock& sul) { ceph_assert(sul.owns_lock() && sul.mutex() == &rwlock); @@ -1086,9 +1085,6 @@ void Objecter::_scan_requests( ++p; // check_op_pool_dne() may touch ops; prevent iterator invalidation ldout(cct, 10) << " checking op " << op->tid << dendl; _prune_snapc(osdmap->get_new_removed_snaps(), op); - if (skipped_map) { - _prune_snapc(*gap_removed_snaps, op); - } bool force_resend_writes = cluster_full; if (pool_full_map) force_resend_writes = force_resend_writes || @@ -1240,21 +1236,16 @@ void Objecter::handle_osd_map(MOSDMap *m) // check all outstanding requests on every epoch for (auto& i : need_resend) { _prune_snapc(osdmap->get_new_removed_snaps(), i.second); - if (skipped_map) { - _prune_snapc(m->gap_removed_snaps, i.second); - } } _scan_requests(homeless_session, skipped_map, cluster_full, &pool_full_map, need_resend, - need_resend_linger, need_resend_command, sul, - &m->gap_removed_snaps); + need_resend_linger, need_resend_command, sul); for (map::iterator p = osd_sessions.begin(); p != osd_sessions.end(); ) { OSDSession *s = p->second; _scan_requests(s, skipped_map, cluster_full, &pool_full_map, need_resend, - need_resend_linger, need_resend_command, sul, - &m->gap_removed_snaps); + need_resend_linger, need_resend_command, sul); ++p; // osd down or addr change? if (!osdmap->is_up(s->osd) || @@ -1274,8 +1265,7 @@ void Objecter::handle_osd_map(MOSDMap *m) p != osd_sessions.end(); ++p) { OSDSession *s = p->second; _scan_requests(s, false, false, NULL, need_resend, - need_resend_linger, need_resend_command, sul, - nullptr); + need_resend_linger, need_resend_command, sul); } ldout(cct, 3) << "handle_osd_map decoding full epoch " << m->get_last() << dendl; @@ -1284,7 +1274,7 @@ void Objecter::handle_osd_map(MOSDMap *m) _scan_requests(homeless_session, false, false, NULL, need_resend, need_resend_linger, - need_resend_command, sul, nullptr); + need_resend_command, sul); } else { ldout(cct, 3) << "handle_osd_map hmm, i want a full map, requesting" << dendl; diff --git a/src/osdc/Objecter.h b/src/osdc/Objecter.h index 0d3b6b1e2b2..b428ecc5217 100644 --- a/src/osdc/Objecter.h +++ b/src/osdc/Objecter.h @@ -2144,8 +2144,7 @@ private: std::map& need_resend, std::list& need_resend_linger, std::map& need_resend_command, - shunique_lock& sul, - const mempool::osdmap::map *gap_removed_snaps); + shunique_lock& sul); int64_t get_object_hash_position(int64_t pool, const std::string& key, const std::string& ns);