summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 18dc4a8)
raw | patch | inline | side by side (parent: 18dc4a8)
author | Florian Forster <octo@collectd.org> | |
Thu, 25 Jun 2015 20:18:27 +0000 (22:18 +0200) | ||
committer | Florian Forster <octo@collectd.org> | |
Thu, 25 Jun 2015 20:19:57 +0000 (22:19 +0200) |
src/write_redis.c | patch | blob | history |
diff --git a/src/write_redis.c b/src/write_redis.c
index 02663c6609c0d5f1923bb5192e718927782eaaa5..2a6f9124aee0f9a66e3c6a004d8456442d7a067b 100644 (file)
--- a/src/write_redis.c
+++ b/src/write_redis.c
}
rr = redisCommand (node->conn, "ZADD %s %s %s", key, time, value);
- if (rr==NULL)
+ if (rr == NULL)
WARNING("ZADD command error. key:%s message:%s", key, node->conn->errstr);
+ else
+ freeReplyObject (rr);
+ /* TODO(octo): This is more overhead than necessary. Use the cache and
+ * metadata to determine if it is a new metric and call SADD only once for
+ * each metric. */
rr = redisCommand (node->conn, "SADD collectd/values %s", ident);
if (rr==NULL)
WARNING("SADD command error. ident:%s message:%s", ident, node->conn->errstr);
+ else
+ freeReplyObject (rr);
pthread_mutex_unlock (&node->lock);