Code

rrdtool and rrdcached plugins: Don't update the file if ...
authorFlorian Forster <octo@collectd.org>
Mon, 25 Feb 2013 20:08:15 +0000 (21:08 +0100)
committerFlorian Forster <octo@collectd.org>
Mon, 25 Feb 2013 20:08:15 +0000 (21:08 +0100)
... it is being created asynchronously.

src/rrdcached.c
src/rrdtool.c

index a37b4b507ff24fe4904cac5514979eac0760b8de..0a9803599520425bd3c640abf5ec1141939379e2 100644 (file)
@@ -463,6 +463,8 @@ static int rc_write (const data_set_t *ds, const value_list_t *vl,
             filename);
         return (-1);
       }
+      else if (rrdcreate_config.async)
+        return (0);
     }
   }
 
index a673879b10e986ccbfebbecfb07f0dc8513f3dcd..e7c48c0e7ee7baf1b2fbed4a7dc668e50acfcb70 100644 (file)
@@ -913,6 +913,8 @@ static int rrd_write (const data_set_t *ds, const value_list_t *vl,
                                        ds, vl, &rrdcreate_config);
                        if (status != 0)
                                return (-1);
+                       else if (rrdcreate_config.async)
+                               return (0);
                }
                else
                {