aboutsummaryrefslogtreecommitdiffstats
path: root/storageserver
diff options
context:
space:
mode:
authorTor Brede Vekterli <vekterli@verizonmedia.com>2020-06-30 10:44:46 +0200
committerGitHub <noreply@github.com>2020-06-30 10:44:46 +0200
commit848174d1efea5d117db2accd228247e649c21803 (patch)
tree7a0e8f64216e769fc49567b77eee3dc845ee34b8 /storageserver
parent585277f10eface94cd1b474bb59d40fc7e5f5cac (diff)
parent947982bec5303debd8b4ec2b90d9f59df7f64131 (diff)
Merge pull request #13706 from vespa-engine/vekterli/btree-bucket-db-support-on-content-node
Create generic B-tree bucket DB and content node DB implementation
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;