Drop legacy dbengine support (#17315)
Remove legacy dbengine
Stelios Fragkakis committed
Apr 3, 2024 at 17:02 UTC
0cec40e5252f8a7b1f68ff8ab5a1c4cbf1d8afe6
9 files changed
+101
-224
src/daemon/global_statistics.c
+4
-6
@@ -2562,12 +2562,10 @@ static void dbengine2_statistics_charts(void) {
2562
if(host->db[tier].mode != RRD_MEMORY_MODE_DBENGINE) continue;
2563
if(!host->db[tier].si) continue;
2564
2565
- if(is_storage_engine_shared(host->db[tier].si)) {
2566
- if(counted_multihost_db[tier])
2567
- continue;
2568
- else
2569
- counted_multihost_db[tier] = 1;
2570
- }
2565
+ if(counted_multihost_db[tier])
2566
+ continue;
2567
+ else
2568
+ counted_multihost_db[tier] = 1;
2569
2570
++dbengine_contexts;
2571
rrdeng_get_37_statistics((struct rrdengine_instance *)host->db[tier].si, local_stats_array);
src/database/engine/rrdengine.c
+1
-2
@@ -1366,8 +1366,7 @@ static void *ctx_shutdown_tp_worker(struct rrdengine_instance *ctx __maybe_unuse
1366
if(!logged) {
1367
logged = true;
1368
netdata_log_info("DBENGINE: waiting for %zu inflight queries to finish to shutdown tier %d...",
1369
- __atomic_load_n(&ctx->atomic.inflight_queries, __ATOMIC_RELAXED),
1370
- (ctx->config.legacy) ? -1 : ctx->config.tier);
1369
+ __atomic_load_n(&ctx->atomic.inflight_queries, __ATOMIC_RELAXED), ctx->config.tier);
1370
}
1371
sleep_usec(1 * USEC_PER_MS);
1372
}
src/database/engine/rrdengine.h
-2
@@ -350,8 +350,6 @@ extern rrdeng_stats_t global_flushing_pressure_page_deletions; /* number of dele
350
351
struct rrdengine_instance {
352
struct {
353
- bool legacy; // true when the db is autonomous for a single host
354
-
353
int tier; // the tier of this ctx
354
uint8_t page_type; // default page type for this context
355
src/database/engine/rrdengineapi.c
+17
-36
@@ -98,26 +98,18 @@ void rrdeng_metrics_group_release(STORAGE_INSTANCE *si __maybe_unused, STORAGE_M
98
// metric handle for legacy dbs
99
100
/* This UUID is not unique across hosts */
101
-void rrdeng_generate_legacy_uuid(const char *dim_id, const char *chart_id, uuid_t *ret_uuid)
101
+void rrdeng_generate_unittest_uuid(const char *dim_id, const char *chart_id, uuid_t *ret_uuid)
102
{
103
- EVP_MD_CTX *evpctx;
104
- unsigned char hash_value[EVP_MAX_MD_SIZE];
105
- unsigned int hash_len;
106
-
107
- evpctx = EVP_MD_CTX_create();
108
- EVP_DigestInit_ex(evpctx, EVP_sha256(), NULL);
109
- EVP_DigestUpdate(evpctx, dim_id, strlen(dim_id));
110
- EVP_DigestUpdate(evpctx, chart_id, strlen(chart_id));
111
- EVP_DigestFinal_ex(evpctx, hash_value, &hash_len);
112
- EVP_MD_CTX_destroy(evpctx);
113
- fatal_assert(hash_len > sizeof(uuid_t));
114
- memcpy(ret_uuid, hash_value, sizeof(uuid_t));
103
+ CLEAN_BUFFER *wb = buffer_create(100, NULL);
104
+ buffer_sprintf(wb,"%s.%s", dim_id, chart_id);
105
+ UUID uuid = UUID_generate_from_hash(buffer_tostring(wb), buffer_strlen(wb));
106
+ uuid_copy(*ret_uuid, uuid.uuid);
107
}
108
117
-static METRIC *rrdeng_metric_get_legacy(STORAGE_INSTANCE *si, const char *rd_id, const char *st_id) {
109
+static METRIC *rrdeng_metric_unittest(STORAGE_INSTANCE *si, const char *rd_id, const char *st_id) {
110
struct rrdengine_instance *ctx = (struct rrdengine_instance *)si;
111
uuid_t legacy_uuid;
120
- rrdeng_generate_legacy_uuid(rd_id, st_id, &legacy_uuid);
112
+ rrdeng_generate_unittest_uuid(rd_id, st_id, &legacy_uuid);
113
return mrg_metric_get_and_acquire(main_mrg, &legacy_uuid, (Word_t) ctx);
114
}
115
@@ -165,11 +157,8 @@ STORAGE_METRIC_HANDLE *rrdeng_metric_get_or_create(RRDDIM *rd, STORAGE_INSTANCE
157
metric = mrg_metric_get_and_acquire(main_mrg, &rd->metric_uuid, (Word_t) ctx);
158
159
if(unlikely(!metric)) {
168
- if(unlikely(ctx->config.legacy)) {
169
- // this is a single host database
170
- // generate uuid from the chart and dimensions ids
171
- // and overwrite the one supplied by rrddim
172
- metric = rrdeng_metric_get_legacy(si, rrddim_id(rd), rrdset_id(rd->rrdset));
160
+ if(unlikely(unittest_running)) {
161
+ metric = rrdeng_metric_unittest(si, rrddim_id(rd), rrdset_id(rd->rrdset));
162
if (metric)
163
uuid_copy(rd->metric_uuid, *mrg_metric_uuid(main_mrg, metric));
164
}
@@ -1128,11 +1117,6 @@ void rrdeng_readiness_wait(struct rrdengine_instance *ctx) {
1117
netdata_log_info("DBENGINE: tier %d is ready for data collection and queries", ctx->config.tier);
1118
}
1119
1131
-bool rrdeng_is_legacy(STORAGE_INSTANCE *si) {
1132
- struct rrdengine_instance *ctx = (struct rrdengine_instance *)si;
1133
- return ctx->config.legacy;
1134
-}
1135
-
1120
void rrdeng_exit_mode(struct rrdengine_instance *ctx) {
1121
__atomic_store_n(&ctx->quiesce.exit_mode, true, __ATOMIC_RELAXED);
1122
}
@@ -1159,14 +1143,11 @@ int rrdeng_init(struct rrdengine_instance **ctxp, const char *dbfiles_path,
1143
return UV_EMFILE;
1144
}
1145
1162
- if(NULL == ctxp) {
1146
+ if(ctxp)
1147
+ *ctxp = ctx = callocz(1, sizeof(*ctx));
1148
+ else {
1149
ctx = multidb_ctx[tier];
1150
memset(ctx, 0, sizeof(*ctx));
1165
- ctx->config.legacy = false;
1166
- }
1167
- else {
1168
- *ctxp = ctx = callocz(1, sizeof(*ctx));
1169
- ctx->config.legacy = true;
1151
}
1152
1153
ctx->config.tier = (int)tier;
@@ -1192,7 +1173,7 @@ int rrdeng_init(struct rrdengine_instance **ctxp, const char *dbfiles_path,
1173
return 0;
1174
}
1175
1195
- if (ctx->config.legacy) {
1176
+ if (unittest_running) {
1177
freez(ctx);
1178
if (ctxp)
1179
*ctxp = NULL;
@@ -1223,17 +1204,17 @@ int rrdeng_exit(struct rrdengine_instance *ctx) {
1204
size_t count = 10;
1205
while(__atomic_load_n(&ctx->atomic.collectors_running, __ATOMIC_RELAXED) && count && !unittest_running) {
1206
if(!logged) {
1226
- netdata_log_info("DBENGINE: waiting for collectors to finish on tier %d...", (ctx->config.legacy) ? -1 : ctx->config.tier);
1207
+ netdata_log_info("DBENGINE: waiting for collectors to finish on tier %d...", ctx->config.tier);
1208
logged = true;
1209
}
1210
sleep_usec(100 * USEC_PER_MS);
1211
count--;
1212
}
1213
1233
- netdata_log_info("DBENGINE: flushing main cache for tier %d", (ctx->config.legacy) ? -1 : ctx->config.tier);
1214
+ netdata_log_info("DBENGINE: flushing main cache for tier %d", ctx->config.tier);
1215
pgc_flush_all_hot_and_dirty_pages(main_cache, (Word_t)ctx);
1216
1236
- netdata_log_info("DBENGINE: shutting down tier %d", (ctx->config.legacy) ? -1 : ctx->config.tier);
1217
+ netdata_log_info("DBENGINE: shutting down tier %d", ctx->config.tier);
1218
struct completion completion = {};
1219
completion_init(&completion);
1220
rrdeng_enq_cmd(ctx, RRDENG_OPCODE_CTX_SHUTDOWN, NULL, &completion, STORAGE_PRIORITY_BEST_EFFORT, NULL, NULL);
@@ -1242,7 +1223,7 @@ int rrdeng_exit(struct rrdengine_instance *ctx) {
1223
1224
finalize_rrd_files(ctx);
1225
1245
- if(ctx->config.legacy)
1226
+ if (unittest_running) //(ctx->config.unittest)
1227
freez(ctx);
1228
1229
rrd_stat_atomic_add(&rrdeng_reserved_file_descriptors, -RRDENG_FD_BUDGET_PER_INSTANCE);
src/database/engine/rrdengineapi.h
-3
@@ -24,8 +24,6 @@ extern uint8_t tier_page_type[];
24
25
#define CTX_POINT_SIZE_BYTES(ctx) page_type_size[(ctx)->config.page_type]
26
27
-void rrdeng_generate_legacy_uuid(const char *dim_id, const char *chart_id, uuid_t *ret_uuid);
28
-
27
STORAGE_METRIC_HANDLE *rrdeng_metric_get_or_create(RRDDIM *rd, STORAGE_INSTANCE *si);
28
STORAGE_METRIC_HANDLE *rrdeng_metric_get(STORAGE_INSTANCE *si, uuid_t *uuid);
29
void rrdeng_metric_release(STORAGE_METRIC_HANDLE *smh);
@@ -221,6 +219,5 @@ struct rrdeng_cache_efficiency_stats rrdeng_get_cache_efficiency_stats(void);
219
220
RRDENG_SIZE_STATS rrdeng_size_statistics(struct rrdengine_instance *ctx);
221
size_t rrdeng_collectors_running(struct rrdengine_instance *ctx);
224
-bool rrdeng_is_legacy(STORAGE_INSTANCE *si);
222
223
#endif /* NETDATA_RRDENGINEAPI_H */
src/database/engine/rrdenginelib.c
+2
-62
@@ -76,51 +76,6 @@ int open_file_for_io(char *path, int flags, uv_file *file, int direct)
76
return fd;
77
}
78
79
-int is_legacy_child(const char *machine_guid)
80
-{
81
- uuid_t uuid;
82
- char dbengine_file[FILENAME_MAX+1];
83
-
84
- if (unlikely(!strcmp(machine_guid, "unittest-dbengine") || !strcmp(machine_guid, "dbengine-dataset") ||
85
- !strcmp(machine_guid, "dbengine-stress-test"))) {
86
- return 1;
87
- }
88
- if (!uuid_parse(machine_guid, uuid)) {
89
- uv_fs_t stat_req;
90
- snprintfz(dbengine_file, FILENAME_MAX, "%s/%s/dbengine", netdata_configured_cache_dir, machine_guid);
91
- int rc = uv_fs_stat(NULL, &stat_req, dbengine_file, NULL);
92
- if (likely(rc == 0 && ((stat_req.statbuf.st_mode & S_IFMT) == S_IFDIR))) {
93
- //netdata_log_info("Found legacy engine folder \"%s\"", dbengine_file);
94
- return 1;
95
- }
96
- }
97
- return 0;
98
-}
99
-
100
-int count_legacy_children(char *dbfiles_path)
101
-{
102
- int ret;
103
- uv_fs_t req;
104
- uv_dirent_t dent;
105
- int legacy_engines = 0;
106
-
107
- ret = uv_fs_scandir(NULL, &req, dbfiles_path, 0, NULL);
108
- if (ret < 0) {
109
- uv_fs_req_cleanup(&req);
110
- netdata_log_error("uv_fs_scandir(%s): %s", dbfiles_path, uv_strerror(ret));
111
- return ret;
112
- }
113
-
114
- while(UV_EOF != uv_fs_scandir_next(&req, &dent)) {
115
- if (dent.type == UV_DIRENT_DIR) {
116
- if (is_legacy_child(dent.name))
117
- legacy_engines++;
118
- }
119
- }
120
- uv_fs_req_cleanup(&req);
121
- return legacy_engines;
122
-}
123
-
79
int compute_multidb_diskspace()
80
{
81
char multidb_disk_space_file[FILENAME_MAX + 1];
@@ -139,23 +94,8 @@ int compute_multidb_diskspace()
94
}
95
}
96
142
- if (computed_multidb_disk_quota_mb == -1) {
143
- int rc = count_legacy_children(netdata_configured_cache_dir);
144
- if (likely(rc >= 0)) {
145
- computed_multidb_disk_quota_mb = (rc + 1) * default_rrdeng_disk_quota_mb;
146
- netdata_log_info("Found %d legacy dbengines, setting multidb diskspace to %dMB", rc, computed_multidb_disk_quota_mb);
147
-
148
- fp = fopen(multidb_disk_space_file, "w");
149
- if (likely(fp)) {
150
- fprintf(fp, "%d", computed_multidb_disk_quota_mb);
151
- netdata_log_info("Created file '%s' to store the computed value", multidb_disk_space_file);
152
- fclose(fp);
153
- } else
154
- netdata_log_error("Failed to store the default multidb disk quota size on '%s'", multidb_disk_space_file);
155
- }
156
- else
157
- computed_multidb_disk_quota_mb = default_rrdeng_disk_quota_mb;
158
- }
97
+ if (computed_multidb_disk_quota_mb == -1)
98
+ computed_multidb_disk_quota_mb = default_rrdeng_disk_quota_mb;
99
100
return computed_multidb_disk_quota_mb;
101
}
src/database/engine/rrdenginelib.h
-1
@@ -89,6 +89,5 @@ static inline int open_file_buffered_io(char *path, int flags, uv_file *file)
89
return open_file_for_io(path, flags, file, 0);
90
}
91
int compute_multidb_diskspace();
92
-int is_legacy_child(const char *machine_guid);
92
93
#endif /* NETDATA_RRDENGINELIB_H */
src/database/rrd.h
-1
@@ -1369,7 +1369,6 @@ extern netdata_rwlock_t rrd_rwlock;
1369
1370
// ----------------------------------------------------------------------------
1371
1372
-bool is_storage_engine_shared(STORAGE_INSTANCE *si);
1372
void rrdset_index_init(RRDHOST *host);
1373
void rrdset_index_destroy(RRDHOST *host);
1374
src/database/rrdhost.c
+77
-111
@@ -33,15 +33,6 @@ time_t rrdset_free_obsolete_time_s = 3600;
33
time_t rrdhost_free_orphan_time_s = 3600;
34
time_t rrdhost_free_ephemeral_time_s = 86400;
35
36
-bool is_storage_engine_shared(STORAGE_INSTANCE *si __maybe_unused) {
37
-#ifdef ENABLE_DBENGINE
38
- if(!rrdeng_is_legacy(si))
39
- return true;
40
-#endif
41
-
42
- return false;
43
-}
44
-
36
RRDHOST *find_host_by_node_id(char *node_id) {
37
38
uuid_t node_uuid;
@@ -269,6 +260,70 @@ static void rrdhost_initialize_rrdpush_sender(RRDHOST *host,
260
rrdhost_option_clear(host, RRDHOST_OPTION_SENDER_ENABLED);
261
}
262
263
+//
264
+// true on success
265
+//
266
+static bool create_dbengine_directory(RRDHOST *host, const char *dbenginepath)
267
+{
268
+ int ret = mkdir(dbenginepath, 0775);
269
+ if (ret != 0 && errno != EEXIST) {
270
+ nd_log(NDLS_DAEMON, NDLP_CRIT, "Host '%s': cannot create directory '%s'", rrdhost_hostname(host), dbenginepath);
271
+ return false;
272
+ }
273
+ return true;
274
+}
275
+
276
+static RRDHOST *prepare_host_for_unittest(RRDHOST *host)
277
+{
278
+ char dbenginepath[FILENAME_MAX + 1];
279
+
280
+ if (host->cache_dir)
281
+ freez(host->cache_dir);
282
+
283
+ snprintfz(dbenginepath, FILENAME_MAX, "%s/%s", netdata_configured_cache_dir, host->machine_guid);
284
+ host->cache_dir = strdupz(dbenginepath);
285
+
286
+ int ret = 0;
287
+
288
+ bool initialized;
289
+ if ((initialized = create_dbengine_directory(host, dbenginepath))) {
290
+ snprintfz(dbenginepath, FILENAME_MAX, "%s/dbengine", host->cache_dir);
291
+
292
+ if ((initialized = create_dbengine_directory(host, dbenginepath))) {
293
+ host->db[0].mode = RRD_MEMORY_MODE_DBENGINE;
294
+ host->db[0].eng = storage_engine_get(host->db[0].mode);
295
+ host->db[0].tier_grouping = get_tier_grouping(0);
296
+
297
+ ret = rrdeng_init(
298
+ (struct rrdengine_instance **)&host->db[0].si,
299
+ dbenginepath,
300
+ default_rrdeng_disk_quota_mb,
301
+ 0); // may fail here for legacy dbengine initialization
302
+
303
+ initialized = (ret == 0);
304
+
305
+ if (initialized)
306
+ rrdeng_readiness_wait((struct rrdengine_instance *)host->db[0].si);
307
+ }
308
+ }
309
+
310
+ if (!initialized) {
311
+ nd_log(
312
+ NDLS_DAEMON,
313
+ NDLP_CRIT,
314
+ "Host '%s': cannot initialize host with machine guid '%s'. Failed to initialize DB engine at '%s'.",
315
+ rrdhost_hostname(host),
316
+ host->machine_guid,
317
+ host->cache_dir);
318
+
319
+ rrd_wrlock();
320
+ rrdhost_free___while_having_rrd_wrlock(host, true);
321
+ rrd_unlock();
322
+ return NULL;
323
+ }
324
+ return host;
325
+}
326
+
327
static RRDHOST *rrdhost_create(
328
const char *hostname,
329
const char *registry_hostname,
@@ -302,20 +357,20 @@ static RRDHOST *rrdhost_create(
357
memory_mode = RRD_MEMORY_MODE_ALLOC;
358
}
359
305
-#ifdef ENABLE_DBENGINE
306
- int is_legacy = (memory_mode == RRD_MEMORY_MODE_DBENGINE) && is_legacy_child(guid);
307
-#else
308
-int is_legacy = 1;
309
-#endif
310
-
311
- int is_in_multihost = (memory_mode == RRD_MEMORY_MODE_DBENGINE && !is_legacy);
360
RRDHOST *host = callocz(1, sizeof(RRDHOST));
361
__atomic_add_fetch(&netdata_buffers_statistics.rrdhost_allocations_size, sizeof(RRDHOST), __ATOMIC_RELAXED);
362
363
strncpyz(host->machine_guid, guid, GUID_LEN + 1);
364
317
- set_host_properties(host, (update_every > 0)?update_every:1, memory_mode, registry_hostname, os,
318
- timezone, abbrev_timezone, utc_offset,
365
+ set_host_properties(
366
+ host,
367
+ (update_every > 0) ? update_every : 1,
368
+ memory_mode,
369
+ registry_hostname,
370
+ os,
371
+ timezone,
372
+ abbrev_timezone,
373
+ utc_offset,
374
prog_name,
375
prog_version);
376
@@ -360,28 +415,8 @@ int is_legacy = 1;
415
416
rrdset_index_init(host);
417
363
- char filename[FILENAME_MAX + 1];
418
if(is_localhost)
419
host->cache_dir = strdupz(netdata_configured_cache_dir);
366
- else {
367
- // this is not localhost - append our GUID to localhost path
368
- if (is_in_multihost) { // don't append to cache dir in multihost
369
- host->cache_dir = strdupz(netdata_configured_cache_dir);
370
- }
371
- else {
372
- snprintfz(filename, FILENAME_MAX, "%s/%s", netdata_configured_cache_dir, host->machine_guid);
373
- host->cache_dir = strdupz(filename);
374
- }
375
-
376
- if(host->rrd_memory_mode == RRD_MEMORY_MODE_DBENGINE && is_legacy)
377
- {
378
- int r = mkdir(host->cache_dir, 0775);
379
- if(r != 0 && errno != EEXIST)
380
- nd_log(NDLS_DAEMON, NDLP_CRIT,
381
- "Host '%s': cannot create directory '%s'",
382
- rrdhost_hostname(host), host->cache_dir);
383
- }
384
- }
420
421
// this is also needed for custom host variables - not only health
422
if(!host->rrdvars)
@@ -396,45 +431,10 @@ int is_legacy = 1;
431
432
if (host->rrd_memory_mode == RRD_MEMORY_MODE_DBENGINE) {
433
#ifdef ENABLE_DBENGINE
399
- char dbenginepath[FILENAME_MAX + 1];
400
- int ret;
401
-
402
- snprintfz(dbenginepath, FILENAME_MAX, "%s/dbengine", host->cache_dir);
403
- ret = mkdir(dbenginepath, 0775);
404
-
405
- if (ret != 0 && errno != EEXIST)
406
- nd_log(NDLS_DAEMON, NDLP_CRIT,
407
- "Host '%s': cannot create directory '%s'",
408
- rrdhost_hostname(host), dbenginepath);
409
- else
410
- ret = 0; // succeed
411
-
412
- if (is_legacy) {
413
- // initialize legacy dbengine instance as needed
414
-
415
- host->db[0].mode = RRD_MEMORY_MODE_DBENGINE;
416
- host->db[0].eng = storage_engine_get(host->db[0].mode);
417
- host->db[0].tier_grouping = get_tier_grouping(0);
418
-
419
- ret = rrdeng_init(
420
- (struct rrdengine_instance **)&host->db[0].si,
421
- dbenginepath,
422
- default_rrdeng_disk_quota_mb,
423
- 0); // may fail here for legacy dbengine initialization
424
-
425
- if(ret == 0) {
426
- rrdeng_readiness_wait((struct rrdengine_instance *)host->db[0].si);
427
-
428
- // assign the rest of the shared storage instances to it
429
- // to allow them collect its metrics too
430
-
431
- for(size_t tier = 1; tier < storage_tiers ; tier++) {
432
- host->db[tier].mode = RRD_MEMORY_MODE_DBENGINE;
433
- host->db[tier].eng = storage_engine_get(host->db[tier].mode);
434
- host->db[tier].si = (STORAGE_INSTANCE *) multidb_ctx[tier];
435
- host->db[tier].tier_grouping = get_tier_grouping(tier);
436
- }
437
- }
434
+ if (unittest_running) {
435
+ host = prepare_host_for_unittest(host);
436
+ if (!host)
437
+ return NULL;
438
}
439
else {
440
for(size_t tier = 0; tier < storage_tiers ; tier++) {
@@ -444,19 +444,6 @@ int is_legacy = 1;
444
host->db[tier].tier_grouping = get_tier_grouping(tier);
445
}
446
}
447
-
448
- if (ret) { // check legacy or multihost initialization success
449
- nd_log(NDLS_DAEMON, NDLP_CRIT,
450
- "Host '%s': cannot initialize host with machine guid '%s'. Failed to initialize DB engine at '%s'.",
451
- rrdhost_hostname(host), host->machine_guid, host->cache_dir);
452
-
453
- rrd_wrlock();
454
- rrdhost_free___while_having_rrd_wrlock(host, true);
455
- rrd_unlock();
456
-
457
- return NULL;
458
- }
459
-
447
#else
448
fatal("RRD_MEMORY_MODE_DBENGINE is not supported in this platform.");
449
#endif
@@ -1234,18 +1221,6 @@ void rrdhost_free___while_having_rrd_wrlock(RRDHOST *host, bool force) {
1221
1222
rrdcalc_delete_all(host);
1223
1237
- // ------------------------------------------------------------------------
1238
- // release its children resources
1239
-
1240
-#ifdef ENABLE_DBENGINE
1241
- for(size_t tier = 0; tier < storage_tiers ;tier++) {
1242
- if(host->db[tier].mode == RRD_MEMORY_MODE_DBENGINE
1243
- && host->db[tier].si
1244
- && !is_storage_engine_shared(host->db[tier].si))
1245
- rrdeng_prepare_exit((struct rrdengine_instance *)host->db[tier].si);
1246
- }
1247
-#endif
1248
-
1224
// delete all the RRDSETs of the host
1225
rrdset_index_destroy(host);
1226
rrdcalc_rrdhost_index_destroy(host);
@@ -1257,15 +1232,6 @@ void rrdhost_free___while_having_rrd_wrlock(RRDHOST *host, bool force) {
1232
1233
health_alarm_log_free(host);
1234
1260
-#ifdef ENABLE_DBENGINE
1261
- for(size_t tier = 0; tier < storage_tiers ;tier++) {
1262
- if(host->db[tier].mode == RRD_MEMORY_MODE_DBENGINE
1263
- && host->db[tier].si
1264
- && !is_storage_engine_shared(host->db[tier].si))
1265
- rrdeng_exit((struct rrdengine_instance *)host->db[tier].si);
1266
- }
1267
-#endif
1268
-
1235
if (!netdata_exit && !force) {
1236
nd_log(NDLS_DAEMON, NDLP_DEBUG,
1237
"RRD: 'host:%s' is now in archive mode...",