send mis-aligned charts to backends; fixes #1805
Costa Tsaousis committed
Feb 17, 2017 at 16:03 UTC
07fa57ac884f0581e4f4759bf75bff05d867ce4e
1 file changed
+2
-3
src/backends.c
+2
-3
@@ -8,9 +8,8 @@ static inline calculated_number backend_calculate_value_from_stored_data(RRDSET
8
time_t first_t = rrdset_first_entry_t(st);
9
time_t last_t = rrdset_last_entry_t(st);
10
11
- if(unlikely(before - after < st->update_every && after != after - after % st->update_every))
12
- // when st->update_every is bigger than the frequency we send data to backend
13
- // skip the iterations that are not aligned to the database
11
+ if(unlikely(before < first_t || after > last_t))
12
+ // the chart has not been updated in the wanted timeframe
13
return NAN;
14
15
// align the time-frame