diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2019-12-19 14:27:19 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2019-12-19 14:27:19 +0000 |
commit | d043d0587d15ddeb014cd95f7392294241fa7f05 (patch) | |
tree | 5a54cc7a409155663df9b6f7590dae47df0dfb36 /searchcore | |
parent | c2ea426c8d955ff40873db1e7d06c482ca662e75 (diff) |
Use vespalib::count_s
Diffstat (limited to 'searchcore')
5 files changed, 10 insertions, 15 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/docsummary/summarymanagerinitializer.cpp b/searchcore/src/vespa/searchcore/proton/docsummary/summarymanagerinitializer.cpp index 415d13314a2..2f29231577a 100644 --- a/searchcore/src/vespa/searchcore/proton/docsummary/summarymanagerinitializer.cpp +++ b/searchcore/src/vespa/searchcore/proton/docsummary/summarymanagerinitializer.cpp @@ -28,8 +28,8 @@ SummaryManagerInitializer(const search::GrowStrategy &grow, _tuneFile(tuneFile), _fileHeaderContext(fileHeaderContext), _tlSyncer(tlSyncer), - _bucketizer(bucketizer), - _result(result) + _bucketizer(std::move(bucketizer)), + _result(std::move(result)) { } SummaryManagerInitializer::~SummaryManagerInitializer() = default; diff --git a/searchcore/src/vespa/searchcore/proton/matching/queryenvironment.cpp b/searchcore/src/vespa/searchcore/proton/matching/queryenvironment.cpp index ec48ee7164b..fe0f6aaff91 100644 --- a/searchcore/src/vespa/searchcore/proton/matching/queryenvironment.cpp +++ b/searchcore/src/vespa/searchcore/proton/matching/queryenvironment.cpp @@ -39,7 +39,7 @@ const search::fef::ITermData * QueryEnvironment::getTerm(uint32_t idx) const { if (idx >= _terms.size()) { - return 0; + return nullptr; } return _terms[idx]; } diff --git a/searchcore/src/vespa/searchcore/proton/matching/queryenvironment.h b/searchcore/src/vespa/searchcore/proton/matching/queryenvironment.h index 8f958870d52..575694ae079 100644 --- a/searchcore/src/vespa/searchcore/proton/matching/queryenvironment.h +++ b/searchcore/src/vespa/searchcore/proton/matching/queryenvironment.h @@ -80,7 +80,7 @@ public: // inherited from search::fef::IQueryEnvironment const search::fef::IIndexEnvironment & getIndexEnvironment() const override; - ~QueryEnvironment(); + ~QueryEnvironment() override; }; } diff --git a/searchcore/src/vespa/searchcore/proton/server/searchabledocsubdb.cpp b/searchcore/src/vespa/searchcore/proton/server/searchabledocsubdb.cpp index fc21621bee3..77852dcc918 100644 --- a/searchcore/src/vespa/searchcore/proton/server/searchabledocsubdb.cpp +++ b/searchcore/src/vespa/searchcore/proton/server/searchabledocsubdb.cpp @@ -13,13 +13,10 @@ #include <vespa/searchcore/proton/matching/sessionmanager.h> #include <vespa/searchcore/proton/reference/document_db_reference.h> #include <vespa/searchcore/proton/reference/gid_to_lid_change_handler.h> -#include <vespa/searchcorespi/plugin/iindexmanagerfactory.h> #include <vespa/searchlib/fef/indexproperties.h> #include <vespa/searchlib/fef/properties.h> -#include <vespa/vespalib/io/fileutil.h> #include <vespa/vespalib/util/closuretask.h> #include <vespa/eval/tensor/default_tensor_engine.h> -#include <vespa/vespalib/util/exceptions.h> using vespa::config::search::RankProfilesConfig; using proton::matching::MatchingStats; @@ -30,7 +27,6 @@ using search::GrowStrategy; using search::TuneFileDocumentDB; using search::index::Schema; using search::SerialNum; -using vespalib::IllegalStateException; using vespalib::ThreadStackExecutorBase; using namespace searchcorespi; @@ -320,7 +316,7 @@ SearchableDocSubDB::getSearchableStats() const IDocumentRetriever::UP SearchableDocSubDB::getDocumentRetriever() { - return IDocumentRetriever::UP(new FastAccessDocumentRetriever(_rFeedView.get(), _rSearchView.get()->getAttributeManager())); + return std::make_unique<FastAccessDocumentRetriever>(_rFeedView.get(), _rSearchView.get()->getAttributeManager()); } MatchingStats diff --git a/searchcore/src/vespa/searchcore/proton/server/storeonlydocsubdb.cpp b/searchcore/src/vespa/searchcore/proton/server/storeonlydocsubdb.cpp index 954f7f3c7f7..646346d53ad 100644 --- a/searchcore/src/vespa/searchcore/proton/server/storeonlydocsubdb.cpp +++ b/searchcore/src/vespa/searchcore/proton/server/storeonlydocsubdb.cpp @@ -18,7 +18,6 @@ #include <vespa/searchcore/proton/flushengine/threadedflushtarget.h> #include <vespa/searchcore/proton/index/index_writer.h> #include <vespa/searchcore/proton/matching/sessionmanager.h> -#include <vespa/searchcore/proton/metrics/metricswireservice.h> #include <vespa/searchcore/proton/reference/dummy_gid_to_lid_change_handler.h> #include <vespa/searchlib/attribute/configconverter.h> #include <vespa/searchlib/docstore/document_store_visitor_progress.h> @@ -86,7 +85,7 @@ StoreOnlyDocSubDB::Context::Context(IDocumentSubDBOwner &owner, _getSerialNum(getSerialNum), _fileHeaderContext(fileHeaderContext), _writeService(writeService), - _bucketDB(bucketDB), + _bucketDB(std::move(bucketDB)), _bucketDBHandlerInitializer(bucketDBHandlerInitializer), _metrics(metrics), _configMutex(configMutex), @@ -231,13 +230,13 @@ createSummaryManagerInitializer(const search::LogDocumentStore::Config & storeCf vespalib::string baseDir(_baseDir + "/summary"); return std::make_shared<SummaryManagerInitializer> (grow, baseDir, getSubDbName(), _docTypeName, _writeService.shared(), - storeCfg, tuneFile, _fileHeaderContext, _tlSyncer, bucketizer, result); + storeCfg, tuneFile, _fileHeaderContext, _tlSyncer, std::move(bucketizer), std::move(result)); } void StoreOnlyDocSubDB::setupSummaryManager(SummaryManager::SP summaryManager) { - _rSummaryMgr = summaryManager; + _rSummaryMgr = std::move(summaryManager); _iSummaryMgr = _rSummaryMgr; // Upcast allowed with std::shared_ptr _flushedDocumentStoreSerialNum = _iSummaryMgr->getBackingStore().lastSyncToken(); _summaryAdapter.reset(new SummaryAdapter(_rSummaryMgr)); @@ -316,7 +315,7 @@ StoreOnlyDocSubDB::setup(const DocumentSubDbInitializerResult &initResult) { setupDocumentMetaStore(initResult.documentMetaStore()); setupSummaryManager(initResult.summaryManager()); - _lidReuseDelayer.reset(new LidReuseDelayer(_writeService, *_dms)); + _lidReuseDelayer = std::make_unique<LidReuseDelayer>(_writeService, *_dms); updateLidReuseDelayer(initResult.lidReuseDelayerConfig()); } @@ -393,7 +392,7 @@ StoreOnlyDocSubDB::updateLidReuseDelayer(const DocumentDBConfig * newConfigSnaps void StoreOnlyDocSubDB::updateLidReuseDelayer(const LidReuseDelayerConfig &config) { - bool immediateCommit = config.visibilityDelay() == vespalib::duration::zero(); + bool immediateCommit = (config.visibilityDelay() == vespalib::duration::zero()); /* * The lid reuse delayer should not have any pending lids stored at this * time, since DocumentDB::applyConfig() calls forceCommit() on the |