]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: remove old stats backoff mechanism
authorSage Weil <sage@redhat.com>
Tue, 15 Sep 2015 20:15:29 +0000 (16:15 -0400)
committerSage Weil <sage@redhat.com>
Sat, 14 Nov 2015 03:42:41 +0000 (22:42 -0500)
This would only backoff 2x the configured rate, and is less
robust than the new backoff + decay approach.

Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/OSD.cc
src/osd/OSD.h

index 9130c516fbf988fa6acb6997d79355e76afdb200..e2de5e967cf8409cf0cda7b607a64dff9b600235 100644 (file)
@@ -1568,7 +1568,6 @@ OSD::OSD(CephContext *cct_, ObjectStore *store_,
   debug_drop_pg_create_left(-1),
   stats_ack_timeout(cct->_conf->osd_mon_ack_timeout),
   outstanding_pg_stats(false),
-  timeout_mon_on_pg_stats(true),
   up_thru_wanted(0), up_thru_pending(0),
   requested_full_first(0),
   requested_full_last(0),
@@ -3988,13 +3987,12 @@ void OSD::tick()
 
     // mon report?
     utime_t now = ceph_clock_now(cct);
-    if (outstanding_pg_stats && timeout_mon_on_pg_stats &&
+    if (outstanding_pg_stats &&
        (now - stats_ack_timeout) > last_pg_stats_ack) {
       dout(1) << __func__ << " mon hasn't acked PGStats in "
              << now - last_pg_stats_ack
              << " seconds, reconnecting elsewhere" << dendl;
-      monc->reopen_session(new C_MonStatsAckTimer(this));
-      timeout_mon_on_pg_stats = false;
+      monc->reopen_session();
       last_pg_stats_ack = ceph_clock_now(cct);  // reset clock
       last_pg_stats_sent = utime_t();
       stats_ack_timeout =
index 00ce4b25bd9addfd373140b8ec8942112b8cccf4..b49cf767ce9541e0f99026f8dc29ecf724fab0dd 100644 (file)
@@ -1972,22 +1972,6 @@ protected:
   utime_t last_pg_stats_ack;
   float stats_ack_timeout;
   bool outstanding_pg_stats; // some stat updates haven't been acked yet
-  bool timeout_mon_on_pg_stats;
-  void restart_stats_timer() {
-    Mutex::Locker l(osd_lock);
-    last_pg_stats_ack = ceph_clock_now(cct);
-    timeout_mon_on_pg_stats = true;
-  }
-
-  class C_MonStatsAckTimer : public Context {
-    OSD *osd;
-  public:
-    C_MonStatsAckTimer(OSD *o) : osd(o) {}
-    void finish(int r) {
-      osd->restart_stats_timer();
-    }
-  };
-  friend class C_MonStatsAckTimer;
 
   void do_mon_report();