diff options
author | Costa Tsaousis <costa@netdata.cloud> | 2023-01-23 16:53:25 +0200 |
---|---|---|
committer | Costa Tsaousis <costa@netdata.cloud> | 2023-01-23 16:53:25 +0200 |
commit | 72150b30408294f141b19afcfb35abd7c34777d8 (patch) | |
tree | e92c8ed1c2fdc45626988c151e8bcb95e5eb7b4a | |
parent | 2c3b940dc23f460226e9b2a6861c214e840044d0 (diff) |
rrddim uuid debug
-rw-r--r-- | database/rrddim.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/database/rrddim.c b/database/rrddim.c index 7f7bf3204e..8b98bbe6a7 100644 --- a/database/rrddim.c +++ b/database/rrddim.c @@ -86,7 +86,9 @@ static void rrddim_insert_callback(const DICTIONARY_ITEM *item __maybe_unused, v rd->rrd_memory_mode = ctr->memory_mode; + bool new_uuid = false; if (unlikely(rrdcontext_find_dimension_uuid(st, rrddim_id(rd), &(rd->metric_uuid)))) { + new_uuid = true; uuid_generate(rd->metric_uuid); bool found_in_sql = false; (void)found_in_sql; @@ -107,6 +109,14 @@ static void rrddim_insert_callback(const DICTIONARY_ITEM *item __maybe_unused, v #endif } + { + char uuid[UUID_STR_LEN]; + uuid_unparse_lower(rd->metric_uuid, uuid); + internal_error(true, "RRDDIM UUID DEBUG: host '%s', chart '%s', dimension '%s', uuid '%s', %s", + rrdhost_hostname(rd->rrdset->rrdhost), rrdset_id(rd->rrdset), rrddim_id(rd), uuid, + new_uuid ? "NEW" : "EXISTING"); + } + // initialize the db tiers { size_t initialized = 0; |