diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2019-05-21 18:56:05 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2019-05-21 18:56:05 +0000 |
commit | 54deae27eed83a162ee438ef6bad4a23767757dd (patch) | |
tree | da5333377dfacf22177375aef822a8e696f007eb /database/rrd.c | |
parent | Releasing debian version 1.14.0-1. (diff) | |
download | netdata-54deae27eed83a162ee438ef6bad4a23767757dd.tar.xz netdata-54deae27eed83a162ee438ef6bad4a23767757dd.zip |
Merging upstream version 1.15.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'database/rrd.c')
-rw-r--r-- | database/rrd.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/database/rrd.c b/database/rrd.c index 119efa62e..2457cac01 100644 --- a/database/rrd.c +++ b/database/rrd.c @@ -38,6 +38,9 @@ inline const char *rrd_memory_mode_name(RRD_MEMORY_MODE id) { case RRD_MEMORY_MODE_ALLOC: return RRD_MEMORY_MODE_ALLOC_NAME; + + case RRD_MEMORY_MODE_DBENGINE: + return RRD_MEMORY_MODE_DBENGINE_NAME; } return RRD_MEMORY_MODE_SAVE_NAME; @@ -56,6 +59,9 @@ RRD_MEMORY_MODE rrd_memory_mode_id(const char *name) { else if(unlikely(!strcmp(name, RRD_MEMORY_MODE_ALLOC_NAME))) return RRD_MEMORY_MODE_ALLOC; + else if(unlikely(!strcmp(name, RRD_MEMORY_MODE_DBENGINE_NAME))) + return RRD_MEMORY_MODE_DBENGINE; + return RRD_MEMORY_MODE_SAVE; } @@ -140,7 +146,8 @@ char *rrdset_cache_dir(RRDHOST *host, const char *id, const char *config_section snprintfz(n, FILENAME_MAX, "%s/%s", host->cache_dir, b); ret = config_get(config_section, "cache directory", n); - if(host->rrd_memory_mode == RRD_MEMORY_MODE_MAP || host->rrd_memory_mode == RRD_MEMORY_MODE_SAVE) { + if(host->rrd_memory_mode == RRD_MEMORY_MODE_MAP || host->rrd_memory_mode == RRD_MEMORY_MODE_SAVE || + host->rrd_memory_mode == RRD_MEMORY_MODE_DBENGINE) { int r = mkdir(ret, 0775); if(r != 0 && errno != EEXIST) error("Cannot create directory '%s'", ret); |