summaryrefslogtreecommitdiffstats
path: root/searchcore/src
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@oath.com>2018-01-31 18:54:35 +0100
committerHenning Baldersheim <balder@oath.com>2018-01-31 18:54:35 +0100
commit7b6be859cd2f18d19a3f4c02d537f130db513a4e (patch)
treea2ab8cc5d62d08c8c7cc67a7aae66b414ec4d237 /searchcore/src
parent01dcc51225aed6e017d54875a0c924f0fab7aef1 (diff)
Ensure directory is created when checking for space
Diffstat (limited to 'searchcore/src')
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/bootstrapconfigmanager.cpp3
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/proton.cpp1
2 files changed, 3 insertions, 1 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/server/bootstrapconfigmanager.cpp b/searchcore/src/vespa/searchcore/proton/server/bootstrapconfigmanager.cpp
index 5459d60e769..c3310dd193b 100644
--- a/searchcore/src/vespa/searchcore/proton/server/bootstrapconfigmanager.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/bootstrapconfigmanager.cpp
@@ -5,6 +5,8 @@
#include <vespa/searchcore/proton/common/hw_info_sampler.h>
#include <vespa/config-bucketspaces.h>
#include <vespa/searchlib/common/tunefileinfo.hpp>
+#include <vespa/vespalib/io/fileutil.h>
+
#include <vespa/log/log.h>
LOG_SETUP(".proton.server.bootstrapconfigmanager");
@@ -116,6 +118,7 @@ BootstrapConfigManager::update(const ConfigSnapshot & snapshot)
const auto &hwCpuCfg = protonConfig.hwinfo.cpu;
HwInfoSampler::Config samplerCfg(hwDiskCfg.size, hwDiskCfg.writespeed, hwDiskCfg.slowwritespeedlimit,
hwDiskCfg.samplewritesize, hwDiskCfg.shared, hwMemoryCfg.size, hwCpuCfg.cores);
+ vespalib::mkdir(protonConfig.basedir, true);
HwInfoSampler sampler(protonConfig.basedir, samplerCfg);
auto newSnapshot(std::make_shared<BootstrapConfig>(snapshot.getGeneration(), newDocumenttypesConfig, newRepo,
diff --git a/searchcore/src/vespa/searchcore/proton/server/proton.cpp b/searchcore/src/vespa/searchcore/proton/server/proton.cpp
index 2639958ed70..65a47e1ded8 100644
--- a/searchcore/src/vespa/searchcore/proton/server/proton.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/proton.cpp
@@ -12,7 +12,6 @@
#include "proton_config_snapshot.h"
#include "fileconfigmanager.h"
-#include <vespa/searchcore/proton/common/hw_info_sampler.h>
#include <vespa/searchcore/proton/reference/document_db_reference_registry.h>
#include <vespa/searchcore/proton/flushengine/flush_engine_explorer.h>
#include <vespa/searchcore/proton/flushengine/prepare_restart_flush_strategy.h>