summaryrefslogtreecommitdiffstats
path: root/searchcore/src
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@oath.com>2018-04-04 11:45:55 +0000
committerTor Egge <Tor.Egge@oath.com>2018-04-04 11:45:55 +0000
commit8cfeaeba255ccea54f8345724e72adf53280e33d (patch)
tree711593ee26f3688371e0b0ae948247df22ee54d0 /searchcore/src
parent7902239839a6f34e12ed7aa0f2b7a65114f8ee68 (diff)
Stop using nested typedef for shared pointer to const DocumentTypeRepo.
Diffstat (limited to 'searchcore/src')
-rw-r--r--searchcore/src/apps/tests/persistenceconformance_test.cpp10
-rw-r--r--searchcore/src/apps/vespa-dump-feed/vespa-dump-feed.cpp10
-rw-r--r--searchcore/src/tests/proton/docsummary/docsummary.cpp6
-rw-r--r--searchcore/src/tests/proton/docsummary/summaryfieldconverter_test.cpp2
-rw-r--r--searchcore/src/tests/proton/documentdb/combiningfeedview/combiningfeedview_test.cpp4
-rw-r--r--searchcore/src/tests/proton/documentdb/configurer/configurer_test.cpp8
-rw-r--r--searchcore/src/tests/proton/documentdb/documentbucketmover/documentbucketmover_test.cpp8
-rw-r--r--searchcore/src/tests/proton/documentdb/documentdb_test.cpp2
-rw-r--r--searchcore/src/tests/proton/documentdb/documentdbconfig/documentdbconfig_test.cpp6
-rw-r--r--searchcore/src/tests/proton/documentdb/feedhandler/feedhandler_test.cpp6
-rw-r--r--searchcore/src/tests/proton/documentdb/feedview/feedview_test.cpp2
-rw-r--r--searchcore/src/tests/proton/documentdb/fileconfigmanager/fileconfigmanager_test.cpp2
-rw-r--r--searchcore/src/tests/proton/documentdb/lid_space_compaction/lid_space_compaction_test.cpp8
-rw-r--r--searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp6
-rw-r--r--searchcore/src/tests/proton/documentdb/storeonlyfeedview/storeonlyfeedview_test.cpp4
-rw-r--r--searchcore/src/tests/proton/feedoperation/feedoperation_test.cpp2
-rw-r--r--searchcore/src/tests/proton/proton_configurer/proton_configurer_test.cpp4
-rw-r--r--searchcore/src/tests/proton/server/feedstates_test.cpp4
-rw-r--r--searchcore/src/vespa/searchcore/proton/docsummary/isummarymanager.h2
-rw-r--r--searchcore/src/vespa/searchcore/proton/docsummary/summarymanager.cpp4
-rw-r--r--searchcore/src/vespa/searchcore/proton/docsummary/summarymanager.h6
-rw-r--r--searchcore/src/vespa/searchcore/proton/reprocessing/reprocess_documents_task.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/reprocessing/reprocess_documents_task.h4
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/bootstrapconfig.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/bootstrapconfig.h6
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/bootstrapconfigmanager.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/combiningfeedview.cpp6
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/combiningfeedview.h4
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/documentdbconfig.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/documentdbconfig.h6
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/fast_access_doc_subdb.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/fast_access_doc_subdb.h2
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/fast_access_doc_subdb_configurer.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/fast_access_doc_subdb_configurer.h2
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/fileconfigmanager.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/minimal_document_retriever.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/minimal_document_retriever.h4
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/proton.cpp4
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/searchable_doc_subdb_configurer.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/searchable_doc_subdb_configurer.h2
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/storeonlyfeedview.h8
-rw-r--r--searchcore/src/vespa/searchcore/proton/test/documentdb_config_builder.h4
-rw-r--r--searchcore/src/vespa/searchcore/proton/test/dummy_feed_view.h6
-rw-r--r--searchcore/src/vespa/searchcore/proton/test/dummy_summary_manager.h2
-rw-r--r--searchcore/src/vespa/searchcore/proton/test/userdocumentsbuilder.h2
45 files changed, 93 insertions, 93 deletions
diff --git a/searchcore/src/apps/tests/persistenceconformance_test.cpp b/searchcore/src/apps/tests/persistenceconformance_test.cpp
index 3840cfb7869..ea18f513535 100644
--- a/searchcore/src/apps/tests/persistenceconformance_test.cpp
+++ b/searchcore/src/apps/tests/persistenceconformance_test.cpp
@@ -88,16 +88,16 @@ struct SchemaConfigFactory {
class ConfigFactory {
private:
- DocumentTypeRepo::SP _repo;
+ std::shared_ptr<const DocumentTypeRepo> _repo;
DocumenttypesConfigSP _typeCfg;
SchemaConfigFactory::SP _schemaFactory;
public:
- ConfigFactory(const DocumentTypeRepo::SP &repo,
+ ConfigFactory(const std::shared_ptr<const DocumentTypeRepo> &repo,
const DocumenttypesConfigSP &typeCfg,
const SchemaConfigFactory::SP &schemaFactory);
~ConfigFactory();
- const DocumentTypeRepo::SP getTypeRepo() const { return _repo; }
+ const std::shared_ptr<const DocumentTypeRepo> getTypeRepo() const { return _repo; }
const DocumenttypesConfigSP getTypeCfg() const { return _typeCfg; }
DocTypeVector getDocTypes() const {
DocTypeVector types;
@@ -140,7 +140,7 @@ public:
};
-ConfigFactory::ConfigFactory(const DocumentTypeRepo::SP &repo, const DocumenttypesConfigSP &typeCfg,
+ConfigFactory::ConfigFactory(const std::shared_ptr<const DocumentTypeRepo> &repo, const DocumenttypesConfigSP &typeCfg,
const SchemaConfigFactory::SP &schemaFactory)
: _repo(repo),
_typeCfg(typeCfg),
@@ -373,7 +373,7 @@ public:
_writeFilter()
{
}
- virtual PersistenceProvider::UP getPersistenceImplementation(const DocumentTypeRepo::SP &repo,
+ virtual PersistenceProvider::UP getPersistenceImplementation(const std::shared_ptr<const DocumentTypeRepo> &repo,
const DocumenttypesConfig &typesCfg) override {
ConfigFactory cfgFactory(repo, DocumenttypesConfigSP(new DocumenttypesConfig(typesCfg)), _schemaFactory);
_docDbRepo.reset(new DocumentDBRepo(cfgFactory, _docDbFactory));
diff --git a/searchcore/src/apps/vespa-dump-feed/vespa-dump-feed.cpp b/searchcore/src/apps/vespa-dump-feed/vespa-dump-feed.cpp
index 4d6d63cf641..e63f8e1a57a 100644
--- a/searchcore/src/apps/vespa-dump-feed/vespa-dump-feed.cpp
+++ b/searchcore/src/apps/vespa-dump-feed/vespa-dump-feed.cpp
@@ -57,7 +57,7 @@ private:
virtual void handleMessage(mbus::Message::UP message) override;
public:
- FeedHandler(document::DocumentTypeRepo::SP repo, OutputFile &idx, OutputFile &dat);
+ FeedHandler(std::shared_ptr<const document::DocumentTypeRepo> repo, OutputFile &idx, OutputFile &dat);
std::string getRoute() { return _session->getConnectionSpec(); }
virtual ~FeedHandler();
};
@@ -93,7 +93,7 @@ FeedHandler::handleMessage(mbus::Message::UP message)
_session->reply(std::move(reply)); // handle all messages synchronously
}
-FeedHandler::FeedHandler(document::DocumentTypeRepo::SP repo, OutputFile &idx, OutputFile &dat)
+FeedHandler::FeedHandler(std::shared_ptr<const document::DocumentTypeRepo> repo, OutputFile &idx, OutputFile &dat)
: _loadTypes(),
_mbus(mbus::MessageBusParams().addProtocol(mbus::IProtocol::SP(new documentapi::DocumentProtocol(_loadTypes, repo))),
mbus::RPCNetworkParams()),
@@ -147,10 +147,10 @@ std::unique_ptr<CFG> getConfig() {
return ret;
}
-document::DocumentTypeRepo::SP getRepo() {
+std::shared_ptr<const document::DocumentTypeRepo> getRepo() {
typedef document::DocumenttypesConfig DCFG;
std::unique_ptr<DCFG> dcfg = getConfig<DCFG>();
- document::DocumentTypeRepo::SP ret;
+ std::shared_ptr<const document::DocumentTypeRepo> ret;
if (dcfg.get() != 0) {
ret.reset(new document::DocumentTypeRepo(*dcfg));
}
@@ -187,7 +187,7 @@ App::Main()
fprintf(stderr, "error: could not save config to disk\n");
return 1;
}
- document::DocumentTypeRepo::SP repo = getRepo();
+ std::shared_ptr<const document::DocumentTypeRepo> repo = getRepo();
if (repo.get() == 0) {
fprintf(stderr, "error: could not create document type repo\n");
return 1;
diff --git a/searchcore/src/tests/proton/docsummary/docsummary.cpp b/searchcore/src/tests/proton/docsummary/docsummary.cpp
index 0338bb5506a..e6abb4f6c51 100644
--- a/searchcore/src/tests/proton/docsummary/docsummary.cpp
+++ b/searchcore/src/tests/proton/docsummary/docsummary.cpp
@@ -84,7 +84,7 @@ class BuildContext
public:
DirMaker _dmk;
DocBuilder _bld;
- DocumentTypeRepo::SP _repo;
+ std::shared_ptr<const DocumentTypeRepo> _repo;
DummyFileHeaderContext _fileHeaderContext;
vespalib::ThreadStackExecutor _summaryExecutor;
search::transactionlog::NoSyncProxy _noTlSyncer;
@@ -178,14 +178,14 @@ public:
config::DirSpec _spec;
DocumentDBConfigHelper _configMgr;
DocumentDBConfig::DocumenttypesConfigSP _documenttypesConfig;
- const DocumentTypeRepo::SP _repo;
+ const std::shared_ptr<const DocumentTypeRepo> _repo;
TuneFileDocumentDB::SP _tuneFileDocumentDB;
HwInfo _hwInfo;
std::unique_ptr<DocumentDB> _ddb;
AttributeWriter::UP _aw;
ISummaryAdapter::SP _sa;
- DBContext(const DocumentTypeRepo::SP &repo, const char *docTypeName)
+ DBContext(const std::shared_ptr<const DocumentTypeRepo> &repo, const char *docTypeName)
: _dmk(docTypeName),
_fileHeaderContext(),
_tls("tmp", 9013, ".", _fileHeaderContext),
diff --git a/searchcore/src/tests/proton/docsummary/summaryfieldconverter_test.cpp b/searchcore/src/tests/proton/docsummary/summaryfieldconverter_test.cpp
index 2d0ff39efa4..7f8ce99beb9 100644
--- a/searchcore/src/tests/proton/docsummary/summaryfieldconverter_test.cpp
+++ b/searchcore/src/tests/proton/docsummary/summaryfieldconverter_test.cpp
@@ -135,7 +135,7 @@ FieldBlock::~FieldBlock() {}
class Test : public vespalib::TestApp {
std::unique_ptr<Schema> _schema;
std::unique_ptr<SummarymapConfigBuilder> _summarymap;
- DocumentTypeRepo::SP _documentRepo;
+ std::shared_ptr<const DocumentTypeRepo> _documentRepo;
const DocumentType *_documentType;
document::FixedTypeRepo _fixedRepo;
diff --git a/searchcore/src/tests/proton/documentdb/combiningfeedview/combiningfeedview_test.cpp b/searchcore/src/tests/proton/documentdb/combiningfeedview/combiningfeedview_test.cpp
index c7006be2804..cc94441ccf6 100644
--- a/searchcore/src/tests/proton/documentdb/combiningfeedview/combiningfeedview_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/combiningfeedview/combiningfeedview_test.cpp
@@ -44,7 +44,7 @@ struct MyFeedView : public test::DummyFeedView
uint32_t _heartBeat;
uint32_t _handlePrune;
uint32_t _wantedLidLimit;
- MyFeedView(const DocumentTypeRepo::SP &repo,
+ MyFeedView(const std::shared_ptr<const DocumentTypeRepo> &repo,
std::shared_ptr<BucketDBOwner> bucketDB,
SubDbType subDbType) :
test::DummyFeedView(repo),
@@ -94,7 +94,7 @@ struct MyFeedView : public test::DummyFeedView
struct MySubDb
{
MyFeedView::SP _view;
- MySubDb(const DocumentTypeRepo::SP &repo,
+ MySubDb(const std::shared_ptr<const DocumentTypeRepo> &repo,
std::shared_ptr<BucketDBOwner> bucketDB,
SubDbType subDbType)
: _view(new MyFeedView(repo, bucketDB, subDbType))
diff --git a/searchcore/src/tests/proton/documentdb/configurer/configurer_test.cpp b/searchcore/src/tests/proton/documentdb/configurer/configurer_test.cpp
index d3567da3527..60cbfeb29b9 100644
--- a/searchcore/src/tests/proton/documentdb/configurer/configurer_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/configurer/configurer_test.cpp
@@ -67,11 +67,11 @@ class IndexManagerDummyReconfigurer : public searchcorespi::IIndexManager::Recon
}
};
-DocumentTypeRepo::SP
+std::shared_ptr<const DocumentTypeRepo>
createRepo()
{
DocumentType docType(DOC_TYPE, 0);
- return DocumentTypeRepo::SP(new DocumentTypeRepo(docType));
+ return std::shared_ptr<const DocumentTypeRepo>(new DocumentTypeRepo(docType));
}
struct ViewPtrs
@@ -89,7 +89,7 @@ struct ViewSet
DummyFileHeaderContext _fileHeaderContext;
ExecutorThreadingService _writeService;
SearchableFeedView::SerialNum serialNum;
- DocumentTypeRepo::SP repo;
+ std::shared_ptr<const DocumentTypeRepo> repo;
DocTypeName _docTypeName;
DocIdLimit _docIdLimit;
search::transactionlog::NoSyncProxy _noTlSyncer;
@@ -267,7 +267,7 @@ struct MyFastAccessFeedView
Schema::SP schema(new Schema());
_dmsc = make_shared<DocumentMetaStoreContext>(std::make_shared<BucketDBOwner>());
_lidReuseDelayer.reset(new documentmetastore::LidReuseDelayer(_writeService, _dmsc->get()));
- DocumentTypeRepo::SP repo = createRepo();
+ std::shared_ptr<const DocumentTypeRepo> repo = createRepo();
StoreOnlyFeedView::Context storeOnlyCtx(summaryAdapter, schema, _dmsc, *_gidToLidChangeHandler, repo,
_writeService, *_lidReuseDelayer, _commitTimeTracker);
StoreOnlyFeedView::PersistentParams params(1, 1, DocTypeName(DOC_TYPE), 0, SubDbType::NOTREADY);
diff --git a/searchcore/src/tests/proton/documentdb/documentbucketmover/documentbucketmover_test.cpp b/searchcore/src/tests/proton/documentdb/documentbucketmover/documentbucketmover_test.cpp
index 7aa452c5aa3..11e9aa8c3ec 100644
--- a/searchcore/src/tests/proton/documentdb/documentbucketmover/documentbucketmover_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/documentbucketmover/documentbucketmover_test.cpp
@@ -93,9 +93,9 @@ struct MyMoveHandler : public IDocumentMoveHandler
struct MyDocumentRetriever : public DocumentRetrieverBaseForTest
{
- DocumentTypeRepo::SP _repo;
+ std::shared_ptr<const DocumentTypeRepo> _repo;
DocumentVector _docs;
- MyDocumentRetriever(DocumentTypeRepo::SP repo) : _repo(repo), _docs() {
+ MyDocumentRetriever(std::shared_ptr<const DocumentTypeRepo> repo) : _repo(repo), _docs() {
_docs.push_back(Document::SP()); // lid 0 invalid
}
virtual const document::DocumentTypeRepo &getDocumentTypeRepo() const override { return *_repo; }
@@ -133,7 +133,7 @@ struct MySubDb
MaintenanceDocumentSubDB _subDb;
test::UserDocuments _docs;
bucketdb::BucketDBHandler _bucketDBHandler;
- MySubDb(const DocumentTypeRepo::SP &repo, std::shared_ptr<BucketDBOwner> bucketDB,
+ MySubDb(const std::shared_ptr<const DocumentTypeRepo> &repo, std::shared_ptr<BucketDBOwner> bucketDB,
uint32_t subDbId, SubDbType subDbType);
~MySubDb();
void insertDocs(const test::UserDocuments &docs_) {
@@ -178,7 +178,7 @@ struct MySubDb
};
-MySubDb::MySubDb(const DocumentTypeRepo::SP &repo, std::shared_ptr<BucketDBOwner> bucketDB,
+MySubDb::MySubDb(const std::shared_ptr<const DocumentTypeRepo> &repo, std::shared_ptr<BucketDBOwner> bucketDB,
uint32_t subDbId, SubDbType subDbType)
: _metaStoreSP(std::make_shared<DocumentMetaStore>(bucketDB,
DocumentMetaStore::getFixedName(),
diff --git a/searchcore/src/tests/proton/documentdb/documentdb_test.cpp b/searchcore/src/tests/proton/documentdb/documentdb_test.cpp
index 9f6eb0ea4e1..14a0dc89b65 100644
--- a/searchcore/src/tests/proton/documentdb/documentdb_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/documentdb_test.cpp
@@ -90,7 +90,7 @@ Fixture::Fixture()
{
DocumentDBConfig::DocumenttypesConfigSP documenttypesConfig(new DocumenttypesConfig());
DocumentType docType("typea", 0);
- DocumentTypeRepo::SP repo(new DocumentTypeRepo(docType));
+ std::shared_ptr<const DocumentTypeRepo> repo(new DocumentTypeRepo(docType));
TuneFileDocumentDB::SP tuneFileDocumentDB(new TuneFileDocumentDB);
config::DirSpec spec(TEST_PATH("cfg"));
DocumentDBConfigHelper mgr(spec, "typea");
diff --git a/searchcore/src/tests/proton/documentdb/documentdbconfig/documentdbconfig_test.cpp b/searchcore/src/tests/proton/documentdb/documentdbconfig/documentdbconfig_test.cpp
index 17353f89fd2..df01ae0fc02 100644
--- a/searchcore/src/tests/proton/documentdb/documentdbconfig/documentdbconfig_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/documentdbconfig/documentdbconfig_test.cpp
@@ -30,7 +30,7 @@ const vespalib::string type_name = "test";
const vespalib::string header_name = type_name + ".header";
const vespalib::string body_name = type_name + ".body";
-DocumentTypeRepo::SP
+std::shared_ptr<const DocumentTypeRepo>
makeDocTypeRepo(bool hasField)
{
DocumenttypesConfigBuilderHelper builder;
@@ -49,7 +49,7 @@ private:
test::DocumentDBConfigBuilder _builder;
public:
- MyConfigBuilder(int64_t generation, const Schema::SP &schema, const DocumentTypeRepo::SP &repo)
+ MyConfigBuilder(int64_t generation, const Schema::SP &schema, const std::shared_ptr<const DocumentTypeRepo> &repo)
: _builder(generation, schema, "client", "test")
{
_builder.repo(repo);
@@ -101,7 +101,7 @@ public:
struct Fixture {
Schema::SP schema;
- DocumentTypeRepo::SP repo;
+ std::shared_ptr<const DocumentTypeRepo> repo;
ConfigSP basicCfg;
ConfigSP fullCfg;
ConfigSP replayCfg;
diff --git a/searchcore/src/tests/proton/documentdb/feedhandler/feedhandler_test.cpp b/searchcore/src/tests/proton/documentdb/feedhandler/feedhandler_test.cpp
index b8ffc41d3cd..10718508d33 100644
--- a/searchcore/src/tests/proton/documentdb/feedhandler/feedhandler_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/feedhandler/feedhandler_test.cpp
@@ -179,7 +179,7 @@ struct MyFeedView : public test::DummyFeedView {
int prune_removed_count;
int update_count;
SerialNum update_serial;
- MyFeedView(const DocumentTypeRepo::SP &dtr);
+ MyFeedView(const std::shared_ptr<const DocumentTypeRepo> &dtr);
~MyFeedView() override;
void resetPutLatch(uint32_t count) { putLatch.reset(new vespalib::CountDownLatch(count)); }
void preparePut(PutOperation &op) override {
@@ -229,7 +229,7 @@ struct MyFeedView : public test::DummyFeedView {
}
};
-MyFeedView::MyFeedView(const DocumentTypeRepo::SP &dtr)
+MyFeedView::MyFeedView(const std::shared_ptr<const DocumentTypeRepo> &dtr)
: test::DummyFeedView(dtr),
putRdz(),
usePutRdz(false),
@@ -260,7 +260,7 @@ struct SchemaContext {
DocTypeName getDocType() const {
return DocTypeName(builder->getDocumentType().getName());
}
- const document::DocumentTypeRepo::SP &getRepo() const { return builder->getDocumentTypeRepo(); }
+ const std::shared_ptr<const document::DocumentTypeRepo> &getRepo() const { return builder->getDocumentTypeRepo(); }
};
diff --git a/searchcore/src/tests/proton/documentdb/feedview/feedview_test.cpp b/searchcore/src/tests/proton/documentdb/feedview/feedview_test.cpp
index 54aefef4463..00eb59f120a 100644
--- a/searchcore/src/tests/proton/documentdb/feedview/feedview_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/feedview/feedview_test.cpp
@@ -432,7 +432,7 @@ struct SchemaContext
std::unique_ptr<DocBuilder> _builder;
SchemaContext();
~SchemaContext();
- const document::DocumentTypeRepo::SP &getRepo() const { return _builder->getDocumentTypeRepo(); }
+ const std::shared_ptr<const document::DocumentTypeRepo> &getRepo() const { return _builder->getDocumentTypeRepo(); }
};
SchemaContext::SchemaContext() :
diff --git a/searchcore/src/tests/proton/documentdb/fileconfigmanager/fileconfigmanager_test.cpp b/searchcore/src/tests/proton/documentdb/fileconfigmanager/fileconfigmanager_test.cpp
index dd35d823b99..a04e340c96f 100644
--- a/searchcore/src/tests/proton/documentdb/fileconfigmanager/fileconfigmanager_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/fileconfigmanager/fileconfigmanager_test.cpp
@@ -41,7 +41,7 @@ makeBaseConfigSnapshot()
DBCM dbcm(spec, "test");
DocumenttypesConfigSP dtcfg(config::ConfigGetter<DocumenttypesConfig>::getConfig("", spec).release());
BootstrapConfig::SP b(new BootstrapConfig(1, dtcfg,
- DocumentTypeRepo::SP(new DocumentTypeRepo(*dtcfg)),
+ std::shared_ptr<const DocumentTypeRepo>(new DocumentTypeRepo(*dtcfg)),
std::make_shared<ProtonConfig>(),
std::make_shared<FiledistributorrpcConfig>(),
std::make_shared<BucketspacesConfig>(),
diff --git a/searchcore/src/tests/proton/documentdb/lid_space_compaction/lid_space_compaction_test.cpp b/searchcore/src/tests/proton/documentdb/lid_space_compaction/lid_space_compaction_test.cpp
index 56bd99c90f6..82566025a30 100644
--- a/searchcore/src/tests/proton/documentdb/lid_space_compaction/lid_space_compaction_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/lid_space_compaction/lid_space_compaction_test.cpp
@@ -162,7 +162,7 @@ struct MyFrozenBucketHandler : public IFrozenBucketHandler
struct MyFeedView : public test::DummyFeedView
{
- MyFeedView(const DocumentTypeRepo::SP &repo)
+ MyFeedView(const std::shared_ptr<const DocumentTypeRepo> &repo)
: test::DummyFeedView(repo)
{
}
@@ -189,8 +189,8 @@ struct MySummaryManager : public test::DummySummaryManager
struct MySubDb : public test::DummyDocumentSubDb
{
- DocumentTypeRepo::SP _repo;
- MySubDb(const DocumentTypeRepo::SP &repo, std::shared_ptr<BucketDBOwner> bucketDB);
+ std::shared_ptr<const DocumentTypeRepo> _repo;
+ MySubDb(const std::shared_ptr<const DocumentTypeRepo> &repo, std::shared_ptr<BucketDBOwner> bucketDB);
~MySubDb();
virtual IFeedView::SP getFeedView() const override {
return IFeedView::SP(new MyFeedView(_repo));
@@ -198,7 +198,7 @@ struct MySubDb : public test::DummyDocumentSubDb
};
-MySubDb::MySubDb(const DocumentTypeRepo::SP &repo, std::shared_ptr<BucketDBOwner> bucketDB)
+MySubDb::MySubDb(const std::shared_ptr<const DocumentTypeRepo> &repo, std::shared_ptr<BucketDBOwner> bucketDB)
: test::DummyDocumentSubDb(bucketDB, SUBDB_ID),
_repo(repo)
{
diff --git a/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp b/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp
index bf88a0c3003..9810b7243a5 100644
--- a/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp
@@ -87,11 +87,11 @@ class MyDocumentSubDB
uint32_t _subDBId;
DocumentMetaStore::SP _metaStoreSP;
DocumentMetaStore & _metaStore;
- const document::DocumentTypeRepo::SP &_repo;
+ const std::shared_ptr<const document::DocumentTypeRepo> &_repo;
const DocTypeName &_docTypeName;
public:
- MyDocumentSubDB(uint32_t subDBId, SubDbType subDbType, const document::DocumentTypeRepo::SP &repo,
+ MyDocumentSubDB(uint32_t subDBId, SubDbType subDbType, const std::shared_ptr<const document::DocumentTypeRepo> &repo,
std::shared_ptr<BucketDBOwner> bucketDB, const DocTypeName &docTypeName);
~MyDocumentSubDB();
@@ -124,7 +124,7 @@ public:
const IDocumentMetaStore &getMetaStore() const { return _metaStore; }
};
-MyDocumentSubDB::MyDocumentSubDB(uint32_t subDBId, SubDbType subDbType, const document::DocumentTypeRepo::SP &repo,
+MyDocumentSubDB::MyDocumentSubDB(uint32_t subDBId, SubDbType subDbType, const std::shared_ptr<const document::DocumentTypeRepo> &repo,
std::shared_ptr<BucketDBOwner> bucketDB, const DocTypeName &docTypeName)
: _docs(),
_subDBId(subDBId),
diff --git a/searchcore/src/tests/proton/documentdb/storeonlyfeedview/storeonlyfeedview_test.cpp b/searchcore/src/tests/proton/documentdb/storeonlyfeedview/storeonlyfeedview_test.cpp
index bbdabe2d0ef..e8247a52199 100644
--- a/searchcore/src/tests/proton/documentdb/storeonlyfeedview/storeonlyfeedview_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/storeonlyfeedview/storeonlyfeedview_test.cpp
@@ -55,10 +55,10 @@ public:
void heartBeat(SerialNum) override { ++_heartbeatCount; }
};
-DocumentTypeRepo::SP myGetDocumentTypeRepo() {
+std::shared_ptr<const DocumentTypeRepo> myGetDocumentTypeRepo() {
Schema schema;
DocBuilder builder(schema);
- DocumentTypeRepo::SP repo = builder.getDocumentTypeRepo();
+ std::shared_ptr<const DocumentTypeRepo> repo = builder.getDocumentTypeRepo();
ASSERT_TRUE(repo.get());
return repo;
}
diff --git a/searchcore/src/tests/proton/feedoperation/feedoperation_test.cpp b/searchcore/src/tests/proton/feedoperation/feedoperation_test.cpp
index 896a9debef3..a43bbd050db 100644
--- a/searchcore/src/tests/proton/feedoperation/feedoperation_test.cpp
+++ b/searchcore/src/tests/proton/feedoperation/feedoperation_test.cpp
@@ -112,7 +112,7 @@ makeDocTypeRepo()
struct Fixture
{
- DocumentTypeRepo::SP _repo;
+ std::shared_ptr<const DocumentTypeRepo> _repo;
const DocumentType &_docType;
public:
diff --git a/searchcore/src/tests/proton/proton_configurer/proton_configurer_test.cpp b/searchcore/src/tests/proton/proton_configurer/proton_configurer_test.cpp
index d59a67d73bb..9de850b37ec 100644
--- a/searchcore/src/tests/proton/proton_configurer/proton_configurer_test.cpp
+++ b/searchcore/src/tests/proton/proton_configurer/proton_configurer_test.cpp
@@ -70,7 +70,7 @@ struct DBConfigFixture {
DocumentDBConfig::SP getConfig(int64_t generation,
std::shared_ptr<DocumenttypesConfig> documentTypes,
- DocumentTypeRepo::SP repo,
+ std::shared_ptr<const DocumentTypeRepo> repo,
const vespalib::string &configId,
const vespalib::string &docTypeName)
{
@@ -167,7 +167,7 @@ struct ConfigFixture {
BootstrapConfig::SP getBootstrapConfig(int64_t generation) const {
return BootstrapConfig::SP(new BootstrapConfig(generation,
BootstrapConfig::DocumenttypesConfigSP(new DocumenttypesConfig(_documenttypesBuilder)),
- DocumentTypeRepo::SP(new DocumentTypeRepo(_documenttypesBuilder)),
+ std::shared_ptr<const DocumentTypeRepo>(new DocumentTypeRepo(_documenttypesBuilder)),
BootstrapConfig::ProtonConfigSP(new ProtonConfig(_protonBuilder)),
std::make_shared<FiledistributorrpcConfig>(),
std::make_shared<BucketspacesConfig>(_bucketspacesBuilder),
diff --git a/searchcore/src/tests/proton/server/feedstates_test.cpp b/searchcore/src/tests/proton/server/feedstates_test.cpp
index a6f3496e1ed..edb581347c6 100644
--- a/searchcore/src/tests/proton/server/feedstates_test.cpp
+++ b/searchcore/src/tests/proton/server/feedstates_test.cpp
@@ -34,13 +34,13 @@ namespace {
struct MyFeedView : public test::DummyFeedView {
TestDocRepo repo;
- DocumentTypeRepo::SP repo_sp;
+ std::shared_ptr<const DocumentTypeRepo> repo_sp;
int remove_handled;
MyFeedView();
~MyFeedView();
- const DocumentTypeRepo::SP &getDocumentTypeRepo() const override { return repo_sp; }
+ const std::shared_ptr<const DocumentTypeRepo> &getDocumentTypeRepo() const override { return repo_sp; }
void handleRemove(FeedToken , const RemoveOperation &) override { ++remove_handled; }
};
diff --git a/searchcore/src/vespa/searchcore/proton/docsummary/isummarymanager.h b/searchcore/src/vespa/searchcore/proton/docsummary/isummarymanager.h
index 3426c689122..4f3e7bf538b 100644
--- a/searchcore/src/vespa/searchcore/proton/docsummary/isummarymanager.h
+++ b/searchcore/src/vespa/searchcore/proton/docsummary/isummarymanager.h
@@ -51,7 +51,7 @@ public:
createSummarySetup(const vespa::config::search::SummaryConfig &summaryCfg,
const vespa::config::search::SummarymapConfig &summarymapCfg,
const vespa::config::search::summary::JuniperrcConfig &juniperCfg,
- const document::DocumentTypeRepo::SP &repo,
+ const std::shared_ptr<const document::DocumentTypeRepo> &repo,
const std::shared_ptr<search::IAttributeManager> &attributeMgr) = 0;
virtual search::IDocumentStore &getBackingStore() = 0;
diff --git a/searchcore/src/vespa/searchcore/proton/docsummary/summarymanager.cpp b/searchcore/src/vespa/searchcore/proton/docsummary/summarymanager.cpp
index a8ec474e88c..6636552b695 100644
--- a/searchcore/src/vespa/searchcore/proton/docsummary/summarymanager.cpp
+++ b/searchcore/src/vespa/searchcore/proton/docsummary/summarymanager.cpp
@@ -81,7 +81,7 @@ SummaryManager::SummarySetup::
SummarySetup(const vespalib::string & baseDir, const DocTypeName & docTypeName, const SummaryConfig & summaryCfg,
const SummarymapConfig & summarymapCfg, const JuniperrcConfig & juniperCfg,
const search::IAttributeManager::SP &attributeMgr, const search::IDocumentStore::SP & docStore,
- const DocumentTypeRepo::SP &repo)
+ const std::shared_ptr<const DocumentTypeRepo> &repo)
: _docsumWriter(),
_wordFolder(),
_juniperProps(juniperCfg),
@@ -138,7 +138,7 @@ SummaryManager::SummarySetup::createDocsumStore(const vespalib::string &resultCl
ISummaryManager::ISummarySetup::SP
SummaryManager::createSummarySetup(const SummaryConfig & summaryCfg, const SummarymapConfig & summarymapCfg,
- const JuniperrcConfig & juniperCfg, const DocumentTypeRepo::SP &repo,
+ const JuniperrcConfig & juniperCfg, const std::shared_ptr<const DocumentTypeRepo> &repo,
const search::IAttributeManager::SP &attributeMgr)
{
return std::make_shared<SummarySetup>(_baseDir, _docTypeName, summaryCfg, summarymapCfg,
diff --git a/searchcore/src/vespa/searchcore/proton/docsummary/summarymanager.h b/searchcore/src/vespa/searchcore/proton/docsummary/summarymanager.h
index 826c39046a4..f6bd8cced6f 100644
--- a/searchcore/src/vespa/searchcore/proton/docsummary/summarymanager.h
+++ b/searchcore/src/vespa/searchcore/proton/docsummary/summarymanager.h
@@ -32,7 +32,7 @@ public:
search::IAttributeManager::SP _attributeMgr;
search::IDocumentStore::SP _docStore;
FieldCacheRepo::UP _fieldCacheRepo;
- const document::DocumentTypeRepo::SP _repo;
+ const std::shared_ptr<const document::DocumentTypeRepo> _repo;
std::set<vespalib::string> _markupFields;
public:
SummarySetup(const vespalib::string & baseDir,
@@ -42,7 +42,7 @@ public:
const vespa::config::search::summary::JuniperrcConfig & juniperCfg,
const search::IAttributeManager::SP &attributeMgr,
const search::IDocumentStore::SP & docStore,
- const document::DocumentTypeRepo::SP &repo);
+ const std::shared_ptr<const document::DocumentTypeRepo> &repo);
search::docsummary::IDocsumWriter & getDocsumWriter() const override { return *_docsumWriter; }
search::docsummary::ResultConfig & getResultConfig() override { return *_docsumWriter->GetResultConfig(); }
@@ -83,7 +83,7 @@ public:
createSummarySetup(const vespa::config::search::SummaryConfig &summaryCfg,
const vespa::config::search::SummarymapConfig &summarymapCfg,
const vespa::config::search::summary::JuniperrcConfig &juniperCfg,
- const document::DocumentTypeRepo::SP &repo,
+ const std::shared_ptr<const document::DocumentTypeRepo> &repo,
const search::IAttributeManager::SP &attributeMgr) override;
search::IDocumentStore & getBackingStore() override { return *_docStore; }
diff --git a/searchcore/src/vespa/searchcore/proton/reprocessing/reprocess_documents_task.cpp b/searchcore/src/vespa/searchcore/proton/reprocessing/reprocess_documents_task.cpp
index 0b0b16653e2..f3b41c745b6 100644
--- a/searchcore/src/vespa/searchcore/proton/reprocessing/reprocess_documents_task.cpp
+++ b/searchcore/src/vespa/searchcore/proton/reprocessing/reprocess_documents_task.cpp
@@ -10,7 +10,7 @@ namespace proton {
ReprocessDocumentsTask::
ReprocessDocumentsTask(IReprocessingInitializer &initializer,
const proton::ISummaryManager::SP &sm,
- const document::DocumentTypeRepo::SP &docTypeRepo,
+ const std::shared_ptr<const document::DocumentTypeRepo> &docTypeRepo,
const vespalib::string &subDbName,
uint32_t docIdLimit)
: _sm(sm),
diff --git a/searchcore/src/vespa/searchcore/proton/reprocessing/reprocess_documents_task.h b/searchcore/src/vespa/searchcore/proton/reprocessing/reprocess_documents_task.h
index 622117149f5..8d0f54965a8 100644
--- a/searchcore/src/vespa/searchcore/proton/reprocessing/reprocess_documents_task.h
+++ b/searchcore/src/vespa/searchcore/proton/reprocessing/reprocess_documents_task.h
@@ -21,7 +21,7 @@ class ReprocessDocumentsTask : public IReprocessingTask,
public search::IDocumentStoreVisitorProgress
{
proton::ISummaryManager::SP _sm;
- document::DocumentTypeRepo::SP _docTypeRepo;
+ std::shared_ptr<const document::DocumentTypeRepo> _docTypeRepo;
vespalib::string _subDbName;
double _visitorProgress;
double _visitorCost;
@@ -33,7 +33,7 @@ class ReprocessDocumentsTask : public IReprocessingTask,
public:
ReprocessDocumentsTask(IReprocessingInitializer &initializer,
const proton::ISummaryManager::SP &sm,
- const document::DocumentTypeRepo::SP &docTypeRepo,
+ const std::shared_ptr<const document::DocumentTypeRepo> &docTypeRepo,
const vespalib::string &subDbName,
uint32_t docIdLimit);
diff --git a/searchcore/src/vespa/searchcore/proton/server/bootstrapconfig.cpp b/searchcore/src/vespa/searchcore/proton/server/bootstrapconfig.cpp
index 1bc5cf00ad0..68abbe87c21 100644
--- a/searchcore/src/vespa/searchcore/proton/server/bootstrapconfig.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/bootstrapconfig.cpp
@@ -25,7 +25,7 @@ namespace proton {
BootstrapConfig::BootstrapConfig(
int64_t generation,
const DocumenttypesConfigSP &documenttypes,
- const DocumentTypeRepo::SP &repo,
+ const std::shared_ptr<const DocumentTypeRepo> &repo,
const ProtonConfigSP &protonConfig,
const FiledistributorrpcConfigSP &filedistRpcConfSP,
const BucketspacesConfigSP &bucketspaces,
diff --git a/searchcore/src/vespa/searchcore/proton/server/bootstrapconfig.h b/searchcore/src/vespa/searchcore/proton/server/bootstrapconfig.h
index 368cc30d8a4..bdad8c31337 100644
--- a/searchcore/src/vespa/searchcore/proton/server/bootstrapconfig.h
+++ b/searchcore/src/vespa/searchcore/proton/server/bootstrapconfig.h
@@ -32,7 +32,7 @@ public:
private:
DocumenttypesConfigSP _documenttypes;
- document::DocumentTypeRepo::SP _repo;
+ std::shared_ptr<const document::DocumentTypeRepo> _repo;
ProtonConfigSP _proton;
FiledistributorrpcConfigSP _fileDistributorRpc;
BucketspacesConfigSP _bucketspaces;
@@ -43,7 +43,7 @@ private:
public:
BootstrapConfig(int64_t generation,
const DocumenttypesConfigSP & documenttypes,
- const document::DocumentTypeRepo::SP &repo,
+ const std::shared_ptr<const document::DocumentTypeRepo> &repo,
const ProtonConfigSP &protonConfig,
const FiledistributorrpcConfigSP &filedistRpcConfSP,
const BucketspacesConfigSP &bucketspaces,
@@ -55,7 +55,7 @@ public:
const FiledistributorrpcConfig &getFiledistributorrpcConfig() const { return *_fileDistributorRpc; }
const FiledistributorrpcConfigSP &getFiledistributorrpcConfigSP() const { return _fileDistributorRpc; }
const DocumenttypesConfigSP &getDocumenttypesConfigSP() const { return _documenttypes; }
- const document::DocumentTypeRepo::SP &getDocumentTypeRepoSP() const { return _repo; }
+ const std::shared_ptr<const document::DocumentTypeRepo> &getDocumentTypeRepoSP() const { return _repo; }
const vespa::config::search::core::ProtonConfig &getProtonConfig() const { return *_proton; }
const ProtonConfigSP &getProtonConfigSP() const { return _proton; }
const BucketspacesConfigSP &getBucketspacesConfigSP() const { return _bucketspaces; }
diff --git a/searchcore/src/vespa/searchcore/proton/server/bootstrapconfigmanager.cpp b/searchcore/src/vespa/searchcore/proton/server/bootstrapconfigmanager.cpp
index c3310dd193b..9f0d694aa57 100644
--- a/searchcore/src/vespa/searchcore/proton/server/bootstrapconfigmanager.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/bootstrapconfigmanager.cpp
@@ -58,7 +58,7 @@ BootstrapConfigManager::update(const ConfigSnapshot & snapshot)
BootstrapConfig::FiledistributorrpcConfigSP newFiledistRpcConfSP;
TuneFileDocumentDB::SP newTuneFileDocumentDB;
DocumenttypesConfigSP newDocumenttypesConfig;
- DocumentTypeRepo::SP newRepo;
+ std::shared_ptr<const DocumentTypeRepo> newRepo;
BucketspacesConfigSP newBucketspacesConfig;
int64_t currentGen = -1;
diff --git a/searchcore/src/vespa/searchcore/proton/server/combiningfeedview.cpp b/searchcore/src/vespa/searchcore/proton/server/combiningfeedview.cpp
index 106ce846d99..71b6fe73e38 100644
--- a/searchcore/src/vespa/searchcore/proton/server/combiningfeedview.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/combiningfeedview.cpp
@@ -19,7 +19,7 @@ namespace proton
namespace
{
-DocumentTypeRepo::SP
+std::shared_ptr<const DocumentTypeRepo>
getRepo(const std::vector<IFeedView::SP> &views)
{
for (const auto &view : views) {
@@ -28,7 +28,7 @@ getRepo(const std::vector<IFeedView::SP> &views)
return view->getDocumentTypeRepo();
}
abort();
- return DocumentTypeRepo::SP();
+ return std::shared_ptr<const DocumentTypeRepo>();
}
};
@@ -92,7 +92,7 @@ CombiningFeedView::findPrevDbdId(const document::GlobalId &gid,
}
}
-const DocumentTypeRepo::SP &
+const std::shared_ptr<const DocumentTypeRepo> &
CombiningFeedView::getDocumentTypeRepo() const
{
return _repo;
diff --git a/searchcore/src/vespa/searchcore/proton/server/combiningfeedview.h b/searchcore/src/vespa/searchcore/proton/server/combiningfeedview.h
index 284004dfa81..6644f21a3b7 100644
--- a/searchcore/src/vespa/searchcore/proton/server/combiningfeedview.h
+++ b/searchcore/src/vespa/searchcore/proton/server/combiningfeedview.h
@@ -22,7 +22,7 @@ namespace proton {
class CombiningFeedView : public IFeedView
{
private:
- const document::DocumentTypeRepo::SP _repo;
+ const std::shared_ptr<const document::DocumentTypeRepo> _repo;
std::vector<IFeedView::SP> _views;
std::vector<const ISimpleDocumentMetaStore *> _metaStores;
IBucketStateCalculator::SP _calc;
@@ -64,7 +64,7 @@ public:
~CombiningFeedView() override;
- const document::DocumentTypeRepo::SP & getDocumentTypeRepo() const override;
+ const std::shared_ptr<const document::DocumentTypeRepo> & getDocumentTypeRepo() const override;
/**
* Similar to IPersistenceHandler functions.
diff --git a/searchcore/src/vespa/searchcore/proton/server/documentdbconfig.cpp b/searchcore/src/vespa/searchcore/proton/server/documentdbconfig.cpp
index db73e9f38b8..c3bc7fbed45 100644
--- a/searchcore/src/vespa/searchcore/proton/server/documentdbconfig.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/documentdbconfig.cpp
@@ -56,7 +56,7 @@ DocumentDBConfig::DocumentDBConfig(
const SummarymapConfigSP &summarymap,
const JuniperrcConfigSP &juniperrc,
const DocumenttypesConfigSP &documenttypes,
- const DocumentTypeRepo::SP &repo,
+ const std::shared_ptr<const DocumentTypeRepo> &repo,
const ImportedFieldsConfigSP &importedFields,
const search::TuneFileDocumentDB::SP &tuneFileDocumentDB,
const Schema::SP &schema,
diff --git a/searchcore/src/vespa/searchcore/proton/server/documentdbconfig.h b/searchcore/src/vespa/searchcore/proton/server/documentdbconfig.h
index df023028123..e5010d7a782 100644
--- a/searchcore/src/vespa/searchcore/proton/server/documentdbconfig.h
+++ b/searchcore/src/vespa/searchcore/proton/server/documentdbconfig.h
@@ -112,7 +112,7 @@ private:
SummarymapConfigSP _summarymap;
JuniperrcConfigSP _juniperrc;
DocumenttypesConfigSP _documenttypes;
- document::DocumentTypeRepo::SP _repo;
+ std::shared_ptr<const document::DocumentTypeRepo> _repo;
ImportedFieldsConfigSP _importedFields;
search::TuneFileDocumentDB::SP _tuneFileDocumentDB;
search::index::Schema::SP _schema;
@@ -148,7 +148,7 @@ public:
const SummarymapConfigSP &summarymap,
const JuniperrcConfigSP &juniperrc,
const DocumenttypesConfigSP &documenttypesConfig,
- const document::DocumentTypeRepo::SP &repo,
+ const std::shared_ptr<const document::DocumentTypeRepo> &repo,
const ImportedFieldsConfigSP &importedFields,
const search::TuneFileDocumentDB::SP &tuneFileDocumentDB,
const search::index::Schema::SP &schema,
@@ -183,7 +183,7 @@ public:
const SummarymapConfigSP &getSummarymapConfigSP() const { return _summarymap; }
const JuniperrcConfigSP &getJuniperrcConfigSP() const { return _juniperrc; }
const DocumenttypesConfigSP &getDocumenttypesConfigSP() const { return _documenttypes; }
- const document::DocumentTypeRepo::SP &getDocumentTypeRepoSP() const { return _repo; }
+ const std::shared_ptr<const document::DocumentTypeRepo> &getDocumentTypeRepoSP() const { return _repo; }
const document::DocumentType *getDocumentType() const { return _repo->getDocumentType(getDocTypeName()); }
const ImportedFieldsConfig &getImportedFieldsConfig() const { return *_importedFields; }
const ImportedFieldsConfigSP &getImportedFieldsConfigSP() const { return _importedFields; }
diff --git a/searchcore/src/vespa/searchcore/proton/server/fast_access_doc_subdb.cpp b/searchcore/src/vespa/searchcore/proton/server/fast_access_doc_subdb.cpp
index 2a3bc600a8f..acb097c16aa 100644
--- a/searchcore/src/vespa/searchcore/proton/server/fast_access_doc_subdb.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/fast_access_doc_subdb.cpp
@@ -187,7 +187,7 @@ FastAccessDocSubDB::reconfigureAttributeMetrics(const proton::IAttributeManager
IReprocessingTask::UP
FastAccessDocSubDB::createReprocessingTask(IReprocessingInitializer &initializer,
- const document::DocumentTypeRepo::SP &docTypeRepo) const
+ const std::shared_ptr<const document::DocumentTypeRepo> &docTypeRepo) const
{
uint32_t docIdLimit = _metaStoreCtx->get().getCommittedDocIdLimit();
assert(docIdLimit > 0);
diff --git a/searchcore/src/vespa/searchcore/proton/server/fast_access_doc_subdb.h b/searchcore/src/vespa/searchcore/proton/server/fast_access_doc_subdb.h
index 32c006fd8b7..de2d82aed39 100644
--- a/searchcore/src/vespa/searchcore/proton/server/fast_access_doc_subdb.h
+++ b/searchcore/src/vespa/searchcore/proton/server/fast_access_doc_subdb.h
@@ -94,7 +94,7 @@ protected:
void reconfigureAttributeMetrics(const IAttributeManager &newMgr, const IAttributeManager &oldMgr);
IReprocessingTask::UP createReprocessingTask(IReprocessingInitializer &initializer,
- const document::DocumentTypeRepo::SP &docTypeRepo) const;
+ const std::shared_ptr<const document::DocumentTypeRepo> &docTypeRepo) const;
public:
FastAccessDocSubDB(const Config &cfg, const Context &ctx);
diff --git a/searchcore/src/vespa/searchcore/proton/server/fast_access_doc_subdb_configurer.cpp b/searchcore/src/vespa/searchcore/proton/server/fast_access_doc_subdb_configurer.cpp
index 2b9a37fac0b..36d5ec31a71 100644
--- a/searchcore/src/vespa/searchcore/proton/server/fast_access_doc_subdb_configurer.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/fast_access_doc_subdb_configurer.cpp
@@ -17,7 +17,7 @@ using ARIConfig = AttributeReprocessingInitializer::Config;
void
FastAccessDocSubDBConfigurer::reconfigureFeedView(const FastAccessFeedView::SP &curr,
const Schema::SP &schema,
- const DocumentTypeRepo::SP &repo,
+ const std::shared_ptr<const DocumentTypeRepo> &repo,
const IAttributeWriter::SP &writer)
{
_feedView.set(FastAccessFeedView::SP(new FastAccessFeedView(
diff --git a/searchcore/src/vespa/searchcore/proton/server/fast_access_doc_subdb_configurer.h b/searchcore/src/vespa/searchcore/proton/server/fast_access_doc_subdb_configurer.h
index 350992702a2..e1744ff2d28 100644
--- a/searchcore/src/vespa/searchcore/proton/server/fast_access_doc_subdb_configurer.h
+++ b/searchcore/src/vespa/searchcore/proton/server/fast_access_doc_subdb_configurer.h
@@ -24,7 +24,7 @@ private:
void reconfigureFeedView(const FastAccessFeedView::SP &curr,
const search::index::Schema::SP &schema,
- const document::DocumentTypeRepo::SP &repo,
+ const std::shared_ptr<const document::DocumentTypeRepo> &repo,
const IAttributeWriter::SP &attrWriter);
public:
diff --git a/searchcore/src/vespa/searchcore/proton/server/fileconfigmanager.cpp b/searchcore/src/vespa/searchcore/proton/server/fileconfigmanager.cpp
index 37a8ee2aadf..e017d9b81d4 100644
--- a/searchcore/src/vespa/searchcore/proton/server/fileconfigmanager.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/fileconfigmanager.cpp
@@ -340,7 +340,7 @@ FileConfigManager::loadConfig(const DocumentDBConfig &currentSnapshot,
typedef DocumenttypesConfig DTC;
typedef DocumentDBConfig::DocumenttypesConfigSP DTCSP;
DTCSP docTypesCfg(config::ConfigGetter<DTC>::getConfig("", spec).release());
- DocumentTypeRepo::SP repo;
+ std::shared_ptr<const DocumentTypeRepo> repo;
if (currentSnapshot.getDocumenttypesConfigSP() &&
currentSnapshot.getDocumentTypeRepoSP() &&
currentSnapshot.getDocumenttypesConfig() == *docTypesCfg) {
diff --git a/searchcore/src/vespa/searchcore/proton/server/minimal_document_retriever.cpp b/searchcore/src/vespa/searchcore/proton/server/minimal_document_retriever.cpp
index 473bba330ed..c2cf1f1e141 100644
--- a/searchcore/src/vespa/searchcore/proton/server/minimal_document_retriever.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/minimal_document_retriever.cpp
@@ -12,7 +12,7 @@ namespace proton {
MinimalDocumentRetriever::MinimalDocumentRetriever(
const DocTypeName &docTypeName,
- const DocumentTypeRepo::SP repo,
+ const std::shared_ptr<const DocumentTypeRepo> repo,
const IDocumentMetaStoreContext &meta_store,
const IDocumentStore &doc_store,
bool hasFields)
diff --git a/searchcore/src/vespa/searchcore/proton/server/minimal_document_retriever.h b/searchcore/src/vespa/searchcore/proton/server/minimal_document_retriever.h
index c2866818fc6..c60372c6253 100644
--- a/searchcore/src/vespa/searchcore/proton/server/minimal_document_retriever.h
+++ b/searchcore/src/vespa/searchcore/proton/server/minimal_document_retriever.h
@@ -16,13 +16,13 @@ namespace proton {
*/
class MinimalDocumentRetriever : public DocumentRetrieverBase
{
- const document::DocumentTypeRepo::SP _repo;
+ const std::shared_ptr<const document::DocumentTypeRepo> _repo;
const search::IDocumentStore &_doc_store;
public:
// meta_store and doc_store must out-live the MinimalDocumentRetriever.
MinimalDocumentRetriever(const DocTypeName &docTypeName,
- const document::DocumentTypeRepo::SP repo,
+ const std::shared_ptr<const document::DocumentTypeRepo> repo,
const IDocumentMetaStoreContext &meta_store,
const search::IDocumentStore &doc_store,
bool hasFields);
diff --git a/searchcore/src/vespa/searchcore/proton/server/proton.cpp b/searchcore/src/vespa/searchcore/proton/server/proton.cpp
index e8ded2eb4d6..3364b470ee0 100644
--- a/searchcore/src/vespa/searchcore/proton/server/proton.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/proton.cpp
@@ -335,7 +335,7 @@ Proton::applyConfig(const BootstrapConfig::SP & configSnapshot)
_queryLimiter.configure(protonConfig.search.memory.limiter.maxthreads,
protonConfig.search.memory.limiter.mincoverage,
protonConfig.search.memory.limiter.minhits);
- const DocumentTypeRepo::SP repo = configSnapshot->getDocumentTypeRepoSP();
+ const std::shared_ptr<const DocumentTypeRepo> repo = configSnapshot->getDocumentTypeRepoSP();
_diskMemUsageSampler->setConfig(diskMemUsageSamplerConfig(protonConfig, configSnapshot->getHwInfo()));
if (_memoryFlushConfigUpdater) {
@@ -353,7 +353,7 @@ Proton::addDocumentDB(const DocTypeName &docTypeName,
InitializeThreads initializeThreads)
{
try {
- const DocumentTypeRepo::SP repo = bootstrapConfig->getDocumentTypeRepoSP();
+ const std::shared_ptr<const DocumentTypeRepo> repo = bootstrapConfig->getDocumentTypeRepoSP();
const document::DocumentType *docType = repo->getDocumentType(docTypeName.getName());
if (docType != NULL) {
LOG(info, "Add document database: doctypename(%s), configid(%s)",
diff --git a/searchcore/src/vespa/searchcore/proton/server/searchable_doc_subdb_configurer.cpp b/searchcore/src/vespa/searchcore/proton/server/searchable_doc_subdb_configurer.cpp
index e7e6c213eb2..42dcd2f97d5 100644
--- a/searchcore/src/vespa/searchcore/proton/server/searchable_doc_subdb_configurer.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/searchable_doc_subdb_configurer.cpp
@@ -39,7 +39,7 @@ SearchableDocSubDBConfigurer::reconfigureFeedView(const IIndexWriter::SP &indexW
const ISummaryAdapter::SP &summaryAdapter,
const IAttributeWriter::SP &attrWriter,
const Schema::SP &schema,
- const DocumentTypeRepo::SP &repo,
+ const std::shared_ptr<const DocumentTypeRepo> &repo,
const SearchView::SP &searchView)
{
SearchableFeedView::SP curr = _feedView.get();
diff --git a/searchcore/src/vespa/searchcore/proton/server/searchable_doc_subdb_configurer.h b/searchcore/src/vespa/searchcore/proton/server/searchable_doc_subdb_configurer.h
index 39be383dcd3..c793ba815d2 100644
--- a/searchcore/src/vespa/searchcore/proton/server/searchable_doc_subdb_configurer.h
+++ b/searchcore/src/vespa/searchcore/proton/server/searchable_doc_subdb_configurer.h
@@ -54,7 +54,7 @@ private:
const ISummaryAdapter::SP &summaryAdapter,
const IAttributeWriter::SP &attrWriter,
const search::index::Schema::SP &schema,
- const document::DocumentTypeRepo::SP &repo,
+ const std::shared_ptr<const document::DocumentTypeRepo> &repo,
const SearchView::SP &searchView);
void
diff --git a/searchcore/src/vespa/searchcore/proton/server/storeonlyfeedview.h b/searchcore/src/vespa/searchcore/proton/server/storeonlyfeedview.h
index a8119224ba8..b106b87c4fe 100644
--- a/searchcore/src/vespa/searchcore/proton/server/storeonlyfeedview.h
+++ b/searchcore/src/vespa/searchcore/proton/server/storeonlyfeedview.h
@@ -74,7 +74,7 @@ public:
const search::index::Schema::SP &_schema;
const IDocumentMetaStoreContext::SP &_documentMetaStoreContext;
IGidToLidChangeHandler &_gidToLidChangeHandler;
- const document::DocumentTypeRepo::SP &_repo;
+ const std::shared_ptr<const document::DocumentTypeRepo> &_repo;
searchcorespi::index::IThreadingService &_writeService;
documentmetastore::ILidReuseDelayer &_lidReuseDelayer;
CommitTimeTracker &_commitTimeTracker;
@@ -83,7 +83,7 @@ public:
const search::index::Schema::SP &schema,
const IDocumentMetaStoreContext::SP &documentMetaStoreContext,
IGidToLidChangeHandler &gidToLidChangeHandler,
- const document::DocumentTypeRepo::SP &repo,
+ const std::shared_ptr<const document::DocumentTypeRepo> &repo,
searchcorespi::index::IThreadingService &writeService,
documentmetastore::ILidReuseDelayer &lidReuseDelayer,
CommitTimeTracker &commitTimeTracker)
@@ -137,7 +137,7 @@ protected:
private:
const ISummaryAdapter::SP _summaryAdapter;
const IDocumentMetaStoreContext::SP _documentMetaStoreContext;
- const document::DocumentTypeRepo::SP _repo;
+ const std::shared_ptr<const document::DocumentTypeRepo> _repo;
const document::DocumentType *_docType;
documentmetastore::ILidReuseDelayer &_lidReuseDelayer;
CommitTimeTracker &_commitTimeTracker;
@@ -232,7 +232,7 @@ public:
CommitTimeTracker &getCommitTimeTracker() { return _commitTimeTracker; }
IGidToLidChangeHandler &getGidToLidChangeHandler() const { return _gidToLidChangeHandler; }
- const document::DocumentTypeRepo::SP &getDocumentTypeRepo() const override { return _repo; }
+ const std::shared_ptr<const document::DocumentTypeRepo> &getDocumentTypeRepo() const override { return _repo; }
const ISimpleDocumentMetaStore *getDocumentMetaStorePtr() const override;
void preparePut(PutOperation &putOp) override;
diff --git a/searchcore/src/vespa/searchcore/proton/test/documentdb_config_builder.h b/searchcore/src/vespa/searchcore/proton/test/documentdb_config_builder.h
index 0dd812c354c..2de71dc3e1b 100644
--- a/searchcore/src/vespa/searchcore/proton/test/documentdb_config_builder.h
+++ b/searchcore/src/vespa/searchcore/proton/test/documentdb_config_builder.h
@@ -20,7 +20,7 @@ private:
DocumentDBConfig::SummarymapConfigSP _summarymap;
DocumentDBConfig::JuniperrcConfigSP _juniperrc;
DocumentDBConfig::DocumenttypesConfigSP _documenttypes;
- document::DocumentTypeRepo::SP _repo;
+ std::shared_ptr<const document::DocumentTypeRepo> _repo;
DocumentDBConfig::ImportedFieldsConfigSP _importedFields;
search::TuneFileDocumentDB::SP _tuneFileDocumentDB;
search::index::Schema::SP _schema;
@@ -38,7 +38,7 @@ public:
DocumentDBConfigBuilder(const DocumentDBConfig &cfg);
- DocumentDBConfigBuilder &repo(const document::DocumentTypeRepo::SP &repo_in) {
+ DocumentDBConfigBuilder &repo(const std::shared_ptr<const document::DocumentTypeRepo> &repo_in) {
_repo = repo_in;
return *this;
}
diff --git a/searchcore/src/vespa/searchcore/proton/test/dummy_feed_view.h b/searchcore/src/vespa/searchcore/proton/test/dummy_feed_view.h
index 163168a1a09..fd15e09bcd0 100644
--- a/searchcore/src/vespa/searchcore/proton/test/dummy_feed_view.h
+++ b/searchcore/src/vespa/searchcore/proton/test/dummy_feed_view.h
@@ -8,15 +8,15 @@ namespace proton::test {
struct DummyFeedView : public IFeedView
{
- document::DocumentTypeRepo::SP _docTypeRepo;
+ std::shared_ptr<const document::DocumentTypeRepo> _docTypeRepo;
DummyFeedView()
: _docTypeRepo()
{}
- DummyFeedView(const document::DocumentTypeRepo::SP &docTypeRepo)
+ DummyFeedView(const std::shared_ptr<const document::DocumentTypeRepo> &docTypeRepo)
: _docTypeRepo(docTypeRepo)
{}
- const document::DocumentTypeRepo::SP &getDocumentTypeRepo() const override {
+ const std::shared_ptr<const document::DocumentTypeRepo> &getDocumentTypeRepo() const override {
return _docTypeRepo;
}
const ISimpleDocumentMetaStore *getDocumentMetaStorePtr() const override {
diff --git a/searchcore/src/vespa/searchcore/proton/test/dummy_summary_manager.h b/searchcore/src/vespa/searchcore/proton/test/dummy_summary_manager.h
index bd5bfa39f74..6eed0e3fb86 100644
--- a/searchcore/src/vespa/searchcore/proton/test/dummy_summary_manager.h
+++ b/searchcore/src/vespa/searchcore/proton/test/dummy_summary_manager.h
@@ -13,7 +13,7 @@ struct DummySummaryManager : public ISummaryManager
createSummarySetup(const vespa::config::search::SummaryConfig &,
const vespa::config::search::SummarymapConfig &,
const vespa::config::search::summary::JuniperrcConfig &,
- const document::DocumentTypeRepo::SP &,
+ const std::shared_ptr<const document::DocumentTypeRepo> &,
const std::shared_ptr<search::IAttributeManager> &) override {
return ISummarySetup::SP();
}
diff --git a/searchcore/src/vespa/searchcore/proton/test/userdocumentsbuilder.h b/searchcore/src/vespa/searchcore/proton/test/userdocumentsbuilder.h
index 4ee4800d2e2..875ca04224b 100644
--- a/searchcore/src/vespa/searchcore/proton/test/userdocumentsbuilder.h
+++ b/searchcore/src/vespa/searchcore/proton/test/userdocumentsbuilder.h
@@ -19,7 +19,7 @@ private:
public:
UserDocumentsBuilder();
~UserDocumentsBuilder();
- const document::DocumentTypeRepo::SP &getRepo() const {
+ const std::shared_ptr<const document::DocumentTypeRepo> &getRepo() const {
return _builder.getDocumentTypeRepo();
}
UserDocumentsBuilder &createDoc(uint32_t userId, search::DocumentIdT lid);