aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore/src
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2022-12-08 17:17:33 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2022-12-08 17:17:33 +0000
commit11d358a64324317b3f63dae3be4cbe37f735473d (patch)
tree871a99384bdde651e3878157e7ee51f8bb04b904 /searchcore/src
parent60a71bb8cc87d28c29e80242b82394bf634b224a (diff)
Wire SessionManager via IDocumentSubDBOwner
Diffstat (limited to 'searchcore/src')
-rw-r--r--searchcore/src/tests/proton/documentdb/configurer/configurer_test.cpp11
-rw-r--r--searchcore/src/tests/proton/documentdb/document_subdbs/document_subdbs_test.cpp10
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/documentdb.cpp7
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/documentdb.h9
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/documentsubdbcollection.cpp6
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/documentsubdbcollection.h8
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/fast_access_doc_subdb.cpp3
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/fast_access_doc_subdb.h3
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/i_document_subdb_owner.h4
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/idocumentsubdb.h3
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/matchview.cpp6
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/matchview.h8
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/searchabledocsubdb.cpp6
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/searchabledocsubdb.h2
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/searchview.cpp3
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/searchview.h4
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/storeonlydocsubdb.cpp3
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/storeonlydocsubdb.h2
-rw-r--r--searchcore/src/vespa/searchcore/proton/test/dummy_document_sub_db.h2
19 files changed, 47 insertions, 53 deletions
diff --git a/searchcore/src/tests/proton/documentdb/configurer/configurer_test.cpp b/searchcore/src/tests/proton/documentdb/configurer/configurer_test.cpp
index 53ea1b3542f..e1f6e14e922 100644
--- a/searchcore/src/tests/proton/documentdb/configurer/configurer_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/configurer/configurer_test.cpp
@@ -155,6 +155,7 @@ struct Fixture
RankingAssetsRepo _constantValueRepo;
vespalib::ThreadStackExecutor _summaryExecutor;
std::shared_ptr<PendingLidTrackerBase> _pendingLidsForCommit;
+ SessionManager _sessionMgr;
ViewSet _views;
MyDocumentDBReferenceResolver _resolver;
ConfigurerUP _configurer;
@@ -170,6 +171,7 @@ Fixture::Fixture()
_constantValueRepo(_constantValueFactory),
_summaryExecutor(8, 128_Ki),
_pendingLidsForCommit(std::make_shared<PendingLidTracker>()),
+ _sessionMgr(100),
_views(),
_resolver(),
_configurer()
@@ -207,7 +209,7 @@ Fixture::initViewSet(ViewSet &views)
views._summaryMgr = summaryMgr;
views._dmsc = metaStore;
IndexSearchable::SP indexSearchable;
- auto matchView = std::make_shared<MatchView>(matchers, indexSearchable, attrMgr, sesMgr, metaStore, views._docIdLimit);
+ auto matchView = std::make_shared<MatchView>(matchers, indexSearchable, attrMgr, _sessionMgr, metaStore, views._docIdLimit);
views.searchView.set(SearchView::create
(summaryMgr->createSummarySetup(SummaryConfig(),
JuniperrcConfig(), views.repo, attrMgr),
@@ -349,9 +351,7 @@ struct SearchViewComparer
void expect_not_equal_attribute_manager() {
EXPECT_NOT_EQUAL(_old->getAttributeManager().get(), _new->getAttributeManager().get());
}
- void expect_equal_session_manager() {
- EXPECT_EQUAL(_old->getSessionManager().get(), _new->getSessionManager().get());
- }
+
void expect_equal_document_meta_store() {
EXPECT_EQUAL(_old->getDocumentMetaStore().get(), _new->getDocumentMetaStore().get());
}
@@ -436,7 +436,6 @@ TEST_F("require that we can reconfigure index searchable", Fixture)
cmp.expect_equal_matchers();
cmp.expect_not_equal_index_searchable();
cmp.expect_equal_attribute_manager();
- cmp.expect_equal_session_manager();
cmp.expect_equal_document_meta_store();
}
{ // verify feed view
@@ -471,7 +470,6 @@ TEST_F("require that we can reconfigure attribute manager", Fixture)
cmp.expect_not_equal_matchers();
cmp.expect_equal_index_searchable();
cmp.expect_not_equal_attribute_manager();
- cmp.expect_equal_session_manager();
cmp.expect_equal_document_meta_store();
}
{ // verify feed view
@@ -587,7 +585,6 @@ TEST_F("require that we can reconfigure matchers", Fixture)
cmp.expect_not_equal_matchers();
cmp.expect_equal_index_searchable();
cmp.expect_equal_attribute_manager();
- cmp.expect_equal_session_manager();
cmp.expect_equal_document_meta_store();
}
{ // verify feed view
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 43717fc724f..dd402a6e637 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
@@ -93,11 +93,18 @@ struct ConfigDir4 { static vespalib::string dir() { return TEST_PATH("cfg4"); }
struct MySubDBOwner : public IDocumentSubDBOwner
{
+ SessionManager _sessionMgr;
+ MySubDBOwner();
+ ~MySubDBOwner() override;
document::BucketSpace getBucketSpace() const override { return makeBucketSpace(); }
vespalib::string getName() const override { return "owner"; }
uint32_t getDistributionKey() const override { return -1; }
+ SessionManager & session_manager() override { return _sessionMgr; }
};
+MySubDBOwner::MySubDBOwner() : _sessionMgr(1) {}
+MySubDBOwner::~MySubDBOwner() = default;
+
struct MySyncProxy : public SyncProxy
{
void sync(SerialNum) override {}
@@ -354,8 +361,7 @@ struct FixtureBase
vespalib::ThreadStackExecutor executor(1, 1_Mi);
initializer::TaskRunner taskRunner(executor);
taskRunner.runTask(task);
- auto sessionMgr = std::make_shared<SessionManager>(1);
- runInMasterAndSync([&]() { _subDb.initViews(*_snapshot->_cfg, sessionMgr); });
+ runInMasterAndSync([&]() { _subDb.initViews(*_snapshot->_cfg); });
}
void basicReconfig(SerialNum serialNum) {
runInMasterAndSync([&]() { performReconfig(serialNum, make_all_attr_schema(two_attr_schema), ConfigDir2::dir()); });
diff --git a/searchcore/src/vespa/searchcore/proton/server/documentdb.cpp b/searchcore/src/vespa/searchcore/proton/server/documentdb.cpp
index 1b91f9ec0c2..427f40d6116 100644
--- a/searchcore/src/vespa/searchcore/proton/server/documentdb.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/documentdb.cpp
@@ -340,7 +340,7 @@ DocumentDB::initFinish(DocumentDBConfig::SP configSnapshot)
// Called by executor thread
assert(_writeService.master().isCurrentThread());
_bucketHandler.setReadyBucketHandler(_subDBs.getReadySubDB()->getDocumentMetaStoreContext().get());
- _subDBs.initViews(*configSnapshot, _sessionManager);
+ _subDBs.initViews(*configSnapshot);
syncFeedView();
// Check that feed view has been activated.
assert(_feedView.get());
@@ -1120,4 +1120,9 @@ DocumentDB::set_attribute_usage_listener(std::unique_ptr<IAttributeUsageListener
_writeFilter.set_listener(std::move(listener));
}
+matching::SessionManager &
+DocumentDB::session_manager() {
+ return *_sessionManager;
+}
+
} // namespace proton
diff --git a/searchcore/src/vespa/searchcore/proton/server/documentdb.h b/searchcore/src/vespa/searchcore/proton/server/documentdb.h
index bec1b88c0c9..2932d21b47e 100644
--- a/searchcore/src/vespa/searchcore/proton/server/documentdb.h
+++ b/searchcore/src/vespa/searchcore/proton/server/documentdb.h
@@ -253,14 +253,6 @@ public:
const HwInfo &hwInfo);
/**
- * Expose a cost view of the session manager. This is used by the
- * document db explorer.
- **/
- const matching::SessionManager &session_manager() const {
- return *_sessionManager;
- }
-
- /**
* Frees any allocated resources. This will also stop the internal thread
* and wait for it to finish. All pending tasks are deleted.
*/
@@ -392,6 +384,7 @@ public:
document::BucketSpace getBucketSpace() const override;
vespalib::string getName() const override;
uint32_t getDistributionKey() const override;
+ matching::SessionManager &session_manager() override;
/**
* Implements IFeedHandlerOwner
diff --git a/searchcore/src/vespa/searchcore/proton/server/documentsubdbcollection.cpp b/searchcore/src/vespa/searchcore/proton/server/documentsubdbcollection.cpp
index e7685624f55..103234f7529 100644
--- a/searchcore/src/vespa/searchcore/proton/server/documentsubdbcollection.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/documentsubdbcollection.cpp
@@ -12,7 +12,6 @@
#include <vespa/vespalib/util/lambdatask.h>
#include <vespa/vespalib/util/threadstackexecutor.h>
-using proton::matching::SessionManager;
using search::GrowStrategy;
using search::SerialNum;
using search::index::Schema;
@@ -184,11 +183,10 @@ DocumentSubDBCollection::createInitializer(const DocumentDBConfig &configSnapsho
void
-DocumentSubDBCollection::initViews(const DocumentDBConfig &configSnapshot,
- const SessionManager::SP &sessionManager)
+DocumentSubDBCollection::initViews(const DocumentDBConfig &configSnapshot)
{
for (auto subDb : _subDBs) {
- subDb->initViews(configSnapshot, sessionManager);
+ subDb->initViews(configSnapshot);
}
}
diff --git a/searchcore/src/vespa/searchcore/proton/server/documentsubdbcollection.h b/searchcore/src/vespa/searchcore/proton/server/documentsubdbcollection.h
index 8c1e670454c..a5ab1b5971c 100644
--- a/searchcore/src/vespa/searchcore/proton/server/documentsubdbcollection.h
+++ b/searchcore/src/vespa/searchcore/proton/server/documentsubdbcollection.h
@@ -46,10 +46,7 @@ struct IBucketStateCalculator;
struct IDocumentDBReferenceResolver;
struct MetricsWireService;
-namespace matching {
- class QueryLimiter;
- class SessionManager;
-}
+namespace matching { class QueryLimiter; }
namespace initializer { class InitializerTask; }
@@ -65,7 +62,6 @@ public:
private:
using IFeedViewSP = std::shared_ptr<IFeedView>;
using IBucketStateCalculatorSP = std::shared_ptr<IBucketStateCalculator>;
- using SessionManagerSP = std::shared_ptr<matching::SessionManager>;
using IFlushTargetList = std::vector<std::shared_ptr<searchcorespi::IFlushTarget>>;
SubDBVector _subDBs;
IDocumentSubDBOwner &_owner;
@@ -131,7 +127,7 @@ public:
createInitializer(const DocumentDBConfig &configSnapshot, SerialNum configSerialNum,
const index::IndexConfig & indexCfg);
- void initViews(const DocumentDBConfig &configSnapshot, const SessionManagerSP &sessionManager);
+ void initViews(const DocumentDBConfig &configSnapshot);
void clearViews();
void onReplayDone();
void onReprocessDone(SerialNum serialNum);
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 7fd54f111e1..6c684ce4c99 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
@@ -230,8 +230,7 @@ FastAccessDocSubDB::setup(const DocumentSubDbInitializerResult &initResult)
}
void
-FastAccessDocSubDB::initViews(const DocumentDBConfig &configSnapshot,
- const SessionManager::SP &)
+FastAccessDocSubDB::initViews(const DocumentDBConfig &configSnapshot)
{
// Called by executor thread
_iSearchView.set(std::make_shared<EmptySearchView>());
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 94fca94c75d..2d00a2a412c 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
@@ -84,7 +84,6 @@ private:
protected:
using Parent = StoreOnlyDocSubDB;
- using SessionManagerSP = std::shared_ptr<matching::SessionManager>;
const bool _addMetrics;
MetricsWireService &_metricsWireService;
@@ -108,7 +107,7 @@ public:
const IndexConfig &indexCfg) const override;
void setup(const DocumentSubDbInitializerResult &initResult) override;
- void initViews(const DocumentDBConfig &configSnapshot, const SessionManagerSP &sessionManager) override;
+ void initViews(const DocumentDBConfig &configSnapshot) override;
IReprocessingTask::List
applyConfig(const DocumentDBConfig &newConfigSnapshot, const DocumentDBConfig &oldConfigSnapshot,
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 4bd143a077e..e170840e252 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
@@ -7,6 +7,8 @@
namespace proton {
+namespace matching { class SessionManager; }
+
/**
* Interface defining the communication needed with the owner of the
* document sub db.
@@ -14,10 +16,12 @@ namespace proton {
class IDocumentSubDBOwner
{
public:
+ using SessionManager = matching::SessionManager;
virtual ~IDocumentSubDBOwner() {}
virtual document::BucketSpace getBucketSpace() const = 0;
virtual vespalib::string getName() const = 0;
virtual uint32_t getDistributionKey() const = 0;
+ virtual SessionManager & session_manager() = 0;
};
} // namespace proton
diff --git a/searchcore/src/vespa/searchcore/proton/server/idocumentsubdb.h b/searchcore/src/vespa/searchcore/proton/server/idocumentsubdb.h
index b945c67660b..c6410073c09 100644
--- a/searchcore/src/vespa/searchcore/proton/server/idocumentsubdb.h
+++ b/searchcore/src/vespa/searchcore/proton/server/idocumentsubdb.h
@@ -63,6 +63,7 @@ public:
using IFlushTargetList = std::vector<std::shared_ptr<searchcorespi::IFlushTarget>>;
using IndexConfig = index::IndexConfig;
using OnDone = std::shared_ptr<vespalib::IDestructorCallback>;
+ using SessionManager = matching::SessionManager;
public:
IDocumentSubDB() { }
virtual ~IDocumentSubDB() { }
@@ -75,7 +76,7 @@ public:
// Called by master thread
virtual void setup(const DocumentSubDbInitializerResult &initResult) = 0;
- virtual void initViews(const DocumentDBConfig &configSnapshot, const std::shared_ptr<matching::SessionManager> &sessionManager) = 0;
+ virtual void initViews(const DocumentDBConfig &configSnapshot) = 0;
virtual IReprocessingTask::List
applyConfig(const DocumentDBConfig &newConfigSnapshot, const DocumentDBConfig &oldConfigSnapshot,
diff --git a/searchcore/src/vespa/searchcore/proton/server/matchview.cpp b/searchcore/src/vespa/searchcore/proton/server/matchview.cpp
index bd9c927e94e..532c2e868b6 100644
--- a/searchcore/src/vespa/searchcore/proton/server/matchview.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/matchview.cpp
@@ -36,13 +36,13 @@ using matching::SessionManager;
MatchView::MatchView(Matchers::SP matchers,
IndexSearchable::SP indexSearchable,
IAttributeManager::SP attrMgr,
- SessionManagerSP sessionMgr,
+ SessionManager & sessionMgr,
IDocumentMetaStoreContext::SP metaStore,
DocIdLimit &docIdLimit)
: _matchers(std::move(matchers)),
_indexSearchable(std::move(indexSearchable)),
_attrMgr(std::move(attrMgr)),
- _sessionMgr(std::move(sessionMgr)),
+ _sessionMgr(sessionMgr),
_metaStore(std::move(metaStore)),
_docIdLimit(docIdLimit)
{ }
@@ -75,7 +75,7 @@ MatchView::match(std::shared_ptr<const ISearchHandler> searchHandler, const Sear
const search::IDocumentMetaStore & dms = owned_objects.readGuard->get();
const bucketdb::BucketDBOwner & bucketDB = _metaStore->get().getBucketDB();
return matcher->match(req, threadBundle, ctx->getSearchContext(), ctx->getAttributeContext(),
- *_sessionMgr, dms, bucketDB, std::move(owned_objects));
+ _sessionMgr, dms, bucketDB, std::move(owned_objects));
}
} // namespace proton
diff --git a/searchcore/src/vespa/searchcore/proton/server/matchview.h b/searchcore/src/vespa/searchcore/proton/server/matchview.h
index f7bf0abff39..603d929b407 100644
--- a/searchcore/src/vespa/searchcore/proton/server/matchview.h
+++ b/searchcore/src/vespa/searchcore/proton/server/matchview.h
@@ -18,11 +18,11 @@ namespace matching {
}
class MatchView {
- using SessionManagerSP = std::shared_ptr<matching::SessionManager>;
+ using SessionManager = matching::SessionManager;
Matchers::SP _matchers;
searchcorespi::IndexSearchable::SP _indexSearchable;
IAttributeManager::SP _attrMgr;
- SessionManagerSP _sessionMgr;
+ SessionManager & _sessionMgr;
IDocumentMetaStoreContext::SP _metaStore;
DocIdLimit &_docIdLimit;
@@ -38,7 +38,7 @@ public:
MatchView(Matchers::SP matchers,
searchcorespi::IndexSearchable::SP indexSearchable,
IAttributeManager::SP attrMgr,
- SessionManagerSP sessionMgr,
+ SessionManager & sessionMgr,
IDocumentMetaStoreContext::SP metaStore,
DocIdLimit &docIdLimit);
~MatchView();
@@ -46,7 +46,7 @@ public:
const Matchers::SP & getMatchers() const { return _matchers; }
const searchcorespi::IndexSearchable::SP & getIndexSearchable() const { return _indexSearchable; }
const IAttributeManager::SP & getAttributeManager() const { return _attrMgr; }
- const SessionManagerSP & getSessionManager() const { return _sessionMgr; }
+ SessionManager & getSessionManager() const { return _sessionMgr; }
const IDocumentMetaStoreContext::SP & getDocumentMetaStore() const { return _metaStore; }
DocIdLimit & getDocIdLimit() const { return _docIdLimit; }
diff --git a/searchcore/src/vespa/searchcore/proton/server/searchabledocsubdb.cpp b/searchcore/src/vespa/searchcore/proton/server/searchabledocsubdb.cpp
index 043e9cd5d3f..3d87e7dc7c3 100644
--- a/searchcore/src/vespa/searchcore/proton/server/searchabledocsubdb.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/searchabledocsubdb.cpp
@@ -10,7 +10,6 @@
#include <vespa/searchcore/proton/flushengine/threadedflushtarget.h>
#include <vespa/searchcore/proton/index/index_manager_initializer.h>
#include <vespa/searchcore/proton/index/index_writer.h>
-#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/searchlib/fef/indexproperties.h>
@@ -19,7 +18,6 @@
using vespa::config::search::RankProfilesConfig;
using proton::matching::MatchingStats;
-using proton::matching::SessionManager;
using search::GrowStrategy;
using search::index::Schema;
using search::SerialNum;
@@ -187,7 +185,7 @@ SearchableDocSubDB::setBucketStateCalculator(const std::shared_ptr<IBucketStateC
}
void
-SearchableDocSubDB::initViews(const DocumentDBConfig &configSnapshot, const SessionManager::SP &sessionManager)
+SearchableDocSubDB::initViews(const DocumentDBConfig &configSnapshot)
{
assert(_writeService.master().isCurrentThread());
@@ -199,7 +197,7 @@ SearchableDocSubDB::initViews(const DocumentDBConfig &configSnapshot, const Sess
configSnapshot.getOnnxModelsSP());
Matchers::SP matchers = _configurer.createMatchers(schema, configSnapshot.getRankProfilesConfig());
auto matchView = std::make_shared<MatchView>(std::move(matchers), indexMgr->getSearchable(), attrMgr,
- sessionManager, _metaStoreCtx, _docIdLimit);
+ _owner.session_manager(), _metaStoreCtx, _docIdLimit);
_rSearchView.set(SearchView::create(
getSummaryManager()->createSummarySetup(
configSnapshot.getSummaryConfig(),
diff --git a/searchcore/src/vespa/searchcore/proton/server/searchabledocsubdb.h b/searchcore/src/vespa/searchcore/proton/server/searchabledocsubdb.h
index c628d9a96b7..dcfe0b32f4a 100644
--- a/searchcore/src/vespa/searchcore/proton/server/searchabledocsubdb.h
+++ b/searchcore/src/vespa/searchcore/proton/server/searchabledocsubdb.h
@@ -100,7 +100,7 @@ public:
const IndexConfig &indexCfg) const override;
void setup(const DocumentSubDbInitializerResult &initResult) override;
- void initViews(const DocumentDBConfig &configSnapshot, const SessionManagerSP &sessionManager) override;
+ void initViews(const DocumentDBConfig &configSnapshot) override;
IReprocessingTask::List
applyConfig(const DocumentDBConfig &newConfigSnapshot, const DocumentDBConfig &oldConfigSnapshot,
diff --git a/searchcore/src/vespa/searchcore/proton/server/searchview.cpp b/searchcore/src/vespa/searchcore/proton/server/searchview.cpp
index a17415db474..7a909bbebd8 100644
--- a/searchcore/src/vespa/searchcore/proton/server/searchview.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/searchview.cpp
@@ -34,7 +34,6 @@ convertGidsToLids(const DocsumRequest & request,
const search::IDocumentMetaStore &metaStore,
uint32_t docIdLimit)
{
- document::GlobalId empty;
uint32_t lid = 0;
for (size_t i = 0; i < request.hits.size(); ++i) {
const DocsumRequest::Hit & h = request.hits[i];
@@ -128,7 +127,7 @@ SearchView::getDocsumsInternal(const DocsumRequest & req)
MatchContext::UP mctx = _matchView->createContext();
auto ctx = std::make_unique<DocsumContext>(req, _summarySetup->getDocsumWriter(), *store, _matchView->getMatcher(req.ranking),
mctx->getSearchContext(), mctx->getAttributeContext(),
- *_summarySetup->getAttributeManager(), *getSessionManager());
+ *_summarySetup->getAttributeManager(), getSessionManager());
SearchView::InternalDocsumReply reply(ctx->getDocsums(), true);
uint64_t endGeneration = readGuard->get().getCurrentGeneration();
if (startGeneration != endGeneration) {
diff --git a/searchcore/src/vespa/searchcore/proton/server/searchview.h b/searchcore/src/vespa/searchcore/proton/server/searchview.h
index c8174c0a9a6..8c9f6cffa94 100644
--- a/searchcore/src/vespa/searchcore/proton/server/searchview.h
+++ b/searchcore/src/vespa/searchcore/proton/server/searchview.h
@@ -11,7 +11,7 @@ namespace proton {
class SearchView : public ISearchHandler, public std::enable_shared_from_this<SearchView>
{
public:
- using SessionManagerSP = std::shared_ptr<matching::SessionManager>;
+ using SessionManager = matching::SessionManager;
using IndexSearchable = searchcorespi::IndexSearchable;
using InternalDocsumReply = std::pair<std::unique_ptr<DocsumReply>, bool>;
typedef std::shared_ptr<SearchView> SP;
@@ -28,7 +28,7 @@ public:
const Matchers::SP & getMatchers() const { return _matchView->getMatchers(); }
const IndexSearchable::SP & getIndexSearchable() const { return _matchView->getIndexSearchable(); }
const IAttributeManager::SP & getAttributeManager() const { return _matchView->getAttributeManager(); }
- const SessionManagerSP & getSessionManager() const { return _matchView->getSessionManager(); }
+ SessionManager & getSessionManager() const { return _matchView->getSessionManager(); }
const IDocumentMetaStoreContext::SP & getDocumentMetaStore() const { return _matchView->getDocumentMetaStore(); }
DocIdLimit &getDocIdLimit() const { return _matchView->getDocIdLimit(); }
matching::MatchingStats getMatcherStats(const vespalib::string &rankProfile) const { return _matchView->getMatcherStats(rankProfile); }
diff --git a/searchcore/src/vespa/searchcore/proton/server/storeonlydocsubdb.cpp b/searchcore/src/vespa/searchcore/proton/server/storeonlydocsubdb.cpp
index 9419dfa1c90..e95c98e2740 100644
--- a/searchcore/src/vespa/searchcore/proton/server/storeonlydocsubdb.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/storeonlydocsubdb.cpp
@@ -356,7 +356,7 @@ StoreOnlyDocSubDB::getFeedViewPersistentParams()
}
void
-StoreOnlyDocSubDB::initViews(const DocumentDBConfig &configSnapshot, const SessionManager::SP &sessionManager)
+StoreOnlyDocSubDB::initViews(const DocumentDBConfig &configSnapshot)
{
assert(_writeService.master().isCurrentThread());
_iSearchView.set(std::make_shared<EmptySearchView>());
@@ -364,7 +364,6 @@ StoreOnlyDocSubDB::initViews(const DocumentDBConfig &configSnapshot, const Sessi
std::lock_guard<std::mutex> guard(_configMutex);
initFeedView(configSnapshot);
}
- (void) sessionManager;
}
void
diff --git a/searchcore/src/vespa/searchcore/proton/server/storeonlydocsubdb.h b/searchcore/src/vespa/searchcore/proton/server/storeonlydocsubdb.h
index f694cc7298f..5a8db23e345 100644
--- a/searchcore/src/vespa/searchcore/proton/server/storeonlydocsubdb.h
+++ b/searchcore/src/vespa/searchcore/proton/server/storeonlydocsubdb.h
@@ -196,7 +196,7 @@ public:
const IndexConfig & indexCfg) const override;
void setup(const DocumentSubDbInitializerResult &initResult) override;
- void initViews(const DocumentDBConfig &configSnapshot, const std::shared_ptr<matching::SessionManager> &sessionManager) override;
+ void initViews(const DocumentDBConfig &configSnapshot) override;
void validateDocStore(FeedHandler & feedHandler, SerialNum serialNum) const override;
diff --git a/searchcore/src/vespa/searchcore/proton/test/dummy_document_sub_db.h b/searchcore/src/vespa/searchcore/proton/test/dummy_document_sub_db.h
index 6c142c97aaf..c29af41cdd3 100644
--- a/searchcore/src/vespa/searchcore/proton/test/dummy_document_sub_db.h
+++ b/searchcore/src/vespa/searchcore/proton/test/dummy_document_sub_db.h
@@ -51,7 +51,7 @@ struct DummyDocumentSubDb : public IDocumentSubDB
(const_cast<DummyDocumentSubDb &>(*this), _service.write().master());
}
void setup(const DocumentSubDbInitializerResult &) override {}
- void initViews(const DocumentDBConfig &, const proton::matching::SessionManager::SP &) override {}
+ void initViews(const DocumentDBConfig &) override {}
IReprocessingTask::List applyConfig(const DocumentDBConfig &, const DocumentDBConfig &,
SerialNum, const ReconfigParams &, IDocumentDBReferenceResolver &) override
{