[rrd-developers] bad merges

kevin brintnall kbrint at rufus.net
Sun Sep 28 23:04:00 CEST 2008


Tobi,

This patch removes an extra "SIGNALS" section in the rrdcached.pod and
merges "[BUG] fixed hang in flush_file() introduced by per-file flush
condition".  This should apply nicely to trunk.

cheers,
kb

---
diff --git a/doc/rrdcached.pod b/doc/rrdcached.pod
index 8ed2979..c75b9e0 100644
--- a/doc/rrdcached.pod
+++ b/doc/rrdcached.pod
@@ -451,16 +451,6 @@ updates WILL BE LOST>.
 
 =back
 
-=head1 SIGNALS
-
-=over 4
-
-=item SIGINT and SIGTERM
-
-The daemon exits normally on receipt of either of these signals.
-
-=back
-
 =head1 BUGS
 
 No known bugs at the moment.
diff --git a/src/rrd_daemon.c b/src/rrd_daemon.c
index e2330a8..f92de21 100644
--- a/src/rrd_daemon.c
+++ b/src/rrd_daemon.c
@@ -814,10 +814,13 @@ static int flush_file (const char *filename) /* {{{ */
     return (ENOENT);
   }
 
-  /* Enqueue at head */
-  enqueue_cache_item (ci, HEAD);
+  if (ci->values_num > 0)
+  {
+    /* Enqueue at head */
+    enqueue_cache_item (ci, HEAD);
+    pthread_cond_wait(&ci->flushed, &cache_lock);
+  }
 
-  pthread_cond_wait(&ci->flushed, &cache_lock);
   pthread_mutex_unlock(&cache_lock);
 
   return (0);



More information about the rrd-developers mailing list