summaryrefslogtreecommitdiffstats
path: root/database/rrdset.c
diff options
context:
space:
mode:
Diffstat (limited to 'database/rrdset.c')
-rw-r--r--database/rrdset.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/database/rrdset.c b/database/rrdset.c
index fb22b38de..e04ffadcc 100644
--- a/database/rrdset.c
+++ b/database/rrdset.c
@@ -1621,7 +1621,7 @@ void rrdset_done(RRDSET *st) {
rrdset_wrlock(st);
for( rd = st->dimensions, last = NULL ; likely(rd) ; ) {
- if(unlikely(rd->last_collected_time.tv_sec + rrdset_free_obsolete_time < now)) {
+ if(unlikely(rrddim_flag_check(rd, RRDDIM_FLAG_OBSOLETE) && (rd->last_collected_time.tv_sec + rrdset_free_obsolete_time < now))) {
info("Removing obsolete dimension '%s' (%s) of '%s' (%s).", rd->name, rd->id, st->name, st->id);
if(likely(rd->rrd_memory_mode == RRD_MEMORY_MODE_SAVE || rd->rrd_memory_mode == RRD_MEMORY_MODE_MAP)) {