]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: handle negative decay counter 26232/head
authorPatrick Donnelly <pdonnell@redhat.com>
Sat, 2 Feb 2019 00:00:13 +0000 (16:00 -0800)
committerPatrick Donnelly <pdonnell@redhat.com>
Mon, 4 Mar 2019 18:25:33 +0000 (10:25 -0800)
Problem only exists in Luminous/Mimic.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
src/mds/Beacon.cc

index 7ebd506681a6ca862b3c49924cef621184c8ee7f..0cf8e86eb488f7b6b1796c974fce19c4173c16de 100644 (file)
@@ -28,6 +28,7 @@
 
 #include "Beacon.h"
 
+#include <math.h>
 #include <chrono>
 
 #define dout_context g_ceph_context
@@ -394,7 +395,7 @@ void Beacon::notify_health(MDSRank const *mds)
     std::list<MDSHealthMetric> late_recall_metrics;
     std::list<MDSHealthMetric> large_completed_requests_metrics;
     for (auto& session : sessions) {
-      const uint64_t recall_caps = session->get_recall_caps();
+      const uint64_t recall_caps = fmax(0.0, session->get_recall_caps()); /* In Luminous: decay counter may go negative due to hit */
       if (recall_caps > recall_warning_threshold) {
         dout(2) << "Session " << *session <<
              " is not releasing caps fast enough. Recalled caps at " << recall_caps