aboutsummaryrefslogtreecommitdiffstats
path: root/storageserver
diff options
context:
space:
mode:
Diffstat (limited to 'storageserver')
-rw-r--r--storageserver/src/vespa/storageserver/app/distributorprocess.h4
-rw-r--r--storageserver/src/vespa/storageserver/app/servicelayerprocess.cpp19
-rw-r--r--storageserver/src/vespa/storageserver/app/servicelayerprocess.h4
3 files changed, 21 insertions, 6 deletions
diff --git a/storageserver/src/vespa/storageserver/app/distributorprocess.h b/storageserver/src/vespa/storageserver/app/distributorprocess.h
index 48fa331ba54..e416f285268 100644
--- a/storageserver/src/vespa/storageserver/app/distributorprocess.h
+++ b/storageserver/src/vespa/storageserver/app/distributorprocess.h
@@ -12,7 +12,7 @@
namespace storage {
-class DistributorProcess : public Process {
+class DistributorProcess final : public Process {
DistributorNodeContext _context;
DistributorNode::NeedActiveState _activeFlag;
bool _use_btree_database;
@@ -23,7 +23,7 @@ class DistributorProcess : public Process {
_visitDispatcherConfigHandler;
public:
- DistributorProcess(const config::ConfigUri & configUri);
+ explicit DistributorProcess(const config::ConfigUri & configUri);
~DistributorProcess() override;
void shutdown() override;
diff --git a/storageserver/src/vespa/storageserver/app/servicelayerprocess.cpp b/storageserver/src/vespa/storageserver/app/servicelayerprocess.cpp
index bde93b9e4fb..4ff3810d85f 100644
--- a/storageserver/src/vespa/storageserver/app/servicelayerprocess.cpp
+++ b/storageserver/src/vespa/storageserver/app/servicelayerprocess.cpp
@@ -1,6 +1,8 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "servicelayerprocess.h"
+#include <vespa/config/helper/configgetter.hpp>
+#include <vespa/storage/config/config-stor-server.h>
#include <vespa/storage/storageserver/servicelayernode.h>
#include <vespa/searchvisitor/searchvisitor.h>
@@ -9,8 +11,21 @@ LOG_SETUP(".storageserver.service_layer_process");
namespace storage {
-ServiceLayerProcess::ServiceLayerProcess(const config::ConfigUri & configUri)
- : Process(configUri)
+namespace {
+
+bool configured_to_use_btree_db(const config::ConfigUri& config_uri) {
+ using vespa::config::content::core::StorServerConfig;
+ auto server_config = config::ConfigGetter<StorServerConfig>::getConfig(
+ config_uri.getConfigId(), config_uri.getContext());
+ return server_config->useContentNodeBtreeBucketDb;
+}
+
+}
+
+ServiceLayerProcess::ServiceLayerProcess(const config::ConfigUri& configUri)
+ : Process(configUri),
+ _context(std::make_unique<framework::defaultimplementation::RealClock>(),
+ configured_to_use_btree_db(configUri))
{
}
diff --git a/storageserver/src/vespa/storageserver/app/servicelayerprocess.h b/storageserver/src/vespa/storageserver/app/servicelayerprocess.h
index 27c2db8ed6f..b24640cbbd7 100644
--- a/storageserver/src/vespa/storageserver/app/servicelayerprocess.h
+++ b/storageserver/src/vespa/storageserver/app/servicelayerprocess.h
@@ -36,8 +36,8 @@ protected:
ServiceLayerNodeContext _context;
public:
- ServiceLayerProcess(const config::ConfigUri & configUri);
- ~ServiceLayerProcess();
+ explicit ServiceLayerProcess(const config::ConfigUri & configUri);
+ ~ServiceLayerProcess() override;
void shutdown() override;