diff options
author | Costa Tsaousis <costa@netdata.cloud> | 2022-10-31 14:50:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-31 14:50:19 +0200 |
commit | a1a4cb2314fea3b6786870d875c312909d32b76f (patch) | |
tree | a257fd068390397812593cb1bec0d383e471811c /database | |
parent | 5847f56e490c11b9ca37cf9ddc05ed3241a8689f (diff) |
do not free hosts if a change on db mode is not needed (#13912)
Diffstat (limited to 'database')
-rw-r--r-- | database/rrdhost.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/database/rrdhost.c b/database/rrdhost.c index 3bde0ee178..5fc1021388 100644 --- a/database/rrdhost.c +++ b/database/rrdhost.c @@ -631,7 +631,7 @@ RRDHOST *rrdhost_find_or_create( rrd_wrlock(); RRDHOST *host = rrdhost_find_by_guid(guid); - if (unlikely(host && RRD_MEMORY_MODE_DBENGINE != mode && rrdhost_flag_check(host, RRDHOST_FLAG_ARCHIVED))) { + if (unlikely(host && host->rrd_memory_mode != mode && rrdhost_flag_check(host, RRDHOST_FLAG_ARCHIVED))) { /* If a legacy memory mode instantiates all dbengine state must be discarded to avoid inconsistencies */ error("Archived host '%s' has memory mode '%s', but the wanted one is '%s'. Discarding archived state.", rrdhost_hostname(host), rrd_memory_mode_name(host->rrd_memory_mode), rrd_memory_mode_name(mode)); |