From f922c934ade661b38047d405cb2b065152d6a526 Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Sat, 5 Jul 2014 10:25:31 +0200 Subject: [PATCH] store: Reduce logging about "old" values. Don't log, if the same timestamp was used to submit the value. This avoids excessive noise in the logs on high sampling rates. --- src/core/store.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/core/store.c b/src/core/store.c index 605dfc0..49aaeb2 100644 --- a/src/core/store.c +++ b/src/core/store.c @@ -253,7 +253,7 @@ store_obj(sdb_llist_t *parent_list, int type, const char *name, old = STORE_OBJ(sdb_llist_search_by_name(parent_list, name)); if (old) { - if (old->last_update >= last_update) { + if (old->last_update > last_update) { sdb_log(SDB_LOG_DEBUG, "store: Cannot update %s '%s' - " "value too old (%"PRIscTIME" < %"PRIscTIME")", SDB_STORE_TYPE_TO_NAME(type), name, @@ -262,6 +262,11 @@ store_obj(sdb_llist_t *parent_list, int type, const char *name, * backends */ status = 1; } + else if (old->last_update == last_update) { + /* don't report an error and also don't even log this to avoid + * excessive noise on high sampling frequencies */ + status = 1; + } else { sdb_time_t interval = last_update - old->last_update; old->last_update = last_update; -- 2.30.2