]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: quick start if no update in a long period 14176/head
authorMingxin Liu <mingxin@xsky.com>
Wed, 22 Mar 2017 09:07:37 +0000 (17:07 +0800)
committerMingxin Liu <mingxin@xsky.com>
Thu, 18 May 2017 16:00:08 +0000 (00:00 +0800)
Signed-off-by: Mingxin Liu <mingxin@xsky.com>
src/mon/PGMap.cc

index 8b4a1010ab265e611a2330e738df6812c5565aff..b0a0523c600d5a37862facc97b6f560953e8de07 100644 (file)
@@ -1514,7 +1514,11 @@ void PGMap::update_delta(CephContext *cct,
   delta_t -= *last_ts;  // take the last timestamp we saw
   *last_ts = ts;        // @p ts becomes the last timestamp we saw
 
-  // calculate a delta, and average over the last 2 deltas.
+  // adjust delta_t, quick start if there is no update in a long period
+  delta_t = std::min(delta_t,
+                    utime_t(2 * (cct ? cct->_conf->mon_delta_reset_interval : 10), 0));
+
+  // calculate a delta, and average over the last 6 deltas by default.
   /* start by taking a copy of our current @p result_pool_sum, and by
    * taking out the stats from @p old_pool_sum.  This generates a stats
    * delta.  Stash this stats delta in @p delta_avg_list, along with the