]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Revert "osd: drop create events based on same_primary_since, not interval"
authorSamuel Just <sjust@redhat.com>
Tue, 22 Mar 2016 21:10:47 +0000 (14:10 -0700)
committerSamuel Just <sjust@redhat.com>
Tue, 22 Mar 2016 21:11:53 +0000 (14:11 -0700)
This is a bit tricky, the history, acting, up, etc, calculated
around project_pg_history aren't necessarily valid unless we are
in the same interval as when the message was sent.  We could work
around that, but I'd rather fix it another way.

This reverts commit f41cb1668672b550baad75bd4cab79258a2af99d.

Signed-off-by: Samuel Just <sjust@redhat.com>
src/osd/OSD.cc
src/osd/OSD.h

index 57242a48b46f8476fa5d539a8c2945e0fc74105a..1bff914749155b98cd93c574bf1340774632b135 100644 (file)
@@ -3409,7 +3409,6 @@ void OSD::handle_pg_peering_evt(
   const pg_history_t& orig_history,
   pg_interval_map_t& pi,
   epoch_t epoch,
-  bool same_primary,
   PG::CephPeeringEvtRef evt)
 {
   if (service.splitting(pgid)) {
@@ -3431,14 +3430,7 @@ void OSD::handle_pg_peering_evt(
     bool valid_history = project_pg_history(
       pgid, history, epoch, up, up_primary, acting, acting_primary);
 
-    if (same_primary && epoch < history.same_primary_since) {
-      dout(10) << "get_or_create_pg " << pgid << " primary changed in "
-              << history.same_primary_since << " (msg from " << epoch << ")"
-              << dendl;
-      return;
-    }
-    if (!valid_history ||
-       (!same_primary && epoch < history.same_interval_since)) {
+    if (!valid_history || epoch < history.same_interval_since) {
       dout(10) << "get_or_create_pg " << pgid << " acting changed in "
               << history.same_interval_since << " (msg from " << epoch << ")"
               << dendl;
@@ -3564,15 +3556,7 @@ void OSD::handle_pg_peering_evt(
   } else {
     // already had it.  did the mapping change?
     PG *pg = _lookup_lock_pg(pgid);
-    if (same_primary && epoch < pg->info.history.same_primary_since) {
-      dout(10) << "get_or_create_pg " << pgid << " primary changed in "
-              << pg->info.history.same_primary_since
-              << " (msg from " << epoch << ")"
-              << dendl;
-      pg->unlock();
-      return;
-    }
-    if (!same_primary && epoch < pg->info.history.same_interval_since) {
+    if (epoch < pg->info.history.same_interval_since) {
       dout(10) << *pg << " get_or_create_pg acting changed in "
               << pg->info.history.same_interval_since
               << " (msg from " << epoch << ")" << dendl;
@@ -7500,7 +7484,6 @@ void OSD::handle_pg_create(OpRequestRef op)
       history,
       pi,
       m->epoch,
-      true,  // same primary, bc this is a create
       PG::CephPeeringEvtRef(
        new PG::CephPeeringEvt(
          m->epoch,
@@ -7733,7 +7716,6 @@ void OSD::handle_pg_notify(OpRequestRef op)
       spg_t(it->first.info.pgid.pgid, it->first.to),
       it->first.info.history, it->second,
       it->first.query_epoch,
-      false, // same interval
       PG::CephPeeringEvtRef(
        new PG::CephPeeringEvt(
          it->first.epoch_sent, it->first.query_epoch,
@@ -7765,7 +7747,6 @@ void OSD::handle_pg_log(OpRequestRef op)
   handle_pg_peering_evt(
     spg_t(m->info.pgid.pgid, m->to),
     m->info.history, m->past_intervals, m->get_epoch(),
-    false, // same interval
     PG::CephPeeringEvtRef(
       new PG::CephPeeringEvt(
        m->get_epoch(), m->get_query_epoch(),
@@ -7799,7 +7780,6 @@ void OSD::handle_pg_info(OpRequestRef op)
     handle_pg_peering_evt(
       spg_t(p->first.info.pgid.pgid, p->first.to),
       p->first.info.history, p->second, p->first.epoch_sent,
-      false, // same interval
       PG::CephPeeringEvtRef(
        new PG::CephPeeringEvt(
          p->first.epoch_sent, p->first.query_epoch,
index d6a8d2dd7ad5308a138393b21b90468f9f9a9e50..cccd0d47f2f89ddcb7663661650ab325ed3035ce 100644 (file)
@@ -1968,7 +1968,6 @@ protected:
     const pg_history_t& orig_history,
     pg_interval_map_t& pi,
     epoch_t epoch,
-    bool same_primary,
     PG::CephPeeringEvtRef evt);
   
   void load_pgs();