]> arthur.barton.de Git - netdata.git/commitdiff
send mis-aligned charts to backends; fixes #1805
authorCosta Tsaousis <costa@tsaousis.gr>
Fri, 17 Feb 2017 14:03:39 +0000 (16:03 +0200)
committerCosta Tsaousis <costa@tsaousis.gr>
Fri, 17 Feb 2017 14:03:39 +0000 (16:03 +0200)
src/backends.c

index 4250e31c4b2d89e95e551680886bfd61fc466d9d..844c334e8df40637c78fe9ea08d5ebd192d86cbb 100644 (file)
@@ -8,9 +8,8 @@ static inline calculated_number backend_calculate_value_from_stored_data(RRDSET
     time_t first_t = rrdset_first_entry_t(st);
     time_t last_t = rrdset_last_entry_t(st);
 
-    if(unlikely(before - after < st->update_every && after != after - after % st->update_every))
-        // when st->update_every is bigger than the frequency we send data to backend
-        // skip the iterations that are not aligned to the database
+    if(unlikely(before < first_t || after > last_t))
+        // the chart has not been updated in the wanted timeframe
         return NAN;
 
     // align the time-frame