summaryrefslogtreecommitdiffstats
path: root/streaming/receiver.c
diff options
context:
space:
mode:
authorCosta Tsaousis <costa@netdata.cloud>2022-10-09 21:58:21 +0300
committerGitHub <noreply@github.com>2022-10-09 21:58:21 +0300
commit758d9c405d2d768a3c125052a02c7a1503b01bd8 (patch)
treede24c46008c9c7bf95270ebb8f3b117229c43db9 /streaming/receiver.c
parent067305602f373d12286e492143bf6cb2a32ffe31 (diff)
full memory tracking and profiling of Netdata Agent (#13789)
* full memory tracking and profiling of Netdata Agent * initialize dbengine only when it is needed * handling of dbengine compiled but not available * restore unittest * restore unittest again * more improvements about ifdef dbengine * fix compilation when dbengine is not enabled * check if dbengine is enabled on exit * call freez() not free() * aral unittest * internal checks activate trace allocations; dev mode activates internal checks
Diffstat (limited to 'streaming/receiver.c')
-rw-r--r--streaming/receiver.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/streaming/receiver.c b/streaming/receiver.c
index 6890f8b2d9..02aa040b06 100644
--- a/streaming/receiver.c
+++ b/streaming/receiver.c
@@ -487,13 +487,10 @@ static int rrdpush_receive(struct receiver_state *rpt)
mode = rrd_memory_mode_id(appconfig_get(&stream_config, rpt->key, "default memory mode", rrd_memory_mode_name(mode)));
mode = rrd_memory_mode_id(appconfig_get(&stream_config, rpt->machine_guid, "memory mode", rrd_memory_mode_name(mode)));
-#ifndef ENABLE_DBENGINE
- if (unlikely(mode == RRD_MEMORY_MODE_DBENGINE)) {
- close(rpt->fd);
- log_stream_connection(rpt->client_ip, rpt->client_port, rpt->key, rpt->machine_guid, rpt->hostname, "REJECTED -- DBENGINE MEMORY MODE NOT SUPPORTED");
- return 1;
+ if (unlikely(mode == RRD_MEMORY_MODE_DBENGINE && !dbengine_enabled)) {
+ error("STREAM %s [receive from %s:%s]: dbengine is not enabled, falling back to default.", rpt->hostname, rpt->client_ip, rpt->client_port);
+ mode = default_rrd_memory_mode;
}
-#endif
health_enabled = appconfig_get_boolean_ondemand(&stream_config, rpt->key, "health enabled by default", health_enabled);
health_enabled = appconfig_get_boolean_ondemand(&stream_config, rpt->machine_guid, "health enabled", health_enabled);