diff options
-rw-r--r-- | daemon/main.c | 7 | ||||
-rw-r--r-- | database/rrdhost.c | 4 |
2 files changed, 7 insertions, 4 deletions
diff --git a/daemon/main.c b/daemon/main.c index bc8fd954b7..71dd210dbd 100644 --- a/daemon/main.c +++ b/daemon/main.c @@ -542,7 +542,6 @@ static void get_netdata_configured_variables() { // get default memory mode for the database default_rrd_memory_mode = rrd_memory_mode_id(config_get(CONFIG_SECTION_GLOBAL, "memory mode", rrd_memory_mode_name(default_rrd_memory_mode))); - #ifdef ENABLE_DBENGINE // ------------------------------------------------------------------------ // get default Database Engine page cache size in MiB @@ -567,7 +566,11 @@ static void get_netdata_configured_variables() { error("Invalid multidb disk space %d given. Defaulting to %d.", default_multidb_disk_quota_mb, default_rrdeng_disk_quota_mb); default_multidb_disk_quota_mb = default_rrdeng_disk_quota_mb; } - +#else + if (default_rrd_memory_mode == RRD_MEMORY_MODE_DBENGINE) { + error_report("RRD_MEMORY_MODE_DBENGINE is not supported in this platform. The agent will use memory mode ram instead."); + default_rrd_memory_mode = RRD_MEMORY_MODE_RAM; + } #endif // ------------------------------------------------------------------------ diff --git a/database/rrdhost.c b/database/rrdhost.c index cf5bcbd15d..d0790a1fb9 100644 --- a/database/rrdhost.c +++ b/database/rrdhost.c @@ -656,7 +656,7 @@ int rrd_init(char *hostname, struct rrdhost_system_info *system_info) { if (unlikely(sql_init_database())) { if (default_rrd_memory_mode == RRD_MEMORY_MODE_DBENGINE) - return 1; + fatal("Failed to initialize SQLite"); info("Skipping SQLITE metadata initialization since memory mode is not db engine"); } @@ -709,7 +709,7 @@ int rrd_init(char *hostname, struct rrdhost_system_info *system_info) { rrdhost_free(localhost); localhost = NULL; rrd_unlock(); - return 1; + fatal("Failed to initialize dbengine"); } #endif rrd_unlock(); |