From 0ef38e96904e5b8c79b1800a0a0330407c43eddd Mon Sep 17 00:00:00 2001 From: Peter Stamfest Date: Mon, 3 Mar 2014 01:01:46 +0100 Subject: [PATCH] skip populating values for just added DS --- src/rrd_modify.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/rrd_modify.c b/src/rrd_modify.c index 6647d60c..9d16476f 100644 --- a/src/rrd_modify.c +++ b/src/rrd_modify.c @@ -299,6 +299,9 @@ static int populate_row(const rrd_t *in_rrd, int in_k = ds_map ? ds_map[k] : k; + // if the DS was just added we have no pre-existing data anyway, so skip + if (in_k < 0) continue; + for (cand_row = cand_row_start, ci = 0 ; ci < cand_rows ; ci++, cand_row = (cand_row + 1) % r->row_cnt) -- 2.47.3