diff options
author | Costa Tsaousis (ktsaou) <costa@tsaousis.gr> | 2017-01-14 14:19:39 +0200 |
---|---|---|
committer | Costa Tsaousis (ktsaou) <costa@tsaousis.gr> | 2017-01-14 14:19:39 +0200 |
commit | bc4eed99c70910c3b3b86d16a09826885e2e1689 (patch) | |
tree | 26ebf5579307b732645ad5feeacfc6924baa0de5 /src/rrd.c | |
parent | f0c40b331aa4c3c65650cb164c5fb26dbbbc971f (diff) |
ensure the database is always saved on exit
Diffstat (limited to 'src/rrd.c')
-rw-r--r-- | src/rrd.c | 9 |
1 files changed, 1 insertions, 8 deletions
@@ -880,14 +880,7 @@ void rrdset_free_all(void) pthread_rwlock_unlock(&st->rwlock); - if(st->mapped == RRD_MEMORY_MODE_SAVE) { - debug(D_RRD_CALLS, "Saving stats '%s' to '%s'.", st->name, st->cache_filename); - savememory(st->cache_filename, st, st->memsize); - - debug(D_RRD_CALLS, "Unmapping stats '%s'.", st->name); - munmap(st, st->memsize); - } - else if(st->mapped == RRD_MEMORY_MODE_MAP) { + if(st->mapped == RRD_MEMORY_MODE_SAVE || st->mapped == RRD_MEMORY_MODE_MAP) { debug(D_RRD_CALLS, "Unmapping stats '%s'.", st->name); munmap(st, st->memsize); } |