summaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2017-05-23 15:35:48 +0200
committerHenning Baldersheim <balder@yahoo-inc.com>2017-05-24 08:57:55 +0200
commitf14dcbc41585d9134f70c48a5f636b5faf78472e (patch)
treeea1b42b64bedc3e8a3e877b113ead0d36b267a24 /searchcore
parent228a27569dbe36eae781b35f54dc23563085c0ae (diff)
We do not need the IIndexManagerFactory in searchcore anymore.
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/tests/proton/common/dummydbowner.h12
-rw-r--r--searchcore/src/tests/proton/documentdb/document_subdbs/document_subdbs_test.cpp6
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/documentdb.cpp37
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/documentdb.h3
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/i_document_subdb_owner.h4
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/idocumentdbowner.h13
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/idocumentsubdb.h12
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/proton.cpp9
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/proton.h6
9 files changed, 21 insertions, 81 deletions
diff --git a/searchcore/src/tests/proton/common/dummydbowner.h b/searchcore/src/tests/proton/common/dummydbowner.h
index 1b0b609e33d..9a9adde19eb 100644
--- a/searchcore/src/tests/proton/common/dummydbowner.h
+++ b/searchcore/src/tests/proton/common/dummydbowner.h
@@ -4,27 +4,20 @@
#include <vespa/searchcore/proton/server/idocumentdbowner.h>
#include <vespa/searchcore/proton/reference/document_db_reference_registry.h>
-#include <vespa/searchcorespi/plugin/iindexmanagerfactory.h>
#include <vespa/vespalib/stllike/string.h>
-namespace proton
-{
+namespace proton {
struct DummyDBOwner : IDocumentDBOwner {
std::shared_ptr<IDocumentDBReferenceRegistry> _registry;
DummyDBOwner()
: _registry(std::make_shared<DocumentDBReferenceRegistry>())
- {
- }
+ {}
~DummyDBOwner() {}
bool isInitializing() const override { return false; }
- searchcorespi::IIndexManagerFactory::SP
- getIndexManagerFactory(const vespalib::stringref & ) const override {
- return searchcorespi::IIndexManagerFactory::SP();
- }
uint32_t getDistributionKey() const override { return -1; }
std::shared_ptr<IDocumentDBReferenceRegistry> getDocumentDBReferenceRegistry() const override {
return _registry;
@@ -32,4 +25,3 @@ struct DummyDBOwner : IDocumentDBOwner {
};
} // namespace proton
-
diff --git a/searchcore/src/tests/proton/documentdb/document_subdbs/document_subdbs_test.cpp b/searchcore/src/tests/proton/documentdb/document_subdbs/document_subdbs_test.cpp
index 8fcb9d76eb3..7f7a87c8084 100644
--- a/searchcore/src/tests/proton/documentdb/document_subdbs/document_subdbs_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/document_subdbs/document_subdbs_test.cpp
@@ -76,11 +76,6 @@ struct MySubDBOwner : public IDocumentSubDBOwner
uint32_t _syncCnt;
MySubDBOwner() : _syncCnt(0) {}
void syncFeedView() override { ++_syncCnt; }
- IIndexManagerFactory::SP
- getIndexManagerFactory(const vespalib::stringref &name) const override {
- (void) name;
- return IIndexManagerFactory::SP();
- }
vespalib::string getName() const override { return "owner"; }
uint32_t getDistributionKey() const override { return -1; }
};
@@ -995,4 +990,3 @@ TEST_MAIN()
{
TEST_RUN_ALL();
}
-
diff --git a/searchcore/src/vespa/searchcore/proton/server/documentdb.cpp b/searchcore/src/vespa/searchcore/proton/server/documentdb.cpp
index a8b4256ea16..77060956799 100644
--- a/searchcore/src/vespa/searchcore/proton/server/documentdb.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/documentdb.cpp
@@ -178,15 +178,12 @@ DocumentDB::DocumentDB(const vespalib::string &baseDir,
_feedHandler.setBucketDBHandler(&_subDBs.getBucketDBHandler());
saveInitialConfig(*configSnapshot);
resumeSaveConfig();
- SerialNum configSerial = _config_store->getPrevValidSerial(
- _feedHandler.getPrunedSerialNum() + 1);
+ SerialNum configSerial = _config_store->getPrevValidSerial(_feedHandler.getPrunedSerialNum() + 1);
assert(configSerial > 0);
DocumentDBConfig::SP loaded_config;
- _config_store->loadConfig(*configSnapshot, configSerial,
- loaded_config);
+ _config_store->loadConfig(*configSnapshot, configSerial, loaded_config);
// Grab relevant parts from pending config
- loaded_config = DocumentDBConfigScout::scout(loaded_config,
- *_pendingConfigSnapshot.get());
+ loaded_config = DocumentDBConfigScout::scout(loaded_config, *_pendingConfigSnapshot.get());
// Ignore configs that are not relevant during replay of transaction log
loaded_config = DocumentDBConfig::makeReplayConfig(loaded_config);
@@ -198,13 +195,10 @@ DocumentDB::DocumentDB(const vespalib::string &baseDir,
_clusterStateHandler.addClusterStateChangedHandler(&_bucketHandler);
for (auto subDb : _subDBs) {
_lidSpaceCompactionHandlers.push_back(ILidSpaceCompactionHandler::UP
- (new LidSpaceCompactionHandler(*subDb,
- _docTypeName.getName())));
+ (new LidSpaceCompactionHandler(*subDb, _docTypeName.getName())));
}
- _writeFilter.setConfig(loaded_config->getMaintenanceConfigSP()->
- getAttributeUsageFilterConfig());
- fastos::TimeStamp visibilityDelay =
- loaded_config->getMaintenanceConfigSP()->getVisibilityDelay();
+ _writeFilter.setConfig(loaded_config->getMaintenanceConfigSP()->getAttributeUsageFilterConfig());
+ fastos::TimeStamp visibilityDelay = loaded_config->getMaintenanceConfigSP()->getVisibilityDelay();
_visibility.setVisibilityDelay(visibilityDelay);
if (_visibility.getVisibilityDelay() > 0) {
_writeService.setTaskLimit(semiUnboundTaskLimit(_semiUnboundExecutorTaskLimit, _indexingThreads));
@@ -285,12 +279,10 @@ DocumentDB::initManagers()
_initConfigSnapshot.reset();
InitializerTask::SP rootTask =
_subDBs.createInitializer(*configSnapshot, _initConfigSerialNum,
- _protonSummaryCfg,
- _protonIndexCfg);
+ _protonSummaryCfg, _protonIndexCfg);
InitializeThreads initializeThreads = _initializeThreads;
_initializeThreads.reset();
- std::shared_ptr<TaskRunner> taskRunner(std::make_shared<TaskRunner>
- (*initializeThreads));
+ std::shared_ptr<TaskRunner> taskRunner(std::make_shared<TaskRunner>(*initializeThreads));
auto doneTask = std::make_unique<InitDoneTask>(std::move(initializeThreads), taskRunner,
std::move(configSnapshot), *this);
taskRunner->runTask(rootTask, _writeService.master(), std::move(doneTask));
@@ -300,8 +292,7 @@ void
DocumentDB::initFinish(DocumentDBConfig::SP configSnapshot)
{
// Called by executor thread
- _bucketHandler.setReadyBucketHandler(
- _subDBs.getReadySubDB()->getDocumentMetaStoreContext().get());
+ _bucketHandler.setReadyBucketHandler(_subDBs.getReadySubDB()->getDocumentMetaStoreContext().get());
_subDBs.initViews(*configSnapshot, _sessionManager);
_syncFeedViewEnabled = true;
syncFeedView();
@@ -1080,13 +1071,6 @@ DocumentDB::notifyAllBucketsChanged()
_clusterStateHandler, "notready");
}
-
-searchcorespi::IIndexManagerFactory::SP
-DocumentDB::getIndexManagerFactory(const vespalib::stringref &name) const
-{
- return _owner.getIndexManagerFactory(name);
-}
-
namespace {
void
@@ -1110,8 +1094,7 @@ struct TempAttributeMetric
TempAttributeMetric()
: _memoryUsage(),
_bitVectors(0)
- {
- }
+ {}
};
struct TempAttributeMetrics
diff --git a/searchcore/src/vespa/searchcore/proton/server/documentdb.h b/searchcore/src/vespa/searchcore/proton/server/documentdb.h
index 93d26e3406d..3f090e5d3c8 100644
--- a/searchcore/src/vespa/searchcore/proton/server/documentdb.h
+++ b/searchcore/src/vespa/searchcore/proton/server/documentdb.h
@@ -413,9 +413,6 @@ public:
// Implements IDocumentSubDBOwner
void syncFeedView() override;
- std::shared_ptr<searchcorespi::IIndexManagerFactory>
- getIndexManagerFactory(const vespalib::stringref & name) const override;
-
vespalib::string getName() const override { return _docTypeName.getName(); }
uint32_t getDistributionKey() const override;
diff --git a/searchcore/src/vespa/searchcore/proton/server/i_document_subdb_owner.h b/searchcore/src/vespa/searchcore/proton/server/i_document_subdb_owner.h
index 20b2529d991..1dfa2a0dee3 100644
--- a/searchcore/src/vespa/searchcore/proton/server/i_document_subdb_owner.h
+++ b/searchcore/src/vespa/searchcore/proton/server/i_document_subdb_owner.h
@@ -4,8 +4,6 @@
#include <vespa/vespalib/stllike/string.h>
#include <memory>
-namespace searchcorespi { class IIndexManagerFactory; }
-
namespace proton {
/**
@@ -17,8 +15,6 @@ class IDocumentSubDBOwner
public:
virtual ~IDocumentSubDBOwner() {}
virtual void syncFeedView() = 0;
- virtual std::shared_ptr<searchcorespi::IIndexManagerFactory>
- getIndexManagerFactory(const vespalib::stringref &name) const = 0;
virtual vespalib::string getName() const = 0;
virtual uint32_t getDistributionKey() const = 0;
};
diff --git a/searchcore/src/vespa/searchcore/proton/server/idocumentdbowner.h b/searchcore/src/vespa/searchcore/proton/server/idocumentdbowner.h
index 6a9e8702495..0052b95234f 100644
--- a/searchcore/src/vespa/searchcore/proton/server/idocumentdbowner.h
+++ b/searchcore/src/vespa/searchcore/proton/server/idocumentdbowner.h
@@ -2,26 +2,21 @@
#pragma once
-#include <vespa/vespalib/stllike/string.h>
-#include <vespa/searchcorespi/plugin/iindexmanagerfactory.h>
+#include <memory>
+#include <cstdint>
-namespace proton
-{
+namespace proton {
class IDocumentDBReferenceRegistry;
class IDocumentDBOwner
{
public:
- virtual ~IDocumentDBOwner(void);
+ virtual ~IDocumentDBOwner();
virtual bool isInitializing() const = 0;
-
- virtual searchcorespi::IIndexManagerFactory::SP
- getIndexManagerFactory(const vespalib::stringref & name) const = 0;
virtual uint32_t getDistributionKey() const = 0;
virtual std::shared_ptr<IDocumentDBReferenceRegistry> getDocumentDBReferenceRegistry() const = 0;
};
} // namespace proton
-
diff --git a/searchcore/src/vespa/searchcore/proton/server/idocumentsubdb.h b/searchcore/src/vespa/searchcore/proton/server/idocumentsubdb.h
index 86d8cdc01e0..98cd5c5d8fe 100644
--- a/searchcore/src/vespa/searchcore/proton/server/idocumentsubdb.h
+++ b/searchcore/src/vespa/searchcore/proton/server/idocumentsubdb.h
@@ -9,20 +9,18 @@
namespace search {
- namespace index {
- class Schema;
- }
+ namespace index { class Schema; }
}
namespace document { class DocumentId; }
namespace searchcorespi {
-class IFlushTarget;
-class IIndexManagerFactory;
-class IIndexManager;
+ class IFlushTarget;
+ class IIndexManager;
}
namespace proton {
- namespace matching { class SessionManager; }
+
+ namespace matching { class SessionManager; }
class DocumentDBConfig;
class DocumentSubDbInitializer;
diff --git a/searchcore/src/vespa/searchcore/proton/server/proton.cpp b/searchcore/src/vespa/searchcore/proton/server/proton.cpp
index a3bf7294596..31acf50c421 100644
--- a/searchcore/src/vespa/searchcore/proton/server/proton.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/proton.cpp
@@ -48,7 +48,6 @@ using search::transactionlog::DomainStats;
using vespa::config::search::core::ProtonConfig;
using vespa::config::search::core::internal::InternalProtonType;
using document::CompressionConfig;
-using searchcorespi::IIndexManagerFactory;
namespace proton {
@@ -187,8 +186,6 @@ Proton::Proton(const config::ConfigUri & configUri,
_queryLimiter(),
_clock(0.010),
_threadPool(128 * 1024),
- _libraries(),
- _indexManagerFactoryRegistry(),
_configGenMonitor(),
_configGen(0),
_distributionKey(-1),
@@ -333,12 +330,6 @@ Proton::init(const BootstrapConfig::SP & configSnapshot)
_initComplete = true;
}
-searchcorespi::IIndexManagerFactory::SP
-Proton::getIndexManagerFactory(const vespalib::stringref & name) const
-{
- return _indexManagerFactoryRegistry.get(name);
-}
-
BootstrapConfig::SP
Proton::getActiveConfigSnapshot() const
{
diff --git a/searchcore/src/vespa/searchcore/proton/server/proton.h b/searchcore/src/vespa/searchcore/proton/server/proton.h
index 25c490418a2..acfba1b428b 100644
--- a/searchcore/src/vespa/searchcore/proton/server/proton.h
+++ b/searchcore/src/vespa/searchcore/proton/server/proton.h
@@ -23,8 +23,6 @@
#include <vespa/searchcore/proton/persistenceengine/persistenceengine.h>
#include <vespa/searchcore/proton/summaryengine/summaryengine.h>
#include <vespa/searchcore/proton/summaryengine/docsum_by_slime.h>
-#include <vespa/searchcorespi/plugin/factoryloader.h>
-#include <vespa/searchcorespi/plugin/factoryregistry.h>
#include <vespa/searchlib/common/fileheadercontext.h>
#include <vespa/searchlib/engine/monitorapi.h>
#include <vespa/searchlib/engine/transportserver.h>
@@ -130,8 +128,6 @@ private:
matching::QueryLimiter _queryLimiter;
vespalib::Clock _clock;
FastOS_ThreadPool _threadPool;
- searchcorespi::FactoryLoader _libraries;
- searchcorespi::FactoryRegistry _indexManagerFactoryRegistry;
vespalib::Monitor _configGenMonitor;
int64_t _configGen;
uint32_t _distributionKey;
@@ -166,8 +162,6 @@ private:
void waitForInitDone();
void waitForOnlineState();
virtual storage::spi::PersistenceProvider::UP create() const override;
- searchcorespi::IIndexManagerFactory::SP
- getIndexManagerFactory(const vespalib::stringref & name) const override;
uint32_t getDistributionKey() const override { return _distributionKey; }
BootstrapConfig::SP getActiveConfigSnapshot() const;
virtual std::shared_ptr<IDocumentDBReferenceRegistry> getDocumentDBReferenceRegistry() const override;