diff options
Diffstat (limited to 'health/health.c')
-rw-r--r-- | health/health.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/health/health.c b/health/health.c index 1ba644e72c..1c6189ab92 100644 --- a/health/health.c +++ b/health/health.c @@ -501,8 +501,10 @@ static inline int rrdcalc_isrunnable(RRDCALC *rc, time_t now, time_t *next_run) } int update_every = rc->rrdset->update_every; - time_t first = rrdset_first_entry_t(rc->rrdset); - time_t last = rrdset_last_entry_t(rc->rrdset); + rrdset_rdlock(rc->rrdset); + time_t first = rrdset_first_entry_t_nolock(rc->rrdset); + time_t last = rrdset_last_entry_t_nolock(rc->rrdset); + rrdset_unlock(rc->rrdset); if(unlikely(now + update_every < first /* || now - update_every > last */)) { debug(D_HEALTH |