aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2017-08-25 08:22:50 +0200
committerGitHub <noreply@github.com>2017-08-25 08:22:50 +0200
commit135b75644a96d3718abac4a8cfa34f02997b3e0c (patch)
treef32ed2fbe4813b06375d563b8a2999f51db924eb /searchcore
parentfb615e711a3771d9fad2935661e3be8ae5a8c6bf (diff)
Revert "Balder/move instead of copy"
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/tests/proton/documentdb/configurer/configurer_test.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/grouping/groupingcontext.h8
-rw-r--r--searchcore/src/vespa/searchcore/grouping/groupingmanager.cpp17
-rw-r--r--searchcore/src/vespa/searchcore/grouping/groupingmanager.h22
-rw-r--r--searchcore/src/vespa/searchcore/grouping/groupingsession.cpp26
-rw-r--r--searchcore/src/vespa/searchcore/grouping/groupingsession.h43
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/match_thread.cpp7
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/match_thread.h6
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/matcher.cpp1
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/result_processor.cpp8
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/result_processor.h7
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/session_manager_explorer.cpp7
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/session_manager_explorer.h11
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/documentdb.h5
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/fast_access_doc_subdb.h9
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/matchview.cpp3
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/matchview.h13
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/searchabledocsubdb.h4
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/searchview.h3
19 files changed, 103 insertions, 99 deletions
diff --git a/searchcore/src/tests/proton/documentdb/configurer/configurer_test.cpp b/searchcore/src/tests/proton/documentdb/configurer/configurer_test.cpp
index f0a91a101eb..4083a7e1194 100644
--- a/searchcore/src/tests/proton/documentdb/configurer/configurer_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/configurer/configurer_test.cpp
@@ -20,13 +20,13 @@
#include <vespa/searchcore/proton/server/fast_access_doc_subdb_configurer.h>
#include <vespa/searchcore/proton/server/summaryadapter.h>
#include <vespa/searchcore/proton/server/reconfig_params.h>
-#include <vespa/searchcore/proton/matching/sessionmanager.h>
#include <vespa/searchcore/proton/test/documentdb_config_builder.h>
#include <vespa/searchcore/proton/test/mock_summary_adapter.h>
#include <vespa/searchcore/proton/test/mock_gid_to_lid_change_handler.h>
#include <vespa/searchlib/index/dummyfileheadercontext.h>
#include <vespa/searchlib/transactionlog/nosyncproxy.h>
#include <vespa/vespalib/io/fileutil.h>
+#include <vespa/searchcore/proton/reference/i_document_db_reference_resolver.h>
using namespace config;
using namespace document;
diff --git a/searchcore/src/vespa/searchcore/grouping/groupingcontext.h b/searchcore/src/vespa/searchcore/grouping/groupingcontext.h
index 92a9dc06fff..7ebc2c36985 100644
--- a/searchcore/src/vespa/searchcore/grouping/groupingcontext.h
+++ b/searchcore/src/vespa/searchcore/grouping/groupingcontext.h
@@ -6,7 +6,9 @@
#include <vector>
#include <memory>
-namespace search::grouping {
+namespace search {
+
+namespace grouping {
/**
* A Grouping Context contains all grouping expressions that should be evaluated
@@ -113,4 +115,6 @@ public:
bool needRanking() const;
};
-}
+} // namespace search::grouping
+} // namespace search
+
diff --git a/searchcore/src/vespa/searchcore/grouping/groupingmanager.cpp b/searchcore/src/vespa/searchcore/grouping/groupingmanager.cpp
index 48baba329ca..7913043265a 100644
--- a/searchcore/src/vespa/searchcore/grouping/groupingmanager.cpp
+++ b/searchcore/src/vespa/searchcore/grouping/groupingmanager.cpp
@@ -1,18 +1,18 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "groupingmanager.h"
-#include "groupingsession.h"
-#include "groupingcontext.h"
#include <vespa/searchlib/aggregation/fs4hit.h>
#include <vespa/searchlib/expression/attributenode.h>
+#include <vespa/searchcore/grouping/groupingsession.h>
#include <vespa/log/log.h>
LOG_SETUP(".groupingmanager");
-namespace search::grouping {
+namespace search {
+namespace grouping {
-using aggregation::Grouping;
-using attribute::IAttributeContext;
+using search::aggregation::Grouping;
+using search::attribute::IAttributeContext;
//-----------------------------------------------------------------------------
@@ -31,10 +31,6 @@ using search::expression::ConfigureStaticParams;
using search::aggregation::Grouping;
using search::aggregation::GroupingLevel;
-bool GroupingManager::empty() const {
- return _groupingContext.getGroupingList().empty();
-}
-
void
GroupingManager::init(const IAttributeContext &attrCtx)
{
@@ -130,4 +126,5 @@ GroupingManager::convertToGlobalId(const search::IDocumentMetaStore &metaStore)
}
}
-}
+} // namespace search::grouping
+} // namespace search
diff --git a/searchcore/src/vespa/searchcore/grouping/groupingmanager.h b/searchcore/src/vespa/searchcore/grouping/groupingmanager.h
index 5793c8576e5..1a440bf9247 100644
--- a/searchcore/src/vespa/searchcore/grouping/groupingmanager.h
+++ b/searchcore/src/vespa/searchcore/grouping/groupingmanager.h
@@ -2,16 +2,12 @@
#pragma once
#include <vespa/searchlib/common/idocumentmetastore.h>
-#include <vespa/searchcommon/attribute/iattributecontext.h>
+#include <vespa/searchlib/aggregation/grouping.h>
+#include <vespa/searchcore/grouping/groupingcontext.h>
namespace search {
- class RankedHit;
- class BitVector;
-}
-namespace search::grouping {
-
-class GroupingContext;
+namespace grouping {
/**
* Wrapper class used to handle actual grouping. All input data is
@@ -41,14 +37,14 @@ public:
/**
* @return true if this manager is holding an empty grouping request.
**/
- bool empty() const;
+ bool empty() const { return _groupingContext.getGroupingList().empty(); }
/**
* Initialize underlying context with attribute bindings.
*
* @param attrCtx attribute context
**/
- void init(const attribute::IAttributeContext &attrCtx);
+ void init(const search::attribute::IAttributeContext &attrCtx);
/**
* Perform actual grouping on the given results.
@@ -69,7 +65,7 @@ public:
* @param binSize size of search result array
* @param overflow The unranked hits.
**/
- void groupUnordered(const RankedHit *searchResults, uint32_t binSize, const BitVector * overflow);
+ void groupUnordered(const RankedHit *searchResults, uint32_t binSize, const search::BitVector * overflow);
/**
* Merge another grouping context into the underlying context of
@@ -93,7 +89,9 @@ public:
*
* @param metaStore the attribute used to map from lid to gid.
**/
- void convertToGlobalId(const IDocumentMetaStore &metaStore);
+ void convertToGlobalId(const search::IDocumentMetaStore &metaStore);
};
-}
+} // namespace search::grouping
+} // namespace search
+
diff --git a/searchcore/src/vespa/searchcore/grouping/groupingsession.cpp b/searchcore/src/vespa/searchcore/grouping/groupingsession.cpp
index 110d032205e..6407a29175e 100644
--- a/searchcore/src/vespa/searchcore/grouping/groupingsession.cpp
+++ b/searchcore/src/vespa/searchcore/grouping/groupingsession.cpp
@@ -1,13 +1,11 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "groupingsession.h"
-#include "groupingmanager.h"
-#include "groupingcontext.h"
-
#include <vespa/log/log.h>
LOG_SETUP(".groupingsession");
-namespace search::grouping {
+namespace search {
+namespace grouping {
using search::aggregation::Group;
using search::aggregation::Grouping;
@@ -18,8 +16,8 @@ GroupingSession::GroupingSession(const SessionId &sessionId,
GroupingContext & groupingContext,
const IAttributeContext &attrCtx)
: _sessionId(sessionId),
- _mgrContext(std::make_unique<GroupingContext>(groupingContext)),
- _groupingManager(std::make_unique<GroupingManager>(*_mgrContext)),
+ _mgrContext(groupingContext),
+ _groupingManager(_mgrContext),
_timeOfDoom(groupingContext.getTimeOfDoom())
{
init(groupingContext, attrCtx);
@@ -48,30 +46,31 @@ GroupingSession::init(GroupingContext & groupingContext, const IAttributeContext
_groupingMap[gp->getId()] = gp;
g = gp;
}
- _mgrContext->addGrouping(g);
+ _mgrContext.addGrouping(g);
}
- _groupingManager->init(attrCtx);
+ _groupingManager.init(attrCtx);
}
void
GroupingSession::prepareThreadContextCreation(size_t num_threads)
{
if (num_threads > 1) {
- _mgrContext->serialize(); // need copy of internal modified request
+ _mgrContext.serialize(); // need copy of internal modified request
}
}
GroupingContext::UP
GroupingSession::createThreadContext(size_t thread_id, const IAttributeContext &attrCtx)
{
- GroupingContext::UP ctx(new GroupingContext(*_mgrContext));
+ GroupingContext::UP ctx(new GroupingContext(_mgrContext));
if (thread_id == 0) {
- GroupingContext::GroupingList &groupingList = _mgrContext->getGroupingList();
+ GroupingContext::GroupingList &groupingList = _mgrContext.getGroupingList();
for (size_t i = 0; i < groupingList.size(); ++i) {
ctx->addGrouping(groupingList[i]);
}
} else {
- ctx->deserialize(_mgrContext->getResult().peek(), _mgrContext->getResult().size());
+ ctx->deserialize(_mgrContext.getResult().peek(),
+ _mgrContext.getResult().size());
GroupingManager man(*ctx);
man.init(attrCtx);
}
@@ -98,4 +97,5 @@ GroupingSession::continueExecution(GroupingContext & groupingContext)
groupingContext.serialize();
}
-}
+} // namespace search::grouping
+} // namespace search
diff --git a/searchcore/src/vespa/searchcore/grouping/groupingsession.h b/searchcore/src/vespa/searchcore/grouping/groupingsession.h
index 95a5332b417..62867289be7 100644
--- a/searchcore/src/vespa/searchcore/grouping/groupingsession.h
+++ b/searchcore/src/vespa/searchcore/grouping/groupingsession.h
@@ -1,17 +1,16 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
+#include "groupingmanager.h"
+#include "groupingcontext.h"
#include "sessionid.h"
-#include <vespa/searchlib/attribute/iattributemanager.h>
-#include <vespa/fastos/timestamp.h>
-#include <vector>
+#include <vespa/searchlib/aggregation/grouping.h>
#include <map>
-namespace search::aggregation { class Grouping; }
-namespace search::grouping {
-class GroupingContext;
-class GroupingManager;
+namespace search {
+
+namespace grouping {
/**
* A grouping session represents the execution of a grouping expression with one
@@ -22,15 +21,15 @@ class GroupingManager;
class GroupingSession
{
private:
- using GroupingPtr = std::shared_ptr<aggregation::Grouping>;
- using GroupingMap = std::map<uint32_t, GroupingPtr>;
- using GroupingList = std::vector<GroupingPtr>;
+ typedef std::shared_ptr<search::aggregation::Grouping> GroupingPtr;
+ typedef std::map<uint32_t, GroupingPtr> GroupingMap;
+ typedef std::vector<GroupingPtr> GroupingList;
- SessionId _sessionId;
- std::unique_ptr<GroupingContext> _mgrContext;
- std::unique_ptr<GroupingManager> _groupingManager;
- GroupingMap _groupingMap;
- fastos::TimeStamp _timeOfDoom;
+ SessionId _sessionId;
+ GroupingContext _mgrContext;
+ GroupingManager _groupingManager;
+ GroupingMap _groupingMap;
+ fastos::TimeStamp _timeOfDoom;
public:
typedef std::unique_ptr<GroupingSession> UP;
@@ -44,7 +43,7 @@ public:
**/
GroupingSession(const SessionId & sessionId,
GroupingContext & groupingContext,
- const attribute::IAttributeContext &attrCtx);
+ const search::attribute::IAttributeContext &attrCtx);
GroupingSession(const GroupingSession &) = delete;
GroupingSession &operator=(const GroupingSession &) = delete;
@@ -63,7 +62,8 @@ public:
* @param groupingContext The current grouping context.
* @param attrCtx attribute context.
**/
- void init(GroupingContext & groupingContext, const attribute::IAttributeContext &attrCtx);
+ void init(GroupingContext & groupingContext,
+ const search::attribute::IAttributeContext &attrCtx);
/**
* This function is called to prepare for creation of individual
@@ -85,12 +85,13 @@ public:
* @param thread_id thread id
* @param attrCtx attribute context.
**/
- std::unique_ptr<GroupingContext> createThreadContext(size_t thread_id, const attribute::IAttributeContext &attrCtx);
+ GroupingContext::UP createThreadContext(size_t thread_id,
+ const search::attribute::IAttributeContext &attrCtx);
/**
* Return the GroupingManager to use when performing grouping.
**/
- GroupingManager & getGroupingManager() { return *_groupingManager; }
+ GroupingManager & getGroupingManager() { return _groupingManager; }
/**
* Continue excuting a query given a context.
@@ -111,4 +112,6 @@ public:
fastos::TimeStamp getTimeOfDoom() const { return _timeOfDoom; }
};
-}
+} // namespace search::grouping
+} // namespace search
+
diff --git a/searchcore/src/vespa/searchcore/proton/matching/match_thread.cpp b/searchcore/src/vespa/searchcore/proton/matching/match_thread.cpp
index 1d5abcc2929..4ece0c65593 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/match_thread.cpp
+++ b/searchcore/src/vespa/searchcore/proton/matching/match_thread.cpp
@@ -9,13 +9,13 @@
#include <vespa/vespalib/util/closure.h>
#include <vespa/vespalib/util/thread_bundle.h>
#include <vespa/searchcore/grouping/groupingmanager.h>
-#include <vespa/searchcore/grouping/groupingcontext.h>
#include <vespa/searchlib/common/bitvector.h>
#include <vespa/log/log.h>
LOG_SETUP(".proton.matching.match_thread");
-namespace proton::matching {
+namespace proton {
+namespace matching {
using search::queryeval::OptimizedAndNotForBlackListing;
using search::queryeval::SearchIterator;
@@ -402,4 +402,5 @@ MatchThread::run()
mergeDirector.dualMerge(thread_id, *resultContext->result, resultContext->groupingSource);
}
-}
+} // namespace proton::matching
+} // namespace proton
diff --git a/searchcore/src/vespa/searchcore/proton/matching/match_thread.h b/searchcore/src/vespa/searchcore/proton/matching/match_thread.h
index cd01c330931..9287089c34e 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/match_thread.h
+++ b/searchcore/src/vespa/searchcore/proton/matching/match_thread.h
@@ -15,7 +15,8 @@
#include <vespa/searchlib/common/sortresults.h>
#include <vespa/searchlib/queryeval/hitcollector.h>
-namespace proton::matching {
+namespace proton {
+namespace matching {
/**
* Runs a single match thread and keeps track of local state.
@@ -110,4 +111,5 @@ public:
PartialResult::UP extract_result() { return std::move(resultContext->result); }
};
-}
+} // namespace proton::matching
+} // namespace proton
diff --git a/searchcore/src/vespa/searchcore/proton/matching/matcher.cpp b/searchcore/src/vespa/searchcore/proton/matching/matcher.cpp
index 32775d7619a..852176e4918 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/matcher.cpp
+++ b/searchcore/src/vespa/searchcore/proton/matching/matcher.cpp
@@ -7,7 +7,6 @@
#include "match_params.h"
#include "matcher.h"
#include "sessionmanager.h"
-#include <vespa/searchcore/grouping/groupingcontext.h>
#include <vespa/searchlib/engine/errorcodes.h>
#include <vespa/searchlib/engine/docsumrequest.h>
#include <vespa/searchlib/engine/searchrequest.h>
diff --git a/searchcore/src/vespa/searchcore/proton/matching/result_processor.cpp b/searchcore/src/vespa/searchcore/proton/matching/result_processor.cpp
index e2c6affebe1..1e7acead748 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/result_processor.cpp
+++ b/searchcore/src/vespa/searchcore/proton/matching/result_processor.cpp
@@ -3,8 +3,6 @@
#include "result_processor.h"
#include "partial_result.h"
#include "sessionmanager.h"
-#include <vespa/searchcore/grouping/groupingmanager.h>
-#include <vespa/searchcore/grouping/groupingcontext.h>
#include <vespa/searchlib/common/docstamp.h>
#include <vespa/searchlib/uca/ucaconverter.h>
#include <vespa/searchlib/engine/searchreply.h>
@@ -17,7 +15,8 @@ using search::grouping::GroupingSession;
using search::grouping::GroupingContext;
using search::grouping::SessionId;
-namespace proton::matching {
+namespace proton {
+namespace matching {
ResultProcessor::Result::Result(std::unique_ptr<search::engine::SearchReply> reply, size_t numFs4Hits)
: _reply(std::move(reply)),
@@ -159,4 +158,5 @@ ResultProcessor::makeReply(PartialResultUP full_result)
return Result::UP(new Result(std::move(reply), numFs4Hits));
}
-}
+} // namespace proton::matching
+} // namespace proton
diff --git a/searchcore/src/vespa/searchcore/proton/matching/result_processor.h b/searchcore/src/vespa/searchcore/proton/matching/result_processor.h
index a181c1660b7..0a9b88c066a 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/result_processor.h
+++ b/searchcore/src/vespa/searchcore/proton/matching/result_processor.h
@@ -16,7 +16,8 @@ namespace search {
class IDocumentMetaStore;
}
-namespace proton::matching {
+namespace proton {
+namespace matching {
class SessionManager;
class PartialResult;
@@ -106,4 +107,6 @@ public:
std::unique_ptr<Result> makeReply(PartialResultUP full_result);
};
-}
+} // namespace proton::matching
+} // namespace proton
+
diff --git a/searchcore/src/vespa/searchcore/proton/matching/session_manager_explorer.cpp b/searchcore/src/vespa/searchcore/proton/matching/session_manager_explorer.cpp
index e456ea5b5a2..f6fd7f7cc9d 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/session_manager_explorer.cpp
+++ b/searchcore/src/vespa/searchcore/proton/matching/session_manager_explorer.cpp
@@ -1,14 +1,14 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "session_manager_explorer.h"
-#include "sessionmanager.h"
#include <vespa/vespalib/data/slime/slime.h>
using vespalib::slime::Inserter;
using vespalib::slime::Cursor;
using vespalib::StateExplorer;
-namespace proton::matching {
+namespace proton {
+namespace matching {
namespace {
@@ -59,4 +59,5 @@ SessionManagerExplorer::get_child(vespalib::stringref name) const
return std::unique_ptr<StateExplorer>(nullptr);
}
-}
+} // namespace proton::matching
+} // namespace proton
diff --git a/searchcore/src/vespa/searchcore/proton/matching/session_manager_explorer.h b/searchcore/src/vespa/searchcore/proton/matching/session_manager_explorer.h
index b8acfba0342..31dabc5a887 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/session_manager_explorer.h
+++ b/searchcore/src/vespa/searchcore/proton/matching/session_manager_explorer.h
@@ -2,11 +2,11 @@
#pragma once
+#include "sessionmanager.h"
#include <vespa/vespalib/net/state_explorer.h>
-namespace proton::matching {
-
-class SessionManager;
+namespace proton {
+namespace matching {
/**
* Class used to explore the state of a session manager
@@ -20,7 +20,8 @@ public:
SessionManagerExplorer(const SessionManager &manager) : _manager(manager) {}
virtual void get_state(const vespalib::slime::Inserter &inserter, bool full) const override;
virtual std::vector<vespalib::string> get_children_names() const override;
- virtual std::unique_ptr<vespalib::StateExplorer> get_child(vespalib::stringref name) const override;
+ virtual std::unique_ptr<StateExplorer> get_child(vespalib::stringref name) const override;
};
-}
+} // namespace proton::matching
+} // namespace proton
diff --git a/searchcore/src/vespa/searchcore/proton/server/documentdb.h b/searchcore/src/vespa/searchcore/proton/server/documentdb.h
index 6773798d2d7..2156d853ac4 100644
--- a/searchcore/src/vespa/searchcore/proton/server/documentdb.h
+++ b/searchcore/src/vespa/searchcore/proton/server/documentdb.h
@@ -21,6 +21,7 @@
#include <vespa/searchcore/proton/common/doctypename.h>
#include <vespa/searchcore/proton/common/monitored_refcount.h>
+#include <vespa/searchcore/proton/matching/sessionmanager.h>
#include <vespa/searchcore/proton/metrics/documentdb_job_trackers.h>
#include <vespa/searchcore/proton/metrics/documentdb_metrics_collection.h>
#include <vespa/searchcore/proton/persistenceengine/bucket_guard.h>
@@ -43,8 +44,6 @@ class IDocumentDBOwner;
class MetricsWireService;
class StatusReport;
-namespace matching { class SessionManager; }
-
/**
* The document database contains all the necessary structures required per
* document type. It has an internal single-threaded Executor to process input
@@ -111,7 +110,7 @@ private:
ProtonConfig::Summary _protonSummaryCfg;
ProtonConfig::Index _protonIndexCfg;
ConfigStore::UP _config_store;
- std::shared_ptr<matching::SessionManager> _sessionManager; // TODO: This should not have to be a shared pointer.
+ matching::SessionManager::SP _sessionManager; // TODO: This should not have to be a shared pointer.
MetricsWireService &_metricsWireService;
MetricsUpdateHook _metricsHook;
vespalib::VarHolder<IFeedView::SP> _feedView;
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 c89a63b95c0..c4ff03de6a1 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
@@ -60,8 +60,8 @@ public:
};
private:
- using AttributesConfig = vespa::config::search::AttributesConfig;
- using Configurer = FastAccessDocSubDBConfigurer;
+ typedef vespa::config::search::AttributesConfig AttributesConfig;
+ typedef FastAccessDocSubDBConfigurer Configurer;
const bool _hasAttributes;
const bool _fastAccessAttributesOnly;
@@ -81,8 +81,7 @@ private:
void initFeedView(const IAttributeWriter::SP &writer, const DocumentDBConfig &configSnapshot);
protected:
- using Parent = StoreOnlyDocSubDB;
- using SessionManagerSP = std::shared_ptr<matching::SessionManager>;
+ typedef StoreOnlyDocSubDB Parent;
const bool _addMetrics;
MetricsWireService &_metricsWireService;
@@ -111,7 +110,7 @@ public:
void setup(const DocumentSubDbInitializerResult &initResult) override;
void initViews(const DocumentDBConfig &configSnapshot,
- const SessionManagerSP &sessionManager) override;
+ const matching::SessionManager::SP &sessionManager) override;
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 3162f9a1c45..0f38e48a8e2 100644
--- a/searchcore/src/vespa/searchcore/proton/server/matchview.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/matchview.cpp
@@ -33,7 +33,7 @@ using matching::SessionManager;
MatchView::MatchView(const Matchers::SP &matchers,
const IndexSearchable::SP &indexSearchable,
const IAttributeManager::SP &attrMgr,
- const SessionManagerSP &sessionMgr,
+ const SessionManager::SP &sessionMgr,
const IDocumentMetaStoreContext::SP &metaStore,
DocIdLimit &docIdLimit)
: _matchers(matchers),
@@ -44,7 +44,6 @@ MatchView::MatchView(const Matchers::SP &matchers,
_docIdLimit(docIdLimit)
{ }
-MatchView::~MatchView() { }
Matcher::SP
MatchView::getMatcher(const vespalib::string & rankProfile) const
diff --git a/searchcore/src/vespa/searchcore/proton/server/matchview.h b/searchcore/src/vespa/searchcore/proton/server/matchview.h
index 511048f536f..5207bce9288 100644
--- a/searchcore/src/vespa/searchcore/proton/server/matchview.h
+++ b/searchcore/src/vespa/searchcore/proton/server/matchview.h
@@ -8,20 +8,17 @@
#include <vespa/searchcore/proton/documentmetastore/documentmetastorecontext.h>
#include <vespa/searchcore/proton/matching/match_context.h>
#include <vespa/searchcore/proton/matching/matcher.h>
+#include <vespa/searchcore/proton/matching/sessionmanager.h>
#include <vespa/searchcorespi/index/indexsearchable.h>
#include <vespa/searchlib/attribute/attributevector.h>
namespace proton {
-namespace matching {
- class SessionManager;
-}
class MatchView {
- using SessionManagerSP = std::shared_ptr<matching::SessionManager>;
Matchers::SP _matchers;
searchcorespi::IndexSearchable::SP _indexSearchable;
IAttributeManager::SP _attrMgr;
- SessionManagerSP _sessionMgr;
+ matching::SessionManager::SP _sessionMgr;
IDocumentMetaStoreContext::SP _metaStore;
DocIdLimit &_docIdLimit;
@@ -37,15 +34,14 @@ public:
MatchView(const Matchers::SP &matchers,
const searchcorespi::IndexSearchable::SP &indexSearchable,
const IAttributeManager::SP &attrMgr,
- const SessionManagerSP &sessionMgr,
+ const matching::SessionManager::SP &sessionMgr,
const IDocumentMetaStoreContext::SP &metaStore,
DocIdLimit &docIdLimit);
- ~MatchView();
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; }
+ const matching::SessionManager::SP & getSessionManager() const { return _sessionMgr; }
const IDocumentMetaStoreContext::SP & getDocumentMetaStore() const { return _metaStore; }
DocIdLimit & getDocIdLimit() const { return _docIdLimit; }
@@ -66,3 +62,4 @@ public:
};
} // namespace proton
+
diff --git a/searchcore/src/vespa/searchcore/proton/server/searchabledocsubdb.h b/searchcore/src/vespa/searchcore/proton/server/searchabledocsubdb.h
index fa3ded56c97..7bd6c1ef100 100644
--- a/searchcore/src/vespa/searchcore/proton/server/searchabledocsubdb.h
+++ b/searchcore/src/vespa/searchcore/proton/server/searchabledocsubdb.h
@@ -21,6 +21,8 @@
#include <vespa/searchcorespi/index/iindexmanager.h>
#include <vespa/vespalib/util/blockingthreadstackexecutor.h>
#include <vespa/vespalib/util/varholder.h>
+#include <memory>
+#include <vector>
namespace proton {
@@ -124,7 +126,7 @@ public:
void
initViews(const DocumentDBConfig &configSnapshot,
- const SessionManagerSP &sessionManager) override;
+ const matching::SessionManager::SP &sessionManager) override;
IReprocessingTask::List
applyConfig(const DocumentDBConfig &newConfigSnapshot,
diff --git a/searchcore/src/vespa/searchcore/proton/server/searchview.h b/searchcore/src/vespa/searchcore/proton/server/searchview.h
index 186d6154706..cb1cd7670bc 100644
--- a/searchcore/src/vespa/searchcore/proton/server/searchview.h
+++ b/searchcore/src/vespa/searchcore/proton/server/searchview.h
@@ -11,7 +11,6 @@ namespace proton {
class SearchView : public ISearchHandler
{
public:
- using SessionManagerSP = std::shared_ptr<matching::SessionManager>;
using IndexSearchable = searchcorespi::IndexSearchable;
using InternalDocsumReply = std::pair<std::unique_ptr<DocsumReply>, bool>;
typedef std::shared_ptr<SearchView> SP;
@@ -26,7 +25,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(); }
+ const matching::SessionManager::SP & 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); }