]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
osdc/Objecter: don't worry about gap_removed_snaps from map gaps
authorSage Weil <sage@redhat.com>
Wed, 12 Jun 2019 21:47:29 +0000 (16:47 -0500)
committerSage Weil <sage@redhat.com>
Tue, 2 Jul 2019 13:37:51 +0000 (08:37 -0500)
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 <sage@redhat.com>
src/osdc/Objecter.cc
src/osdc/Objecter.h

index 256b2d6918ca11b82d63be7ea412c5b59ea155af..edca8255bbd66b06dfac5aa2b00fb80ee06cc806 100644 (file)
@@ -1035,8 +1035,7 @@ void Objecter::_scan_requests(
   map<ceph_tid_t, Op*>& need_resend,
   list<LingerOp*>& need_resend_linger,
   map<ceph_tid_t, CommandOp*>& need_resend_command,
-  shunique_lock& sul,
-  const mempool::osdmap::map<int64_t,snap_interval_set_t> *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<int,OSDSession*>::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;
index 0d3b6b1e2b28c09d47623c30f5a1a905d1113934..b428ecc52176c8ab5868bd4ba2761ef8706ef59a 100644 (file)
@@ -2144,8 +2144,7 @@ private:
     std::map<ceph_tid_t, Op*>& need_resend,
     std::list<LingerOp*>& need_resend_linger,
     std::map<ceph_tid_t, CommandOp*>& need_resend_command,
-    shunique_lock& sul,
-    const mempool::osdmap::map<int64_t,snap_interval_set_t> *gap_removed_snaps);
+    shunique_lock& sul);
 
   int64_t get_object_hash_position(int64_t pool, const std::string& key,
                                   const std::string& ns);