author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Wed, 22 Oct 2008 06:02:23 +0000 (06:02 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Wed, 22 Oct 2008 06:02:23 +0000 (06:02 +0000) | ||
commit | 9b0d7fa8730eb00d6cf84aef7bf7f87f16f6d603 | |
tree | 8d306a79ade2e52ed2df3c6777515747d3c84df8 | tree | snapshot |
parent | 8d9e970d9df42e199e0d27b29f5a38a0403046af | commit | diff |
remove_cache_item() did not check whether a file was in queue before
modifying the cache head/tail pointers. Therefore, the process of
flushing old files may perturb the cache_queue_head pointer. This caused
some nodes with CI_FLAGS_IN_QUEUE to be un-linked from the queue list.
Thereafter, they would not be flushed by any periodic process (although
they could be revived with FLUSH or UPDATE). This caused a slow memory
leak for files that are no longer updated. Pending updates for these
"abandoned" files would remain in memory ad infinitum.
With this patch, remove_from_queue() will check that the item is queued
before modifying the head/tail pointers. This restores the intended
behavior.
--kevin
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1626 a5681a0c-68f1-0310-ab6d-d61299d08faa
modifying the cache head/tail pointers. Therefore, the process of
flushing old files may perturb the cache_queue_head pointer. This caused
some nodes with CI_FLAGS_IN_QUEUE to be un-linked from the queue list.
Thereafter, they would not be flushed by any periodic process (although
they could be revived with FLUSH or UPDATE). This caused a slow memory
leak for files that are no longer updated. Pending updates for these
"abandoned" files would remain in memory ad infinitum.
With this patch, remove_from_queue() will check that the item is queued
before modifying the head/tail pointers. This restores the intended
behavior.
--kevin
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1626 a5681a0c-68f1-0310-ab6d-d61299d08faa
program/src/rrd_daemon.c | diff | blob | history |