aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2017-05-24 10:57:06 +0200
committerHenning Baldersheim <balder@yahoo-inc.com>2017-05-24 12:16:08 +0200
commit0e8e2a38be45e8347fe6fd60257c32e67f741ff0 (patch)
tree9e9e4836a791b2e20579d50e27451a32d699a0ce /searchcore
parent2a82fb285f5ccc89398df0786b5ead251c13711c (diff)
Include what you need yourself, and not more.
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/vespa/searchcore/fdispatch/common/appcontext.cpp6
-rw-r--r--searchcore/src/vespa/searchcore/fdispatch/common/queryperf.cpp7
-rw-r--r--searchcore/src/vespa/searchcore/fdispatch/common/queryperf.h3
-rw-r--r--searchcore/src/vespa/searchcore/fdispatch/common/rpc.cpp18
-rw-r--r--searchcore/src/vespa/searchcore/fdispatch/common/rpc.h15
-rw-r--r--searchcore/src/vespa/searchcore/fdispatch/common/search.cpp7
-rw-r--r--searchcore/src/vespa/searchcore/fdispatch/common/search.h8
-rw-r--r--searchcore/src/vespa/searchcore/fdispatch/common/timestat.cpp6
-rw-r--r--searchcore/src/vespa/searchcore/fdispatch/program/docsumadapter.cpp14
-rw-r--r--searchcore/src/vespa/searchcore/fdispatch/program/engineadapter.cpp13
-rw-r--r--searchcore/src/vespa/searchcore/fdispatch/program/rpc.cpp19
-rw-r--r--searchcore/src/vespa/searchcore/fdispatch/program/rpc.h3
-rw-r--r--searchcore/src/vespa/searchcore/fdispatch/search/fnet_dataset.cpp20
-rw-r--r--searchcore/src/vespa/searchcore/fdispatch/search/fnet_dataset.h3
-rw-r--r--searchcore/src/vespa/searchcore/fdispatch/search/fnet_engine.cpp26
-rw-r--r--searchcore/src/vespa/searchcore/fdispatch/search/mergehits.cpp24
-rw-r--r--searchcore/src/vespa/searchcore/fdispatch/search/mergehits.h23
-rw-r--r--searchcore/src/vespa/searchcore/fdispatch/search/nodemanager.cpp14
-rw-r--r--searchcore/src/vespa/searchcore/fdispatch/search/nodemanager.h11
-rw-r--r--searchcore/src/vespa/searchcore/fdispatch/search/plain_dataset.cpp38
-rw-r--r--searchcore/src/vespa/searchcore/fdispatch/search/query.cpp12
-rw-r--r--searchcore/src/vespa/searchcore/fdispatch/search/querycacheutil.cpp13
-rw-r--r--searchcore/src/vespa/searchcore/grouping/groupingmanager.cpp14
-rw-r--r--searchcore/src/vespa/searchcore/proton/attribute/attribute_collection_spec_factory.cpp3
-rw-r--r--searchcore/src/vespa/searchcore/proton/attribute/attribute_directory.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/attribute/attribute_factory.cpp4
-rw-r--r--searchcore/src/vespa/searchcore/proton/attribute/attribute_factory.h1
-rw-r--r--searchcore/src/vespa/searchcore/proton/attribute/attribute_manager_initializer.cpp11
-rw-r--r--searchcore/src/vespa/searchcore/proton/attribute/attribute_populator.cpp7
-rw-r--r--searchcore/src/vespa/searchcore/proton/attribute/attributedisklayout.cpp9
30 files changed, 107 insertions, 247 deletions
diff --git a/searchcore/src/vespa/searchcore/fdispatch/common/appcontext.cpp b/searchcore/src/vespa/searchcore/fdispatch/common/appcontext.cpp
index 15655d38cce..fbb71f81348 100644
--- a/searchcore/src/vespa/searchcore/fdispatch/common/appcontext.cpp
+++ b/searchcore/src/vespa/searchcore/fdispatch/common/appcontext.cpp
@@ -1,13 +1,7 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-// Copyright (C) 1998-2003 Fast Search & Transfer ASA
-// Copyright (C) 2003 Overture Services Norway AS
-#include <vespa/fastos/fastos.h>
-#include <vespa/log/log.h>
-LOG_SETUP(".appcontext");
#include "appcontext.h"
-
FastS_TimeKeeper::FastS_TimeKeeper()
: _clock(0.010),
_thread_pool(128 * 1024)
diff --git a/searchcore/src/vespa/searchcore/fdispatch/common/queryperf.cpp b/searchcore/src/vespa/searchcore/fdispatch/common/queryperf.cpp
index 34f7b1a3a55..55f3b6d895b 100644
--- a/searchcore/src/vespa/searchcore/fdispatch/common/queryperf.cpp
+++ b/searchcore/src/vespa/searchcore/fdispatch/common/queryperf.cpp
@@ -1,12 +1,9 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-// Copyright (C) 2005 Overture Services Norway AS
-#include <vespa/fastos/fastos.h>
+#include "queryperf.h"
+
#include <vespa/log/log.h>
LOG_SETUP(".queryperf");
-#include <vespa/fnet/fnet.h>
-#include <vespa/searchcore/fdispatch/common/queryperf.h>
-
FastS_QueryPerf::FastS_QueryPerf()
: queueLen(0),
diff --git a/searchcore/src/vespa/searchcore/fdispatch/common/queryperf.h b/searchcore/src/vespa/searchcore/fdispatch/common/queryperf.h
index 36d52cec820..a2b5593d9d8 100644
--- a/searchcore/src/vespa/searchcore/fdispatch/common/queryperf.h
+++ b/searchcore/src/vespa/searchcore/fdispatch/common/queryperf.h
@@ -1,8 +1,9 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-// Copyright (C) 2005 Overture Services Norway AS
#pragma once
+#include <cstdint>
+
struct FastS_QueryPerf
{
uint32_t queueLen;
diff --git a/searchcore/src/vespa/searchcore/fdispatch/common/rpc.cpp b/searchcore/src/vespa/searchcore/fdispatch/common/rpc.cpp
index 94d881ad075..b2b7086c20a 100644
--- a/searchcore/src/vespa/searchcore/fdispatch/common/rpc.cpp
+++ b/searchcore/src/vespa/searchcore/fdispatch/common/rpc.cpp
@@ -1,16 +1,8 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-// Copyright (C) 1998-2003 Fast Search & Transfer ASA
-// Copyright (C) 2003 Overture Services Norway AS
-#include <vespa/fastos/fastos.h>
-#include <vespa/log/log.h>
-LOG_SETUP(".rpc");
-#include <vespa/fnet/frt/frt.h>
-
-#include <vespa/searchcore/util/log.h>
#include "rpc.h"
-#include <vespa/searchsummary/docsummary/resultconfig.h>
+#include "appcontext.h"
extern char FastS_VersionTag[];
@@ -22,6 +14,14 @@ FastS_RPC::FastS_RPC(FastS_AppContext *appCtx) :
{
}
+bool FastS_RPC::Start() {
+ return _transport.Start(_appCtx->GetThreadPool());
+}
+
+void FastS_RPC::ShutDown() {
+ _transport.ShutDown(true);
+}
+
bool
FastS_RPC::Init(int port, const vespalib::string &myHeartbeatId)
{
diff --git a/searchcore/src/vespa/searchcore/fdispatch/common/rpc.h b/searchcore/src/vespa/searchcore/fdispatch/common/rpc.h
index 9693d31314e..2a374d7d0d7 100644
--- a/searchcore/src/vespa/searchcore/fdispatch/common/rpc.h
+++ b/searchcore/src/vespa/searchcore/fdispatch/common/rpc.h
@@ -1,14 +1,15 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-// Copyright (C) 1998-2003 Fast Search & Transfer ASA
-// Copyright (C) 2003 Overture Services Norway AS
#pragma once
-#include <vespa/fnet/frt/frt.h>
-#include <vespa/searchcore/fdispatch/common/appcontext.h>
+#include <vespa/fnet/frt/invokable.h>
+#include <vespa/fnet/frt/supervisor.h>
+#include <vespa/fnet/transport.h>
#include <vespa/vespalib/stllike/string.h>
#include <vespa/slobrok/sbregister.h>
+class FastS_AppContext;
+
class FastS_RPC : public FRT_Invokable
{
private:
@@ -22,13 +23,13 @@ private:
public:
FastS_RPC(FastS_AppContext *appCtx);
- virtual ~FastS_RPC() {}
+ ~FastS_RPC() {}
FastS_AppContext *GetAppCtx() { return _appCtx; }
FRT_Supervisor *GetSupervisor() { return &_supervisor; }
bool Init(int port, const vespalib::string& myHeartbeatId);
- bool Start() { return _transport.Start(_appCtx->GetThreadPool()); }
- void ShutDown() { _transport.ShutDown(true); }
+ bool Start();
+ void ShutDown();
// Register RPC Methods
diff --git a/searchcore/src/vespa/searchcore/fdispatch/common/search.cpp b/searchcore/src/vespa/searchcore/fdispatch/common/search.cpp
index e4c713bf901..79097cc7326 100644
--- a/searchcore/src/vespa/searchcore/fdispatch/common/search.cpp
+++ b/searchcore/src/vespa/searchcore/fdispatch/common/search.cpp
@@ -1,11 +1,5 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-// Copyright (C) 1998-2003 Fast Search & Transfer ASA
-// Copyright (C) 2003 Overture Services Norway AS
-#include <vespa/fastos/fastos.h>
-#include <vespa/log/log.h>
-LOG_SETUP(".search");
-#include <vespa/searchcore/util/log.h>
#include "search.h"
//---------------------------------------------------------------------
@@ -161,7 +155,6 @@ FastS_SyncSearchAdapter::Adapt(FastS_ISearch *search)
return search;
FastS_SyncSearchAdapter *ret = new FastS_SyncSearchAdapter(search);
- FastS_assert(ret != NULL);
search->SetAsyncArgs(ret, FastS_SearchContext());
return ret;
}
diff --git a/searchcore/src/vespa/searchcore/fdispatch/common/search.h b/searchcore/src/vespa/searchcore/fdispatch/common/search.h
index 4765800baca..a018187dfdb 100644
--- a/searchcore/src/vespa/searchcore/fdispatch/common/search.h
+++ b/searchcore/src/vespa/searchcore/fdispatch/common/search.h
@@ -1,16 +1,14 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-// Copyright (C) 1999-2003 Fast Search & Transfer ASA
-// Copyright (C) 2003 Overture Services Norway AS
#pragma once
-#include <vespa/document/base/globalid.h>
+#include <vespa/searchsummary/docsummary/getdocsumargs.h>
#include <vespa/searchlib/common/fslimits.h>
#include <vespa/searchlib/engine/errorcodes.h>
-#include <vespa/searchsummary/docsummary/getdocsumargs.h>
#include <vespa/searchlib/engine/searchrequest.h>
#include <vespa/searchlib/common/packets.h>
-
+#include <vespa/document/base/globalid.h>
+#include <vespa/fastos/cond.h>
#include <limits>
class FastS_ISearch;
diff --git a/searchcore/src/vespa/searchcore/fdispatch/common/timestat.cpp b/searchcore/src/vespa/searchcore/fdispatch/common/timestat.cpp
index 431a487c357..7f76e4e4777 100644
--- a/searchcore/src/vespa/searchcore/fdispatch/common/timestat.cpp
+++ b/searchcore/src/vespa/searchcore/fdispatch/common/timestat.cpp
@@ -1,10 +1,6 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-// Copyright (C) 2003 Fast Search & Transfer ASA
-// Copyright (C) 2003 Overture Services Norway AS
-
-#include <vespa/fastos/fastos.h>
-#include <vespa/searchcore/fdispatch/common/timestat.h>
+#include "timestat.h"
void
FastS_TimeStatHistory::Reset()
diff --git a/searchcore/src/vespa/searchcore/fdispatch/program/docsumadapter.cpp b/searchcore/src/vespa/searchcore/fdispatch/program/docsumadapter.cpp
index 32362dba422..771a0a675c0 100644
--- a/searchcore/src/vespa/searchcore/fdispatch/program/docsumadapter.cpp
+++ b/searchcore/src/vespa/searchcore/fdispatch/program/docsumadapter.cpp
@@ -1,15 +1,11 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
-#include <vespa/log/log.h>
-LOG_SETUP(".fdispatch.docsumadapter");
#include "docsumadapter.h"
-#include <vespa/searchcore/util/log.h>
-#include <vespa/searchlib/common/packets.h>
-#include <vespa/searchlib/fef/queryproperties.h>
-#include <vespa/searchlib/parsequery/simplequerystack.h>
#include <vespa/searchcore/fdispatch/search/datasetcollection.h>
+#include <vespa/log/log.h>
+LOG_SETUP(".fdispatch.docsumadapter");
+
namespace fdispatch {
void
@@ -34,9 +30,9 @@ void
DocsumAdapter::handleRequest()
{
_dsc = _appCtx->GetDataSetCollection();
- FastS_assert(_dsc != NULL);
+ assert(_dsc != NULL);
_search = _dsc->CreateSearch(FastS_NoID32(), _appCtx->GetTimeKeeper());
- FastS_assert(_search != NULL);
+ assert(_search != NULL);
_docsumsResult = _search->GetDocsumsResult();
_search->SetGetDocsumArgs(&_args);
_search->GetDocsums(_hitbuf, _hitcnt);
diff --git a/searchcore/src/vespa/searchcore/fdispatch/program/engineadapter.cpp b/searchcore/src/vespa/searchcore/fdispatch/program/engineadapter.cpp
index 5c24b693ad8..86b4ddd00a1 100644
--- a/searchcore/src/vespa/searchcore/fdispatch/program/engineadapter.cpp
+++ b/searchcore/src/vespa/searchcore/fdispatch/program/engineadapter.cpp
@@ -1,17 +1,14 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
-#include <vespa/log/log.h>
-LOG_SETUP(".fdispatch.engineadapter");
#include "engineadapter.h"
-#include <vespa/searchlib/common/packets.h>
+#include "searchadapter.h"
+#include "docsumadapter.h"
#include <vespa/searchcore/fdispatch/search/child_info.h>
#include <vespa/searchcore/fdispatch/search/nodemanager.h>
-#include <vespa/searchcore/fdispatch/search/datasetcollection.h>
#include <vespa/searchcore/fdispatch/search/dataset_base.h>
-#include <vespa/searchcore/fdispatch/common/search.h>
-#include "searchadapter.h"
-#include "docsumadapter.h"
+
+#include <vespa/log/log.h>
+LOG_SETUP(".fdispatch.engineadapter");
namespace fdispatch {
diff --git a/searchcore/src/vespa/searchcore/fdispatch/program/rpc.cpp b/searchcore/src/vespa/searchcore/fdispatch/program/rpc.cpp
index 5f571f0ecd1..d82f68fcd7d 100644
--- a/searchcore/src/vespa/searchcore/fdispatch/program/rpc.cpp
+++ b/searchcore/src/vespa/searchcore/fdispatch/program/rpc.cpp
@@ -1,26 +1,9 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-// Copyright (C) 1998-2003 Fast Search & Transfer ASA
-// Copyright (C) 2003 Overture Services Norway AS
-#include <vespa/fastos/fastos.h>
-#include <functional>
-
-#include <vespa/log/log.h>
-LOG_SETUP(".rpc");
-
-#include <vespa/fnet/frt/frt.h>
-
-#include <vespa/searchcore/util/log.h>
-#include <vespa/searchlib/common/transport.h>
-#include <vespa/searchlib/parsequery/simplequerystack.h>
-#include <vespa/searchcore/fdispatch/search/configdesc.h>
+#include "rpc.h"
#include <vespa/searchcore/fdispatch/search/engine_base.h>
-#include <vespa/searchcore/fdispatch/search/plain_dataset.h>
#include <vespa/searchcore/fdispatch/search/datasetcollection.h>
-#include <vespa/searchcore/fdispatch/program/rpc.h>
-
-
void
FastS_fdispatch_RPC::RegisterMethods(FRT_ReflectionBuilder *rb)
{
diff --git a/searchcore/src/vespa/searchcore/fdispatch/program/rpc.h b/searchcore/src/vespa/searchcore/fdispatch/program/rpc.h
index dad78a00b13..fc01d88615c 100644
--- a/searchcore/src/vespa/searchcore/fdispatch/program/rpc.h
+++ b/searchcore/src/vespa/searchcore/fdispatch/program/rpc.h
@@ -1,10 +1,7 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-// Copyright (C) 1998-2003 Fast Search & Transfer ASA
-// Copyright (C) 2003 Overture Services Norway AS
#pragma once
-#include <vespa/fnet/frt/frt.h>
#include <vespa/searchcore/fdispatch/common/rpc.h>
diff --git a/searchcore/src/vespa/searchcore/fdispatch/search/fnet_dataset.cpp b/searchcore/src/vespa/searchcore/fdispatch/search/fnet_dataset.cpp
index 9f775fcce51..ebd077ece46 100644
--- a/searchcore/src/vespa/searchcore/fdispatch/search/fnet_dataset.cpp
+++ b/searchcore/src/vespa/searchcore/fdispatch/search/fnet_dataset.cpp
@@ -1,22 +1,12 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-// Copyright (C) 1998-2003 Fast Search & Transfer ASA
-// Copyright (C) 2003 Overture Services Norway AS
-#include <vespa/fastos/fastos.h>
+#include "fnet_dataset.h"
+#include "fnet_engine.h"
+#include "fnet_search.h"
+#include "datasetcollection.h"
+
#include <vespa/log/log.h>
LOG_SETUP(".search.fnet_dataset");
-#include <vespa/fnet/fnet.h>
-#include <vespa/searchlib/common/fslimits.h>
-#include <vespa/searchcore/util/log.h>
-#include <vespa/searchcore/fdispatch/search/configdesc.h>
-#include <vespa/searchcore/fdispatch/common/search.h>
-#include <vespa/searchcore/util/eventloop.h>
-
-#include <vespa/searchlib/common/packets.h>
-#include <vespa/searchcore/fdispatch/search/datasetcollection.h>
-#include <vespa/searchcore/fdispatch/search/fnet_dataset.h>
-#include <vespa/searchcore/fdispatch/search/fnet_engine.h>
-#include <vespa/searchcore/fdispatch/search/fnet_search.h>
//--------------------------------------------------------------------------
diff --git a/searchcore/src/vespa/searchcore/fdispatch/search/fnet_dataset.h b/searchcore/src/vespa/searchcore/fdispatch/search/fnet_dataset.h
index 7f5fbd50298..48ea6b58b2f 100644
--- a/searchcore/src/vespa/searchcore/fdispatch/search/fnet_dataset.h
+++ b/searchcore/src/vespa/searchcore/fdispatch/search/fnet_dataset.h
@@ -4,8 +4,9 @@
#pragma once
-#include <vespa/searchcore/fdispatch/search/plain_dataset.h>
+#include "plain_dataset.h"
+class FNET_Transport;
class FastS_FNET_DataSet : public FastS_PlainDataSet
{
diff --git a/searchcore/src/vespa/searchcore/fdispatch/search/fnet_engine.cpp b/searchcore/src/vespa/searchcore/fdispatch/search/fnet_engine.cpp
index 88aa04a9078..c7b2ee6d5fa 100644
--- a/searchcore/src/vespa/searchcore/fdispatch/search/fnet_engine.cpp
+++ b/searchcore/src/vespa/searchcore/fdispatch/search/fnet_engine.cpp
@@ -1,21 +1,11 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-// Copyright (C) 1998-2003 Fast Search & Transfer ASA
-// Copyright (C) 2003 Overture Services Norway AS
-
-#include <vespa/fastos/fastos.h>
-#include <vespa/log/log.h>
-LOG_SETUP(".search.fnet_engine");
-#include <vespa/fnet/fnet.h>
-#include <vespa/searchcore/fdispatch/common/stdincl.h>
-#include <vespa/searchlib/common/fslimits.h>
-#include <vespa/searchcore/util/log.h>
-#include <vespa/searchcore/fdispatch/search/configdesc.h>
-#include <vespa/searchcore/fdispatch/common/search.h>
-#include <vespa/searchlib/common/packets.h>
-#include <vespa/searchcore/fdispatch/search/fnet_dataset.h>
-#include <vespa/searchcore/fdispatch/search/datasetcollection.h>
-#include <vespa/searchcore/fdispatch/search/fnet_engine.h>
+#include "fnet_dataset.h"
+#include "datasetcollection.h"
+#include "fnet_engine.h"
+#include <vespa/searchcore/fdispatch/common/search.h>
+#include <vespa/fnet/transport.h>
+#include <vespa/fnet/connection.h>
using namespace search::fs4transport;
@@ -38,9 +28,7 @@ FastS_StaticMonitorQuery::FastS_StaticMonitorQuery()
: FS4Packet_MONITORQUERYX(),
_lock(),
_refcnt(1)
-{
-
-}
+{ }
FastS_StaticMonitorQuery::~FastS_StaticMonitorQuery()
diff --git a/searchcore/src/vespa/searchcore/fdispatch/search/mergehits.cpp b/searchcore/src/vespa/searchcore/fdispatch/search/mergehits.cpp
index 9639cc5a8bd..a3a9afd8dcd 100644
--- a/searchcore/src/vespa/searchcore/fdispatch/search/mergehits.cpp
+++ b/searchcore/src/vespa/searchcore/fdispatch/search/mergehits.cpp
@@ -1,20 +1,13 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-// Copyright (C) 1998-2003 Fast Search & Transfer ASA
-// Copyright (C) 2003 Overture Services Norway AS
-#include <vespa/fastos/fastos.h>
-#include <vespa/log/log.h>
-LOG_SETUP("");
-#include <vespa/fnet/fnet.h>
-#include <vespa/searchcore/util/log.h>
+#include "mergehits.h"
+#include "querycacheutil.h"
+#include "fnet_dataset.h"
+#include "fnet_search.h"
#include <vespa/searchcore/util/stlishheap.h>
-#include <vespa/searchlib/common/packets.h>
-#include <vespa/searchcore/fdispatch/common/appcontext.h>
-#include <vespa/searchcore/fdispatch/search/querycacheutil.h>
-#include <vespa/searchcore/fdispatch/search/fnet_dataset.h>
-#include <vespa/searchcore/fdispatch/search/fnet_engine.h>
-#include <vespa/searchcore/fdispatch/search/fnet_search.h>
-#include <vespa/searchcore/fdispatch/search/mergehits.h>
+
+#include <vespa/log/log.h>
+LOG_SETUP(".fdispatch.mergehits");
using search::common::SortData;
using search::common::SortDataIterator;
@@ -212,8 +205,7 @@ FastS_HitMerger<T>::MergeHits()
if (sortDataDocs == numDocs) {
useSortData = true;
} else {
- LOG(warning,
- "Some results are missing sort data, sorting by rank instead");
+ LOG(warning, "Some results are missing sort data, sorting by rank instead");
}
}
diff --git a/searchcore/src/vespa/searchcore/fdispatch/search/mergehits.h b/searchcore/src/vespa/searchcore/fdispatch/search/mergehits.h
index cbdda7e39bf..75a72c84948 100644
--- a/searchcore/src/vespa/searchcore/fdispatch/search/mergehits.h
+++ b/searchcore/src/vespa/searchcore/fdispatch/search/mergehits.h
@@ -1,13 +1,18 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-// Copyright (C) 1998-2003 Fast Search & Transfer ASA
-// Copyright (C) 2003 Overture Services Norway AS
#pragma once
+#include <vespa/searchlib/common/sortdata.h>
+#include <vespa/searchlib/common/packets.h>
#include <vespa/document/base/globalid.h>
//-----------------------------------------------------------------------------
+class FastS_hitresult;
+class FastS_QueryResult;
+class FastS_FNET_Search;
+class FastS_FNET_SearchNode;
+
// T::HitType API
struct FastS_MergeHits_DummyHit
@@ -29,10 +34,8 @@ struct FastS_MergeHits_DummyHit
struct FastS_MergeHits_DummyNode
{
- bool NT_InitMerge(uint32_t *numDocs,
- uint64_t *totalHits,
- search::HitRank *maxRank,
- uint32_t *sortDataDocs)
+ bool NT_InitMerge(uint32_t *numDocs, uint64_t *totalHits,
+ search::HitRank *maxRank, uint32_t *sortDataDocs)
{
(void) numDocs;
(void) totalHits;
@@ -40,7 +43,7 @@ struct FastS_MergeHits_DummyNode
(void) sortDataDocs;
return false;
}
- search::common::SortDataIterator *NT_GetSortDataIterator() { return NULL; }
+ search::common::SortDataIterator *NT_GetSortDataIterator() { return NULL; }
FastS_MergeHits_DummyHit *NT_GetHit() { return NULL; }
uint32_t NT_GetNumHitsUsed() { return 0; }
uint32_t NT_GetNumHitsLeft() { return 0; }
@@ -85,7 +88,7 @@ struct FastS_MergeHits_DummyMerge
struct FastS_FNETMerge
{
- typedef FS4Packet_QUERYRESULTX::FS4_hit HitType;
+ typedef search::fs4transport::FS4Packet_QUERYRESULTX::FS4_hit HitType;
typedef FastS_FNET_SearchNode NodeType;
typedef FastS_FNET_Search SearchType;
};
@@ -100,7 +103,6 @@ private:
FastS_HitMerger& operator=(const FastS_HitMerger &);
- typedef typename T::HitType HIT;
typedef typename T::NodeType NODE;
typedef typename T::SearchType SEARCH;
@@ -153,6 +155,3 @@ public:
void MergeHits();
};
-
-//-----------------------------------------------------------------------------
-
diff --git a/searchcore/src/vespa/searchcore/fdispatch/search/nodemanager.cpp b/searchcore/src/vespa/searchcore/fdispatch/search/nodemanager.cpp
index 9435df7fa62..ed5e069c3ee 100644
--- a/searchcore/src/vespa/searchcore/fdispatch/search/nodemanager.cpp
+++ b/searchcore/src/vespa/searchcore/fdispatch/search/nodemanager.cpp
@@ -1,17 +1,13 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-// Copyright (C) 1998-2003 Fast Search & Transfer ASA
-// Copyright (C) 2003 Overture Services Norway AS
-#include <vespa/fastos/fastos.h>
-#include <vespa/log/log.h>
-
-#include <vespa/searchcore/fdispatch/common/appcontext.h>
-#include <vespa/searchcore/fdispatch/search/datasetcollection.h>
-#include <vespa/searchcore/fdispatch/search/nodemanager.h>
-#include <vespa/searchcore/fdispatch/search/plain_dataset.h>
+#include "nodemanager.h"
+#include "datasetcollection.h"
+#include "plain_dataset.h"
#include "engine_base.h"
+#include <vespa/searchcore/fdispatch/common/appcontext.h>
+#include <vespa/log/log.h>
LOG_SETUP(".search.nodemanager");
void
diff --git a/searchcore/src/vespa/searchcore/fdispatch/search/nodemanager.h b/searchcore/src/vespa/searchcore/fdispatch/search/nodemanager.h
index 8543456b4f6..1d2aa617f35 100644
--- a/searchcore/src/vespa/searchcore/fdispatch/search/nodemanager.h
+++ b/searchcore/src/vespa/searchcore/fdispatch/search/nodemanager.h
@@ -1,6 +1,4 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-// Copyright (C) 1998-2003 Fast Search & Transfer ASA
-// Copyright (C) 2003 Overture Services Norway AS
#pragma once
@@ -13,6 +11,9 @@
using vespa::config::search::core::PartitionsConfig;
class FastS_DataSetBase;
+class FastS_AppContext;
+class FastS_DataSetCollection;
+class FastS_TimeKeeper;
class FastS_NodeManager : public config::IFetcherCallback<PartitionsConfig>
{
@@ -22,9 +23,9 @@ private:
vespalib::SimpleComponentConfigProducer &_componentConfig;
- FastOS_Mutex _managerLock;
- FastOS_Mutex _configLock;
- FastOS_Mutex _stampLock;
+ FastOS_Mutex _managerLock;
+ FastOS_Mutex _configLock;
+ FastOS_Mutex _stampLock;
FastS_AppContext *_appCtx;
uint32_t _mldPartit;
uint32_t _mldDocStamp; // Bumped for all cache flushes
diff --git a/searchcore/src/vespa/searchcore/fdispatch/search/plain_dataset.cpp b/searchcore/src/vespa/searchcore/fdispatch/search/plain_dataset.cpp
index af2d6627ac9..11fc2cc3f8a 100644
--- a/searchcore/src/vespa/searchcore/fdispatch/search/plain_dataset.cpp
+++ b/searchcore/src/vespa/searchcore/fdispatch/search/plain_dataset.cpp
@@ -1,26 +1,14 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-// Copyright (C) 1998-2003 Fast Search & Transfer ASA
-// Copyright (C) 2003 Overture Services Norway AS
-#include <vespa/fastos/fastos.h>
-#include <functional>
+#include "plain_dataset.h"
+#include "datasetcollection.h"
+#include "engine_base.h"
+#include "nodemanager.h"
+#include <vespa/searchcore/fdispatch/common/search.h>
+#include <vespa/vespalib/util/host_name.h>
#include <iomanip>
-#include <sstream>
#include <vespa/log/log.h>
-#include <vespa/fnet/fnet.h>
-#include <vespa/vespalib/util/host_name.h>
-#include <vespa/searchcore/fdispatch/common/stdincl.h>
-#include <vespa/searchlib/common/fslimits.h>
-#include <vespa/searchcore/util/log.h>
-#include <vespa/searchcore/fdispatch/search/configdesc.h>
-#include <vespa/searchcore/fdispatch/common/search.h>
-
-#include <vespa/searchcore/fdispatch/search/datasetcollection.h>
-#include <vespa/searchcore/fdispatch/search/engine_base.h>
-#include <vespa/searchcore/fdispatch/search/plain_dataset.h>
-#include <vespa/searchcore/fdispatch/search/nodemanager.h>
-
LOG_SETUP(".search.plain_dataset");
//--------------------------------------------------------------------------
@@ -70,9 +58,7 @@ FastS_PartitionMap::FastS_PartitionMap(FastS_DataSetDesc *desc)
{
// finalize config settings
if (_num_partitions > (1U << _partBits)) {
- LOG(error,
- "Too many partitions %d constrained by partbits %d",
- _num_partitions, _partBits);
+ LOG(error, "Too many partitions %d constrained by partbits %d", _num_partitions, _partBits);
_num_partitions = (1U << _partBits);
}
@@ -567,19 +553,9 @@ FastS_PlainDataSet::AreEnginesReady()
void
FastS_PlainDataSet::Ping()
{
-#ifdef FNET_SANITY_CHECKS
- FastOS_Time beforePing;
- beforePing.SetNow();
-#endif
for (FastS_EngineBase* engine : _enginesArray) {
engine->Ping();
}
-#ifdef FNET_SANITY_CHECKS
- double pingTime = beforePing.MilliSecsToNow();
- if (pingTime > 100.0) {
- LOG(warning, "SANITY: Dataset (%d) ping time: %.2f ms", GetID(), pingTime);
- }
-#endif
}
diff --git a/searchcore/src/vespa/searchcore/fdispatch/search/query.cpp b/searchcore/src/vespa/searchcore/fdispatch/search/query.cpp
index 30ad3bcf9f4..c59164d06f4 100644
--- a/searchcore/src/vespa/searchcore/fdispatch/search/query.cpp
+++ b/searchcore/src/vespa/searchcore/fdispatch/search/query.cpp
@@ -1,15 +1,7 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-// Copyright (C) 1999-2003 Fast Search & Transfer ASA
-// Copyright (C) 2003 Overture Services Norway AS
-
-#include <vespa/fastos/fastos.h>
-#include <vespa/log/log.h>
-LOG_SETUP(".query");
-#include <vespa/searchcore/util/log.h>
-#include <vespa/searchcore/fdispatch/search/query.h>
-#include <vespa/searchlib/common/transport.h>
-#include <vespa/searchlib/parsequery/simplequerystack.h>
+#include "query.h"
+#include <vespa/searchlib/parsequery/simplequerystack.h>
/** Marks as empty
*/
diff --git a/searchcore/src/vespa/searchcore/fdispatch/search/querycacheutil.cpp b/searchcore/src/vespa/searchcore/fdispatch/search/querycacheutil.cpp
index 62a6b470b73..ce0158897da 100644
--- a/searchcore/src/vespa/searchcore/fdispatch/search/querycacheutil.cpp
+++ b/searchcore/src/vespa/searchcore/fdispatch/search/querycacheutil.cpp
@@ -1,18 +1,11 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-// Copyright (C) 1998-2003 Fast Search & Transfer ASA
-// Copyright (C) 2003 Overture Services Norway AS
-#include <vespa/fastos/fastos.h>
-#include <vespa/log/log.h>
-LOG_SETUP(".search.querycacheutil");
-#include <vespa/searchcore/util/log.h>
-
-#include <vespa/searchlib/common/transport.h>
+#include "querycacheutil.h"
#include <vespa/searchlib/parsequery/simplequerystack.h>
-
#include <vespa/searchlib/common/sortdata.h>
-#include <vespa/searchcore/fdispatch/search/querycacheutil.h>
+#include <vespa/log/log.h>
+LOG_SETUP(".search.querycacheutil");
using search::common::SortData;
diff --git a/searchcore/src/vespa/searchcore/grouping/groupingmanager.cpp b/searchcore/src/vespa/searchcore/grouping/groupingmanager.cpp
index 83f81105f25..188757d69ba 100644
--- a/searchcore/src/vespa/searchcore/grouping/groupingmanager.cpp
+++ b/searchcore/src/vespa/searchcore/grouping/groupingmanager.cpp
@@ -1,19 +1,13 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
-#include <vespa/log/log.h>
-LOG_SETUP(".groupingmanager");
+
#include "groupingmanager.h"
-#include <vector>
-#include <vespa/searchlib/aggregation/grouping.h>
-#include <vespa/searchlib/aggregation/groupinglevel.h>
#include <vespa/searchlib/aggregation/fs4hit.h>
-#include <vespa/vespalib/objects/objectpredicate.h>
-#include <vespa/vespalib/objects/objectoperation.h>
#include <vespa/searchlib/expression/attributenode.h>
-#include <vespa/searchlib/expression/expressiontree.h>
-#include <vespa/searchlib/expression/expressionnode.h>
#include <vespa/searchcore/grouping/groupingsession.h>
+#include <vespa/log/log.h>
+LOG_SETUP(".groupingmanager");
+
namespace search {
namespace grouping {
diff --git a/searchcore/src/vespa/searchcore/proton/attribute/attribute_collection_spec_factory.cpp b/searchcore/src/vespa/searchcore/proton/attribute/attribute_collection_spec_factory.cpp
index b83680dc3f7..7d4ef067cbd 100644
--- a/searchcore/src/vespa/searchcore/proton/attribute/attribute_collection_spec_factory.cpp
+++ b/searchcore/src/vespa/searchcore/proton/attribute/attribute_collection_spec_factory.cpp
@@ -1,8 +1,5 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
-#include <vespa/log/log.h>
-LOG_SETUP(".proton.attribute.attribute_collection_spec_factory");
#include "attribute_collection_spec_factory.h"
#include <vespa/searchlib/attribute/configconverter.h>
diff --git a/searchcore/src/vespa/searchcore/proton/attribute/attribute_directory.cpp b/searchcore/src/vespa/searchcore/proton/attribute/attribute_directory.cpp
index d55edb09ecf..eb462ebebe2 100644
--- a/searchcore/src/vespa/searchcore/proton/attribute/attribute_directory.cpp
+++ b/searchcore/src/vespa/searchcore/proton/attribute/attribute_directory.cpp
@@ -1,11 +1,11 @@
// Copyright 2017 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
#include "attribute_directory.h"
#include "attributedisklayout.h"
#include <vespa/searchlib/util/filekit.h>
#include <vespa/vespalib/io/fileutil.h>
#include <vespa/vespalib/stllike/asciistream.h>
+
#include <vespa/log/log.h>
LOG_SETUP(".proton.attribute.attribute_directory");
diff --git a/searchcore/src/vespa/searchcore/proton/attribute/attribute_factory.cpp b/searchcore/src/vespa/searchcore/proton/attribute/attribute_factory.cpp
index d0ae670b4ba..54f2fb5ced5 100644
--- a/searchcore/src/vespa/searchcore/proton/attribute/attribute_factory.cpp
+++ b/searchcore/src/vespa/searchcore/proton/attribute/attribute_factory.cpp
@@ -1,9 +1,5 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
-#include <vespa/log/log.h>
-LOG_SETUP(".proton.attribute.attribute_factory");
-
#include "attribute_factory.h"
#include <vespa/searchlib/attribute/attributefactory.h>
diff --git a/searchcore/src/vespa/searchcore/proton/attribute/attribute_factory.h b/searchcore/src/vespa/searchcore/proton/attribute/attribute_factory.h
index 92ad73cefdd..09127980434 100644
--- a/searchcore/src/vespa/searchcore/proton/attribute/attribute_factory.h
+++ b/searchcore/src/vespa/searchcore/proton/attribute/attribute_factory.h
@@ -3,7 +3,6 @@
#pragma once
#include "i_attribute_factory.h"
-#include <set>
namespace proton {
diff --git a/searchcore/src/vespa/searchcore/proton/attribute/attribute_manager_initializer.cpp b/searchcore/src/vespa/searchcore/proton/attribute/attribute_manager_initializer.cpp
index e9fdd8638c9..f77bddc73ea 100644
--- a/searchcore/src/vespa/searchcore/proton/attribute/attribute_manager_initializer.cpp
+++ b/searchcore/src/vespa/searchcore/proton/attribute/attribute_manager_initializer.cpp
@@ -1,10 +1,8 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
#include "attribute_manager_initializer.h"
+#include "attributes_initializer_base.h"
#include "attribute_collection_spec_factory.h"
-#include "sequential_attributes_initializer.h"
-#include <vespa/searchcore/proton/initializer/initializer_task.h>
#include <vespa/searchcorespi/index/i_thread_service.h>
#include <future>
@@ -35,7 +33,7 @@ public:
_result(result)
{}
- virtual void run() override {
+ void run() override {
AttributeInitializerResult result = _initializer->init();
if (result) {
AttributesInitializerBase::considerPadAttribute(*result.getAttribute(),
@@ -60,8 +58,8 @@ public:
DocumentMetaStore::SP documentMetaStore,
AttributeManager::SP attrMgr,
InitializedAttributesResult &attributesResult);
- virtual ~AttributeManagerInitializerTask() override;
- virtual void run() override;
+ ~AttributeManagerInitializerTask() override;
+ void run() override;
};
@@ -149,7 +147,6 @@ AttributeManagerInitializer::AttributeManagerInitializer(SerialNum configSerialN
size_t attributeGrowNumDocs,
bool fastAccessAttributesOnly,
searchcorespi::index::IThreadService &master,
-
std::shared_ptr<AttributeManager::SP> attrMgrResult)
: _configSerialNum(configSerialNum),
_documentMetaStore(documentMetaStore),
diff --git a/searchcore/src/vespa/searchcore/proton/attribute/attribute_populator.cpp b/searchcore/src/vespa/searchcore/proton/attribute/attribute_populator.cpp
index c89dbb9efd8..286c6b912ad 100644
--- a/searchcore/src/vespa/searchcore/proton/attribute/attribute_populator.cpp
+++ b/searchcore/src/vespa/searchcore/proton/attribute/attribute_populator.cpp
@@ -1,14 +1,13 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
-#include <vespa/log/log.h>
-LOG_SETUP(".proton.attribute.attribute_populator");
#include "attribute_populator.h"
-
#include <vespa/searchcore/proton/common/eventlogger.h>
#include <vespa/searchlib/common/idestructorcallback.h>
#include <vespa/searchlib/attribute/attributevector.h>
+#include <vespa/log/log.h>
+LOG_SETUP(".proton.attribute.attribute_populator");
+
using search::IDestructorCallback;
namespace proton {
diff --git a/searchcore/src/vespa/searchcore/proton/attribute/attributedisklayout.cpp b/searchcore/src/vespa/searchcore/proton/attribute/attributedisklayout.cpp
index 349a8a632cb..69018d490e1 100644
--- a/searchcore/src/vespa/searchcore/proton/attribute/attributedisklayout.cpp
+++ b/searchcore/src/vespa/searchcore/proton/attribute/attributedisklayout.cpp
@@ -1,14 +1,11 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
-#include <vespa/log/log.h>
-LOG_SETUP(".proton.attribute.attributedisklayout");
#include "attributedisklayout.h"
-#include <vespa/vespalib/io/fileutil.h>
#include "attribute_directory.h"
+#include <vespa/vespalib/io/fileutil.h>
+#include <vespa/fastos/file.h>
-namespace proton
-{
+namespace proton {
AttributeDiskLayout::AttributeDiskLayout(const vespalib::string &baseDir, PrivateConstructorTag)
: _baseDir(baseDir),