aboutsummaryrefslogtreecommitdiffstats
path: root/storageserver
diff options
context:
space:
mode:
authorTor Brede Vekterli <vekterli@verizonmedia.com>2020-06-17 09:16:35 +0000
committerTor Brede Vekterli <vekterli@verizonmedia.com>2020-06-25 10:40:10 +0000
commit2185218c0bb44843bb0f3d33abea3b116b35160a (patch)
tree4442f72909b071e626497d3b361c617630da6e8a /storageserver
parent6821733667528dddeed658205358f6b9dda12090 (diff)
Create generic B-tree bucket DB and content node DB implementation
This is the first stage of removing the legacy DB implementation. Support for B-tree specific functionality such as lock-free snapshot reads will be added soon. This commit is just for feature parity. Abstract away actual database implementation to allow it to be chosen dynamically at startup. This abstraction does incur some overhead via call indirections and type erasures of callbacks, so it's likely it will be removed once the transition to the new B-tree DB has been completed. Since the algorithms used for bucket key operations is so similar between the content node and distributor, a generic B-tree backed bucket database has been created. The distributor DB will be rewritten around this code very soon. Due to the strong coupling between bucket locking and actual DB implementation details, the new bucket DB has a fairly significant code overlap with the legacy implementation. This is to avoid spending time abstracting away and factoring out code for a legacy implementation that is to be removed entirely anyway. Remove existing LockableMap functionality not used or that's only used by tests.
Diffstat (limited to 'storageserver')
-rw-r--r--storageserver/src/vespa/storageserver/app/distributorprocess.h4
-rw-r--r--storageserver/src/vespa/storageserver/app/servicelayerprocess.h4
2 files changed, 4 insertions, 4 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.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;