@cryptotaxi247 / netdata-1 / commits / 58464f5d9

Code cleanup (#17036)

Cleanup structs

Stelios Fragkakis committed Feb 20, 2024 at 20:47 UTC 58464f5d93cb3909d39595c9e21c3b6d1aa7d6b3
3 files changed -13
src/database/rrd.h
-10
@@ -65,9 +65,7 @@ typedef enum __attribute__ ((__packed__)) storage_priority {
65 struct rrddim_tier;
66
67 #ifdef ENABLE_DBENGINE
68 -struct rrdeng_page_descr;
68 struct rrdengine_instance;
70 -struct pg_cache_page_index;
69 #endif
70
71 // ----------------------------------------------------------------------------
@@ -146,7 +144,6 @@ const char *rrdset_type_name(RRDSET_TYPE chart_type);
144
145 #include "contexts/rrdcontext.h"
146
149 -extern bool unittest_running;
147 extern bool dbengine_enabled;
148 extern size_t storage_tiers;
149 extern bool use_direct_io;
@@ -790,11 +787,7 @@ struct rrdset {
787 // (RRDSET_DB_STATE ptr to an undefined structure, and a call to clean this up during destruction)
788
789 struct {
793 - char *cache_dir; // the directory to store dimensions
794 - void *st_on_file; // compatibility with V019 RRDSET files
795 -
790 int32_t entries; // total number of entries in the data set
797 -
791 int32_t current_entry; // the entry that is currently being updated
792 // it goes around in a round-robin fashion
793 } db;
@@ -1094,8 +1087,6 @@ typedef struct health {
1087 time_t health_delay_up_to; // a timestamp to delay alarms processing up to
1088 STRING *health_default_exec; // the full path of the alarms notifications program
1089 STRING *health_default_recipient; // the default recipient for all alarms
1097 - uint32_t health_default_warn_repeat_every; // the default value for the interval between repeating warning notifications
1098 - uint32_t health_default_crit_repeat_every; // the default value for the interval between repeating critical notifications
1090 unsigned int health_enabled; // 1 when this host has health enabled
1091 bool use_summary_for_notifications; // whether or not to use the summary field as a subject for notifications
1092 } HEALTH;
@@ -1313,7 +1304,6 @@ extern RRDHOST *localhost;
1304 #define rrdhost_hostname(host) string2str((host)->hostname)
1305 #define rrdhost_registry_hostname(host) string2str((host)->registry_hostname)
1306 #define rrdhost_os(host) string2str((host)->os)
1316 -#define rrdhost_tags(host) string2str((host)->tags)
1307 #define rrdhost_timezone(host) string2str((host)->timezone)
1308 #define rrdhost_abbrev_timezone(host) string2str((host)->abbrev_timezone)
1309 #define rrdhost_program_name(host) string2str((host)->program_name)
src/database/rrdset.c
-1
@@ -373,7 +373,6 @@ static void rrdset_delete_callback(const DICTIONARY_ITEM *item __maybe_unused, v
373 string_freez(st->module_name);
374
375 freez(st->exporting_flags);
376 - freez(st->db.cache_dir);
376 }
377
378 // the item to be inserted, is already in the dictionary
src/health/health_event_loop.c
-2
@@ -148,8 +148,6 @@ static void health_initialize_rrdhost(RRDHOST *host) {
148
149 rrdhost_flag_set(host, RRDHOST_FLAG_INITIALIZED_HEALTH);
150
151 - host->health.health_default_warn_repeat_every = health_globals.config.default_warn_repeat_every;
152 - host->health.health_default_crit_repeat_every = health_globals.config.default_crit_repeat_every;
151 host->health_log.max = health_globals.config.health_log_entries_max;
152 host->health_log.health_log_history = health_globals.config.health_log_history;
153 host->health.health_default_exec = string_dup(health_globals.config.default_exec);