aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@broadpark.no>2017-05-26 12:09:21 +0200
committerGitHub <noreply@github.com>2017-05-26 12:09:21 +0200
commita25bdfc49336fa028557649dbe332c37d79847ee (patch)
tree3c43db36be5aacd01be29e97fd8343a99380cd00 /searchcore
parent085709b42ff698bd6db8f1231fa8d93fadc0e86c (diff)
parent968531905601cf330cf29ee765f1efbe1328c21c (diff)
Merge pull request #2542 from yahoo/balder/remove-fastos-dependency
Balder/remove fastos dependency
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/attribute_usage_filter.cpp4
-rw-r--r--searchcore/src/vespa/searchcore/proton/attribute/attribute_usage_sampler_context.cpp1
-rw-r--r--searchcore/src/vespa/searchcore/proton/attribute/attribute_usage_sampler_functor.cpp1
-rw-r--r--searchcore/src/vespa/searchcore/proton/attribute/attribute_usage_sampler_functor.h1
-rw-r--r--searchcore/src/vespa/searchcore/proton/attribute/attribute_usage_stats.cpp1
-rw-r--r--searchcore/src/vespa/searchcore/proton/attribute/attribute_vector_explorer.cpp4
-rw-r--r--searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.cpp12
-rw-r--r--searchcore/src/vespa/searchcore/proton/attribute/attributedisklayout.cpp9
-rw-r--r--searchcore/src/vespa/searchcore/proton/attribute/attributedisklayout.h1
-rw-r--r--searchcore/src/vespa/searchcore/proton/attribute/attributesconfigscout.cpp4
-rw-r--r--searchcore/src/vespa/searchcore/proton/attribute/exclusive_attribute_read_accessor.cpp6
-rw-r--r--searchcore/src/vespa/searchcore/proton/attribute/exclusive_attribute_read_accessor.h6
-rw-r--r--searchcore/src/vespa/searchcore/proton/attribute/imported_attributes_context.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/attribute/imported_attributes_repo.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/attribute/sequential_attributes_initializer.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/bucketdb/bucket_db_explorer.cpp1
-rw-r--r--searchcore/src/vespa/searchcore/proton/bucketdb/bucket_db_owner.cpp1
-rw-r--r--searchcore/src/vespa/searchcore/proton/bucketdb/bucket_db_owner.h2
-rw-r--r--searchcore/src/vespa/searchcore/proton/bucketdb/bucketdb.cpp17
-rw-r--r--searchcore/src/vespa/searchcore/proton/bucketdb/bucketdb.h8
-rw-r--r--searchcore/src/vespa/searchcore/proton/bucketdb/bucketdbhandler.cpp19
-rw-r--r--searchcore/src/vespa/searchcore/proton/bucketdb/bucketdbhandler.h8
-rw-r--r--searchcore/src/vespa/searchcore/proton/bucketdb/bucketdeltapair.h8
-rw-r--r--searchcore/src/vespa/searchcore/proton/bucketdb/bucketsessionbase.cpp11
-rw-r--r--searchcore/src/vespa/searchcore/proton/bucketdb/bucketsessionbase.h15
-rw-r--r--searchcore/src/vespa/searchcore/proton/bucketdb/bucketstate.cpp16
-rw-r--r--searchcore/src/vespa/searchcore/proton/bucketdb/bucketstate.h94
-rw-r--r--searchcore/src/vespa/searchcore/proton/bucketdb/joinbucketssession.cpp12
-rw-r--r--searchcore/src/vespa/searchcore/proton/bucketdb/joinbucketssession.h8
-rw-r--r--searchcore/src/vespa/searchcore/proton/bucketdb/splitbucketsession.cpp12
-rw-r--r--searchcore/src/vespa/searchcore/proton/bucketdb/splitbucketsession.h61
-rw-r--r--searchcore/src/vespa/searchcore/proton/common/attributefieldvaluenode.cpp7
-rw-r--r--searchcore/src/vespa/searchcore/proton/common/bucketfactory.cpp6
-rw-r--r--searchcore/src/vespa/searchcore/proton/common/commit_time_tracker.cpp4
-rw-r--r--searchcore/src/vespa/searchcore/proton/common/dbdocumentid.cpp3
-rw-r--r--searchcore/src/vespa/searchcore/proton/common/document_type_inspector.cpp4
-rw-r--r--searchcore/src/vespa/searchcore/proton/common/eventlogger.cpp54
-rw-r--r--searchcore/src/vespa/searchcore/proton/common/feedtoken.cpp4
-rw-r--r--searchcore/src/vespa/searchcore/proton/common/selectpruner.cpp7
-rw-r--r--searchcore/src/vespa/searchcore/proton/common/state_reporter_utils.cpp4
-rw-r--r--searchcore/src/vespa/searchcore/proton/common/subdbtype.h3
-rwxr-xr-xsearchcore/src/vespa/searchcore/proton/create-class-cpp.sh3
-rw-r--r--searchcore/src/vespa/searchcore/proton/docsummary/fieldcacherepo.cpp4
-rw-r--r--searchcore/src/vespa/searchcore/proton/docsummary/summarycompacttarget.cpp4
-rw-r--r--searchcore/src/vespa/searchcore/proton/docsummary/summaryflushtarget.cpp4
-rw-r--r--searchcore/src/vespa/searchcore/proton/docsummary/summaryflushtarget.h1
-rw-r--r--searchcore/src/vespa/searchcore/proton/documentmetastore/document_meta_store_explorer.cpp4
-rw-r--r--searchcore/src/vespa/searchcore/proton/documentmetastore/document_meta_store_initializer_result.cpp1
-rw-r--r--searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastoreflushtarget.cpp19
-rw-r--r--searchcore/src/vespa/searchcore/proton/documentmetastore/ilidreusedelayer.h10
-rw-r--r--searchcore/src/vespa/searchcore/proton/documentmetastore/lid_gid_key_comparator.cpp8
-rw-r--r--searchcore/src/vespa/searchcore/proton/documentmetastore/lid_reuse_delayer_config.cpp9
-rw-r--r--searchcore/src/vespa/searchcore/proton/documentmetastore/lid_reuse_delayer_config.h7
-rw-r--r--searchcore/src/vespa/searchcore/proton/documentmetastore/lidreusedelayer.cpp14
-rw-r--r--searchcore/src/vespa/searchcore/proton/documentmetastore/lidstatevector.cpp6
-rw-r--r--searchcore/src/vespa/searchcore/proton/feedoperation/compact_lid_space_operation.cpp4
-rw-r--r--searchcore/src/vespa/searchcore/proton/feedoperation/createbucketoperation.cpp4
-rw-r--r--searchcore/src/vespa/searchcore/proton/feedoperation/deletebucketoperation.cpp4
-rw-r--r--searchcore/src/vespa/searchcore/proton/feedoperation/documentoperation.cpp4
-rw-r--r--searchcore/src/vespa/searchcore/proton/feedoperation/feedoperation.cpp3
-rw-r--r--searchcore/src/vespa/searchcore/proton/feedoperation/joinbucketsoperation.cpp4
-rw-r--r--searchcore/src/vespa/searchcore/proton/feedoperation/lidvectorcontext.cpp6
-rw-r--r--searchcore/src/vespa/searchcore/proton/feedoperation/moveoperation.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/feedoperation/newconfigoperation.cpp3
-rw-r--r--searchcore/src/vespa/searchcore/proton/feedoperation/noopoperation.cpp3
-rw-r--r--searchcore/src/vespa/searchcore/proton/feedoperation/pruneremoveddocumentsoperation.cpp6
-rw-r--r--searchcore/src/vespa/searchcore/proton/feedoperation/putoperation.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/feedoperation/removedocumentsoperation.cpp3
-rw-r--r--searchcore/src/vespa/searchcore/proton/feedoperation/removeoperation.cpp3
-rw-r--r--searchcore/src/vespa/searchcore/proton/feedoperation/splitbucketoperation.cpp4
-rw-r--r--searchcore/src/vespa/searchcore/proton/feedoperation/spoolerreplayoperation.cpp4
-rw-r--r--searchcore/src/vespa/searchcore/proton/feedoperation/updateoperation.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/feedoperation/wipehistoryoperation.cpp3
-rw-r--r--searchcore/src/vespa/searchcore/proton/flushengine/cachedflushtarget.cpp3
-rw-r--r--searchcore/src/vespa/searchcore/proton/flushengine/flush_engine_explorer.cpp3
-rw-r--r--searchcore/src/vespa/searchcore/proton/flushengine/flush_target_candidates.cpp3
-rw-r--r--searchcore/src/vespa/searchcore/proton/flushengine/flushcontext.cpp6
-rw-r--r--searchcore/src/vespa/searchcore/proton/flushengine/flushtargetproxy.cpp3
-rw-r--r--searchcore/src/vespa/searchcore/proton/flushengine/flushtask.cpp5
-rw-r--r--searchcore/src/vespa/searchcore/proton/flushengine/prepare_restart_flush_strategy.cpp6
-rw-r--r--searchcore/src/vespa/searchcore/proton/flushengine/shrink_lid_space_flush_target.cpp3
-rw-r--r--searchcore/src/vespa/searchcore/proton/flushengine/threadedflushtarget.cpp5
-rw-r--r--searchcore/src/vespa/searchcore/proton/flushengine/tls_stats.h8
-rw-r--r--searchcore/src/vespa/searchcore/proton/flushengine/tls_stats_factory.cpp1
-rw-r--r--searchcore/src/vespa/searchcore/proton/flushengine/tls_stats_factory.h8
-rw-r--r--searchcore/src/vespa/searchcore/proton/index/diskindexwrapper.cpp3
-rw-r--r--searchcore/src/vespa/searchcore/proton/index/index_manager_initializer.cpp9
-rw-r--r--searchcore/src/vespa/searchcore/proton/index/indexmanager.cpp3
-rw-r--r--searchcore/src/vespa/searchcore/proton/index/memoryindexwrapper.cpp3
-rw-r--r--searchcore/src/vespa/searchcore/proton/initializer/initializer_task.cpp7
-rw-r--r--searchcore/src/vespa/searchcore/proton/matchengine/matchengine.cpp1
-rw-r--r--searchcore/src/vespa/searchcore/proton/persistenceengine/i_document_retriever.cpp3
-rw-r--r--searchcore/src/vespa/searchcore/util/CMakeLists.txt1
-rw-r--r--searchcore/src/vespa/searchcore/util/base64encoder.cpp17
-rw-r--r--searchcore/src/vespa/searchcore/util/base64encoder.h120
-rw-r--r--searchcore/src/vespa/searchcore/util/eventloop.cpp8
-rw-r--r--searchcore/src/vespa/searchcore/util/eventloop.h3
-rw-r--r--searchcore/src/vespa/searchcore/util/log.cpp7
127 files changed, 262 insertions, 925 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/attribute_usage_filter.cpp b/searchcore/src/vespa/searchcore/proton/attribute/attribute_usage_filter.cpp
index 8c334293e63..e33a80824c5 100644
--- a/searchcore/src/vespa/searchcore/proton/attribute/attribute_usage_filter.cpp
+++ b/searchcore/src/vespa/searchcore/proton/attribute/attribute_usage_filter.cpp
@@ -1,13 +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 "attribute_usage_filter.h"
#include <sstream>
namespace proton {
-namespace
-{
+namespace {
void makeAddressSpaceMessage(std::ostream &os,
const AddressSpaceUsageStats &usage)
diff --git a/searchcore/src/vespa/searchcore/proton/attribute/attribute_usage_sampler_context.cpp b/searchcore/src/vespa/searchcore/proton/attribute/attribute_usage_sampler_context.cpp
index c4914580e34..fc5d366f14e 100644
--- a/searchcore/src/vespa/searchcore/proton/attribute/attribute_usage_sampler_context.cpp
+++ b/searchcore/src/vespa/searchcore/proton/attribute/attribute_usage_sampler_context.cpp
@@ -1,6 +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 "attribute_usage_sampler_context.h"
#include "attribute_usage_filter.h"
diff --git a/searchcore/src/vespa/searchcore/proton/attribute/attribute_usage_sampler_functor.cpp b/searchcore/src/vespa/searchcore/proton/attribute/attribute_usage_sampler_functor.cpp
index 1854e243ae3..871a339005b 100644
--- a/searchcore/src/vespa/searchcore/proton/attribute/attribute_usage_sampler_functor.cpp
+++ b/searchcore/src/vespa/searchcore/proton/attribute/attribute_usage_sampler_functor.cpp
@@ -1,6 +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 "attribute_usage_sampler_functor.h"
#include "attribute_usage_sampler_context.h"
#include <vespa/searchlib/attribute/attributevector.h>
diff --git a/searchcore/src/vespa/searchcore/proton/attribute/attribute_usage_sampler_functor.h b/searchcore/src/vespa/searchcore/proton/attribute/attribute_usage_sampler_functor.h
index 61565562232..a435875e3d5 100644
--- a/searchcore/src/vespa/searchcore/proton/attribute/attribute_usage_sampler_functor.h
+++ b/searchcore/src/vespa/searchcore/proton/attribute/attribute_usage_sampler_functor.h
@@ -3,6 +3,7 @@
#pragma once
#include "i_attribute_functor.h"
+#include <memory>
namespace proton {
diff --git a/searchcore/src/vespa/searchcore/proton/attribute/attribute_usage_stats.cpp b/searchcore/src/vespa/searchcore/proton/attribute/attribute_usage_stats.cpp
index aa26b6d81df..17d111db272 100644
--- a/searchcore/src/vespa/searchcore/proton/attribute/attribute_usage_stats.cpp
+++ b/searchcore/src/vespa/searchcore/proton/attribute/attribute_usage_stats.cpp
@@ -1,6 +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 "attribute_usage_stats.h"
namespace proton {
diff --git a/searchcore/src/vespa/searchcore/proton/attribute/attribute_vector_explorer.cpp b/searchcore/src/vespa/searchcore/proton/attribute/attribute_vector_explorer.cpp
index d0e59cdbda5..8e833ac8c67 100644
--- a/searchcore/src/vespa/searchcore/proton/attribute/attribute_vector_explorer.cpp
+++ b/searchcore/src/vespa/searchcore/proton/attribute/attribute_vector_explorer.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_vector_explorer");
-
#include "attribute_vector_explorer.h"
#include <vespa/searchlib/attribute/enumstorebase.h>
#include <vespa/searchlib/attribute/multi_value_mapping.h>
diff --git a/searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.cpp b/searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.cpp
index fa0d6cbd0a5..60cc292cbeb 100644
--- a/searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.cpp
+++ b/searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.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(".proton.server.attributeadapter");
#include "attribute_writer.h"
#include "attributemanager.h"
#include <vespa/searchcore/proton/common/attrupdate.h>
#include <vespa/searchlib/attribute/attributevector.hpp>
-#include <vespa/searchlib/attribute/floatbase.h>
-#include <vespa/searchlib/attribute/integerbase.h>
-#include <vespa/searchlib/attribute/stringbase.h>
#include <vespa/searchlib/common/isequencedtaskexecutor.h>
-#include <vespa/document/fieldvalue/weightedsetfieldvalue.h>
-#include <vespa/document/fieldvalue/arrayfieldvalue.h>
-#include <type_traits>
+
+#include <vespa/log/log.h>
+LOG_SETUP(".proton.server.attributeadapter");
using namespace document;
using namespace search;
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),
diff --git a/searchcore/src/vespa/searchcore/proton/attribute/attributedisklayout.h b/searchcore/src/vespa/searchcore/proton/attribute/attributedisklayout.h
index 3b6a10e9e49..d68909df68f 100644
--- a/searchcore/src/vespa/searchcore/proton/attribute/attributedisklayout.h
+++ b/searchcore/src/vespa/searchcore/proton/attribute/attributedisklayout.h
@@ -37,4 +37,3 @@ public:
};
} // namespace proton
-
diff --git a/searchcore/src/vespa/searchcore/proton/attribute/attributesconfigscout.cpp b/searchcore/src/vespa/searchcore/proton/attribute/attributesconfigscout.cpp
index 5d7a1526bf0..6f958ed9c3e 100644
--- a/searchcore/src/vespa/searchcore/proton/attribute/attributesconfigscout.cpp
+++ b/searchcore/src/vespa/searchcore/proton/attribute/attributesconfigscout.cpp
@@ -1,13 +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 "attributesconfigscout.h"
#include <vespa/searchlib/attribute/configconverter.h>
using search::attribute::ConfigConverter;
-namespace proton
-{
+namespace proton {
AttributesConfigScout::AttributesConfigScout(const AttributesConfig &live)
: _live(live),
diff --git a/searchcore/src/vespa/searchcore/proton/attribute/exclusive_attribute_read_accessor.cpp b/searchcore/src/vespa/searchcore/proton/attribute/exclusive_attribute_read_accessor.cpp
index 930bf709e6c..c716dc12e85 100644
--- a/searchcore/src/vespa/searchcore/proton/attribute/exclusive_attribute_read_accessor.cpp
+++ b/searchcore/src/vespa/searchcore/proton/attribute/exclusive_attribute_read_accessor.cpp
@@ -1,14 +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 <vespa/log/log.h>
-LOG_SETUP(".proton.exclusive_attribute_read_accessor");
-
#include "exclusive_attribute_read_accessor.h"
#include <vespa/searchlib/attribute/attributevector.h>
#include <vespa/searchlib/common/isequencedtaskexecutor.h>
-#include <vespa/vespalib/util/executor.h>
-#include <vespa/vespalib/util/sync.h>
namespace proton {
diff --git a/searchcore/src/vespa/searchcore/proton/attribute/exclusive_attribute_read_accessor.h b/searchcore/src/vespa/searchcore/proton/attribute/exclusive_attribute_read_accessor.h
index 2edecd1ca2a..cae1d1de770 100644
--- a/searchcore/src/vespa/searchcore/proton/attribute/exclusive_attribute_read_accessor.h
+++ b/searchcore/src/vespa/searchcore/proton/attribute/exclusive_attribute_read_accessor.h
@@ -2,9 +2,11 @@
#pragma once
+#include <memory>
+
namespace search {
-class AttributeVector;
-class ISequencedTaskExecutor;
+ class AttributeVector;
+ class ISequencedTaskExecutor;
}
namespace vespalib { class Gate; }
diff --git a/searchcore/src/vespa/searchcore/proton/attribute/imported_attributes_context.cpp b/searchcore/src/vespa/searchcore/proton/attribute/imported_attributes_context.cpp
index 63ae28444d3..34ceaf60c90 100644
--- a/searchcore/src/vespa/searchcore/proton/attribute/imported_attributes_context.cpp
+++ b/searchcore/src/vespa/searchcore/proton/attribute/imported_attributes_context.cpp
@@ -1,5 +1,5 @@
// 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 "imported_attributes_context.h"
#include "imported_attributes_repo.h"
#include <vespa/searchlib/attribute/attributeguard.h>
diff --git a/searchcore/src/vespa/searchcore/proton/attribute/imported_attributes_repo.cpp b/searchcore/src/vespa/searchcore/proton/attribute/imported_attributes_repo.cpp
index d7a87609995..9261840f2b6 100644
--- a/searchcore/src/vespa/searchcore/proton/attribute/imported_attributes_repo.cpp
+++ b/searchcore/src/vespa/searchcore/proton/attribute/imported_attributes_repo.cpp
@@ -1,5 +1,5 @@
// 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 "imported_attributes_repo.h"
#include <vespa/searchlib/attribute/imported_attribute_vector.h>
#include <vespa/vespalib/stllike/hash_map.hpp>
diff --git a/searchcore/src/vespa/searchcore/proton/attribute/sequential_attributes_initializer.cpp b/searchcore/src/vespa/searchcore/proton/attribute/sequential_attributes_initializer.cpp
index 4170a8e8be5..5470ab91008 100644
--- a/searchcore/src/vespa/searchcore/proton/attribute/sequential_attributes_initializer.cpp
+++ b/searchcore/src/vespa/searchcore/proton/attribute/sequential_attributes_initializer.cpp
@@ -1,8 +1,6 @@
// 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 "sequential_attributes_initializer.h"
-#include "attributemanager.h"
using search::AttributeVector;
using search::SerialNum;
diff --git a/searchcore/src/vespa/searchcore/proton/bucketdb/bucket_db_explorer.cpp b/searchcore/src/vespa/searchcore/proton/bucketdb/bucket_db_explorer.cpp
index 5236ebed261..569c49f0564 100644
--- a/searchcore/src/vespa/searchcore/proton/bucketdb/bucket_db_explorer.cpp
+++ b/searchcore/src/vespa/searchcore/proton/bucketdb/bucket_db_explorer.cpp
@@ -1,6 +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 "bucket_db_explorer.h"
#include <vespa/vespalib/data/slime/cursor.h>
diff --git a/searchcore/src/vespa/searchcore/proton/bucketdb/bucket_db_owner.cpp b/searchcore/src/vespa/searchcore/proton/bucketdb/bucket_db_owner.cpp
index 4e417d91eac..056eced6bb4 100644
--- a/searchcore/src/vespa/searchcore/proton/bucketdb/bucket_db_owner.cpp
+++ b/searchcore/src/vespa/searchcore/proton/bucketdb/bucket_db_owner.cpp
@@ -1,6 +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 "bucket_db_owner.h"
namespace proton {
diff --git a/searchcore/src/vespa/searchcore/proton/bucketdb/bucket_db_owner.h b/searchcore/src/vespa/searchcore/proton/bucketdb/bucket_db_owner.h
index 4b26b1eaba1..c534cb5ae10 100644
--- a/searchcore/src/vespa/searchcore/proton/bucketdb/bucket_db_owner.h
+++ b/searchcore/src/vespa/searchcore/proton/bucketdb/bucket_db_owner.h
@@ -2,8 +2,8 @@
#pragma once
-#include <mutex>
#include "bucketdb.h"
+#include <mutex>
namespace proton {
diff --git a/searchcore/src/vespa/searchcore/proton/bucketdb/bucketdb.cpp b/searchcore/src/vespa/searchcore/proton/bucketdb/bucketdb.cpp
index d998d019c5e..7b5fabb1c74 100644
--- a/searchcore/src/vespa/searchcore/proton/bucketdb/bucketdb.cpp
+++ b/searchcore/src/vespa/searchcore/proton/bucketdb/bucketdb.cpp
@@ -1,16 +1,12 @@
// 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.documentmetastore.bucketdb");
#include "bucketdb.h"
+#include <cassert>
using document::GlobalId;
using storage::spi::BucketChecksum;
-namespace proton
-{
-
+namespace proton {
BucketDB::BucketDB()
: _map(),
@@ -19,14 +15,12 @@ BucketDB::BucketDB()
{
}
-
BucketDB::~BucketDB()
{
checkEmpty();
clear();
}
-
bucketdb::BucketState *
BucketDB::getBucketStatePtr(const BucketId &bucket)
{
@@ -37,7 +31,6 @@ BucketDB::getBucketStatePtr(const BucketId &bucket)
return nullptr;
}
-
void
BucketDB::unloadBucket(const BucketId &bucket, const BucketState &delta)
{
@@ -46,7 +39,6 @@ BucketDB::unloadBucket(const BucketId &bucket, const BucketState &delta)
*state -= delta;
}
-
const bucketdb::BucketState &
BucketDB::add(const GlobalId &gid,
const BucketId &bucketId,
@@ -70,7 +62,6 @@ BucketDB::remove(const GlobalId &gid,
state.remove(gid, timestamp, docSize, subDbType);
}
-
void
BucketDB::modify(const GlobalId &gid,
const BucketId &oldBucketId,
@@ -172,7 +163,6 @@ BucketDB::clear()
_map.clear();
}
-
void
BucketDB::checkEmpty() const
{
@@ -213,7 +203,6 @@ BucketDB::deleteEmptyBucket(const BucketId &bucketId)
}
}
-
void
BucketDB::getActiveBuckets(BucketId::List &buckets) const
{
@@ -224,7 +213,6 @@ BucketDB::getActiveBuckets(BucketId::List &buckets) const
}
}
-
void
BucketDB::populateActiveBuckets(const BucketId::List &buckets,
BucketId::List &fixupBuckets)
@@ -258,5 +246,4 @@ BucketDB::populateActiveBuckets(const BucketId::List &buckets,
}
}
-
}
diff --git a/searchcore/src/vespa/searchcore/proton/bucketdb/bucketdb.h b/searchcore/src/vespa/searchcore/proton/bucketdb/bucketdb.h
index b948cb63caf..a51529eab1f 100644
--- a/searchcore/src/vespa/searchcore/proton/bucketdb/bucketdb.h
+++ b/searchcore/src/vespa/searchcore/proton/bucketdb/bucketdb.h
@@ -2,16 +2,12 @@
#pragma once
-#include <vespa/document/base/globalid.h>
+#include "bucketstate.h"
#include <vespa/document/bucket/bucketid.h>
-#include <vespa/persistence/spi/bucketinfo.h>
-#include <vespa/searchcore/proton/common/subdbtype.h>
#include <vespa/persistence/spi/result.h>
-#include "bucketstate.h"
#include <map>
-namespace proton
-{
+namespace proton {
class BucketDB
{
diff --git a/searchcore/src/vespa/searchcore/proton/bucketdb/bucketdbhandler.cpp b/searchcore/src/vespa/searchcore/proton/bucketdb/bucketdbhandler.cpp
index a36fca85def..2160ce4be78 100644
--- a/searchcore/src/vespa/searchcore/proton/bucketdb/bucketdbhandler.cpp
+++ b/searchcore/src/vespa/searchcore/proton/bucketdb/bucketdbhandler.cpp
@@ -1,20 +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 "bucketdb.h"
-#include "bucketsessionbase.h"
+#include "bucketdbhandler.h"
#include "splitbucketsession.h"
#include "joinbucketssession.h"
-#include <vespa/searchlib/common/serialnum.h>
-#include "bucketdbhandler.h"
#include <vespa/searchcore/proton/documentmetastore/i_document_meta_store.h>
-namespace proton
-{
-
-namespace bucketdb
-{
-
+namespace proton::bucketdb {
BucketDBHandler::BucketDBHandler(BucketDBOwner &bucketDB)
: _bucketDB(bucketDB),
@@ -22,7 +13,6 @@ BucketDBHandler::BucketDBHandler(BucketDBOwner &bucketDB)
{
}
-
void
BucketDBHandler::addDocumentMetaStore(IDocumentMetaStore *dms,
search::SerialNum flushedSerialNum)
@@ -30,7 +20,6 @@ BucketDBHandler::addDocumentMetaStore(IDocumentMetaStore *dms,
_dmsv.push_back(MetaStoreDesc(dms, flushedSerialNum));
}
-
void
BucketDBHandler::handleSplit(search::SerialNum serialNum,
const BucketId &source,
@@ -87,21 +76,17 @@ BucketDBHandler::handleJoin(search::SerialNum serialNum,
session.finish();
}
-
void
BucketDBHandler::handleCreateBucket(const BucketId &bucketId)
{
_bucketDB.takeGuard()->createBucket(bucketId);
}
-
void
BucketDBHandler::handleDeleteBucket(const BucketId &bucketId)
{
_bucketDB.takeGuard()->deleteEmptyBucket(bucketId);
}
-
}
-}
diff --git a/searchcore/src/vespa/searchcore/proton/bucketdb/bucketdbhandler.h b/searchcore/src/vespa/searchcore/proton/bucketdb/bucketdbhandler.h
index 464cb2e69a1..7d855abbaae 100644
--- a/searchcore/src/vespa/searchcore/proton/bucketdb/bucketdbhandler.h
+++ b/searchcore/src/vespa/searchcore/proton/bucketdb/bucketdbhandler.h
@@ -6,11 +6,7 @@
#include "ibucketdbhandler.h"
#include "ibucketdbhandlerinitializer.h"
-namespace proton
-{
-
-namespace bucketdb
-{
+namespace proton::bucketdb {
/**
* The BucketDBHandler class handles operations on a bucket db.
@@ -65,5 +61,3 @@ public:
};
}
-
-}
diff --git a/searchcore/src/vespa/searchcore/proton/bucketdb/bucketdeltapair.h b/searchcore/src/vespa/searchcore/proton/bucketdb/bucketdeltapair.h
index f0db5e17867..fdc77f6b2a7 100644
--- a/searchcore/src/vespa/searchcore/proton/bucketdb/bucketdeltapair.h
+++ b/searchcore/src/vespa/searchcore/proton/bucketdb/bucketdeltapair.h
@@ -2,11 +2,9 @@
#pragma once
-namespace proton
-{
+#include "bucketstate.h"
-namespace bucketdb
-{
+namespace proton::bucketdb {
/**
* Class BucketDeltaPair represent the deltas to bucket states caused by
@@ -26,5 +24,3 @@ public:
};
}
-
-}
diff --git a/searchcore/src/vespa/searchcore/proton/bucketdb/bucketsessionbase.cpp b/searchcore/src/vespa/searchcore/proton/bucketdb/bucketsessionbase.cpp
index 4173cc28f5d..b72fe8e9934 100644
--- a/searchcore/src/vespa/searchcore/proton/bucketdb/bucketsessionbase.cpp
+++ b/searchcore/src/vespa/searchcore/proton/bucketdb/bucketsessionbase.cpp
@@ -1,14 +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 "bucketdb.h"
#include "bucketsessionbase.h"
-namespace proton
-{
-
-namespace bucketdb
-{
+namespace proton::bucketdb {
BucketSessionBase::BucketSessionBase(BucketDBOwner &bucketDB)
: _bucketDB(bucketDB.takeGuard())
@@ -39,7 +33,4 @@ BucketSessionBase::calcFixupNeed(BucketState *state, bool wantActive,
return false;
}
-
-}
-
}
diff --git a/searchcore/src/vespa/searchcore/proton/bucketdb/bucketsessionbase.h b/searchcore/src/vespa/searchcore/proton/bucketdb/bucketsessionbase.h
index 64983ae45bf..5fe335ad59c 100644
--- a/searchcore/src/vespa/searchcore/proton/bucketdb/bucketsessionbase.h
+++ b/searchcore/src/vespa/searchcore/proton/bucketdb/bucketsessionbase.h
@@ -4,11 +4,7 @@
#include "bucket_db_owner.h"
-namespace proton
-{
-
-namespace bucketdb
-{
+namespace proton::bucketdb {
/**
* Base class for split/join handling utility classes that bundles temporary
@@ -27,14 +23,9 @@ protected:
public:
BucketSessionBase(BucketDBOwner &bucketDB);
- bool
- extractInfo(const BucketId &bucket, BucketState *&info);
+ bool extractInfo(const BucketId &bucket, BucketState *&info);
- static bool
- calcFixupNeed(BucketState *state, bool wantActive, bool fixup);
+ static bool calcFixupNeed(BucketState *state, bool wantActive, bool fixup);
};
-
-}
-
}
diff --git a/searchcore/src/vespa/searchcore/proton/bucketdb/bucketstate.cpp b/searchcore/src/vespa/searchcore/proton/bucketdb/bucketstate.cpp
index afaf9700e3f..45d1b2957e3 100644
--- a/searchcore/src/vespa/searchcore/proton/bucketdb/bucketstate.cpp
+++ b/searchcore/src/vespa/searchcore/proton/bucketdb/bucketstate.cpp
@@ -1,17 +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 "bucketstate.h"
+#include <cassert>
-#include "bucketdb.h"
+namespace proton::bucketdb {
-namespace proton
-{
-
-namespace bucketdb
-{
-
-namespace
-{
+namespace {
uint32_t
gidChecksum(const document::GlobalId &gid)
@@ -181,7 +175,5 @@ BucketState::operator storage::spi::BucketInfo() const
_active ? BucketInfo::ACTIVE : BucketInfo::NOT_ACTIVE);
}
-
}
-}
diff --git a/searchcore/src/vespa/searchcore/proton/bucketdb/bucketstate.h b/searchcore/src/vespa/searchcore/proton/bucketdb/bucketstate.h
index b2b4760cb8b..50f862e1e41 100644
--- a/searchcore/src/vespa/searchcore/proton/bucketdb/bucketstate.h
+++ b/searchcore/src/vespa/searchcore/proton/bucketdb/bucketstate.h
@@ -2,11 +2,11 @@
#pragma once
-namespace proton
-{
+#include <vespa/searchcore/proton/common/subdbtype.h>
+#include <vespa/document/base/globalid.h>
+#include <vespa/persistence/spi/bucketinfo.h>
-namespace bucketdb
-{
+namespace proton::bucketdb {
/**
* Class BucketState represent the known state of a bucket in raw form.
@@ -34,85 +34,33 @@ public:
static uint32_t calcChecksum(const GlobalId &gid, const Timestamp &timestamp);
- void
- add(const GlobalId &gid, const Timestamp &timestamp, uint32_t docSize, SubDbType subDbType);
-
- void
- remove(const GlobalId &gid, const Timestamp &timestamp, uint32_t docSize, SubDbType subDbType);
+ void add(const GlobalId &gid, const Timestamp &timestamp, uint32_t docSize, SubDbType subDbType);
+ void remove(const GlobalId &gid, const Timestamp &timestamp, uint32_t docSize, SubDbType subDbType);
- void
- modify(const Timestamp &oldTimestamp, uint32_t oldDocSize,
- const Timestamp &newTimestamp, uint32_t newDocSize,
- SubDbType subDbType);
+ void modify(const Timestamp &oldTimestamp, uint32_t oldDocSize,
+ const Timestamp &newTimestamp, uint32_t newDocSize,
+ SubDbType subDbType);
- bool
- isActive() const
- {
- return _active;
- }
-
- BucketState &
- setActive(bool active)
- {
+ BucketState &setActive(bool active) {
_active = active;
return *this;
}
- uint32_t
- getReadyCount() const
- {
- return _docCount[READY];
- }
-
- uint32_t
- getRemovedCount() const
- {
- return _docCount[REMOVED];
- }
-
- uint32_t
- getNotReadyCount() const
- {
- return _docCount[NOTREADY];
- }
-
+ bool isActive() const { return _active; }
+ uint32_t getReadyCount() const { return _docCount[READY]; }
+ uint32_t getRemovedCount() const { return _docCount[REMOVED]; }
+ uint32_t getNotReadyCount() const { return _docCount[NOTREADY]; }
size_t getReadyDocSizes() const { return _docSizes[READY]; }
size_t getRemovedDocSizes() const { return _docSizes[REMOVED]; }
size_t getNotReadyDocSizes() const { return _docSizes[NOTREADY]; }
-
- uint32_t
- getDocumentCount() const
- {
- return getReadyCount() + getNotReadyCount();
- }
-
- uint32_t
- getEntryCount() const
- {
- return getDocumentCount() + getRemovedCount();
- }
-
- storage::spi::BucketChecksum
- getChecksum() const
- {
- return storage::spi::BucketChecksum(_checksum);
- }
-
- bool
- empty() const;
-
- BucketState &
- operator+=(const BucketState &rhs);
-
- BucketState &
- operator-=(const BucketState &rhs);
-
- void
- applyDelta(BucketState *src, BucketState *dst) const;
-
+ uint32_t getDocumentCount() const { return getReadyCount() + getNotReadyCount(); }
+ uint32_t getEntryCount() const { return getDocumentCount() + getRemovedCount(); }
+ storage::spi::BucketChecksum getChecksum() const { return storage::spi::BucketChecksum(_checksum); }
+ bool empty() const;
+ BucketState &operator+=(const BucketState &rhs);
+ BucketState &operator-=(const BucketState &rhs);
+ void applyDelta(BucketState *src, BucketState *dst) const;
operator storage::spi::BucketInfo() const;
};
}
-
-}
diff --git a/searchcore/src/vespa/searchcore/proton/bucketdb/joinbucketssession.cpp b/searchcore/src/vespa/searchcore/proton/bucketdb/joinbucketssession.cpp
index ce46df2c450..60024fc63ac 100644
--- a/searchcore/src/vespa/searchcore/proton/bucketdb/joinbucketssession.cpp
+++ b/searchcore/src/vespa/searchcore/proton/bucketdb/joinbucketssession.cpp
@@ -1,16 +1,10 @@
// 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 "bucketdb.h"
-#include "bucketsessionbase.h"
#include "joinbucketssession.h"
#include "bucketdeltapair.h"
+#include <cassert>
-namespace proton
-{
-
-namespace bucketdb
-{
+namespace proton::bucketdb {
JoinBucketsSession::JoinBucketsSession(BucketDBOwner &bucketDB,
const BucketId &source1,
@@ -107,7 +101,5 @@ JoinBucketsSession::finish()
}
}
-
}
-}
diff --git a/searchcore/src/vespa/searchcore/proton/bucketdb/joinbucketssession.h b/searchcore/src/vespa/searchcore/proton/bucketdb/joinbucketssession.h
index f05521a06c0..bdb43130e19 100644
--- a/searchcore/src/vespa/searchcore/proton/bucketdb/joinbucketssession.h
+++ b/searchcore/src/vespa/searchcore/proton/bucketdb/joinbucketssession.h
@@ -2,11 +2,9 @@
#pragma once
-namespace proton
-{
+#include "bucketsessionbase.h"
-namespace bucketdb
-{
+namespace proton::bucketdb {
class BucketDeltaPair;
@@ -82,5 +80,3 @@ public:
};
}
-
-}
diff --git a/searchcore/src/vespa/searchcore/proton/bucketdb/splitbucketsession.cpp b/searchcore/src/vespa/searchcore/proton/bucketdb/splitbucketsession.cpp
index 5cc4d74cf25..389ec594878 100644
--- a/searchcore/src/vespa/searchcore/proton/bucketdb/splitbucketsession.cpp
+++ b/searchcore/src/vespa/searchcore/proton/bucketdb/splitbucketsession.cpp
@@ -1,16 +1,10 @@
// 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 "bucketdb.h"
-#include "bucketsessionbase.h"
#include "splitbucketsession.h"
#include "bucketdeltapair.h"
+#include <cassert>
-namespace proton
-{
-
-namespace bucketdb
-{
+namespace proton::bucketdb {
SplitBucketSession::SplitBucketSession(BucketDBOwner &bucketDB,
@@ -93,7 +87,5 @@ SplitBucketSession::finish()
}
}
-
}
-}
diff --git a/searchcore/src/vespa/searchcore/proton/bucketdb/splitbucketsession.h b/searchcore/src/vespa/searchcore/proton/bucketdb/splitbucketsession.h
index 260a32d7dbd..8260c99547d 100644
--- a/searchcore/src/vespa/searchcore/proton/bucketdb/splitbucketsession.h
+++ b/searchcore/src/vespa/searchcore/proton/bucketdb/splitbucketsession.h
@@ -2,11 +2,9 @@
#pragma once
-namespace proton
-{
+#include "bucketsessionbase.h"
-namespace bucketdb
-{
+namespace proton::bucketdb {
class BucketDeltaPair;
@@ -32,8 +30,7 @@ private:
BucketId _target1;
BucketId _target2;
- void
- applyDelta(const BucketState &delta, BucketState *src, BucketId &dstBucket);
+ void applyDelta(const BucketState &delta, BucketState *src, BucketId &dstBucket);
public:
SplitBucketSession(BucketDBOwner &bucketDB,
@@ -44,62 +41,28 @@ public:
/*
* Reflect move of documents to target1 and target2 in bucket states
*/
- void
- applyDeltas(const BucketDeltaPair &deltas);
-
- bool
- getSourceActive() const
- {
- return _sourceActive;
- }
+ void applyDeltas(const BucketDeltaPair &deltas);
+ bool getSourceActive() const { return _sourceActive; }
/*
* Return true if bitvector for active lids need to be adjusted in
* document meta store due to old documents in target1 and active
* state change.
*/
- bool
- mustFixupTarget1ActiveLids() const
- {
- return _adjustTarget1ActiveLids;
- }
+ bool mustFixupTarget1ActiveLids() const { return _adjustTarget1ActiveLids; }
/*
* Return true if bitvector for active lids need to be adjusted in
* document meta store due to old documents in target2 and active
* state change.
*/
- bool
- mustFixupTarget2ActiveLids() const
- {
- return _adjustTarget2ActiveLids;
- }
-
- void
- setup();
-
- void
- finish();
+ bool mustFixupTarget2ActiveLids() const { return _adjustTarget2ActiveLids; }
- const BucketId &
- getSource() const
- {
- return _source;
- }
-
- const BucketId &
- getTarget1() const
- {
- return _target1;
- }
-
- const BucketId &
- getTarget2() const
- {
- return _target2;
- }
+ void setup();
+ void finish();
+ const BucketId &getSource() const { return _source; }
+ const BucketId &getTarget1() const { return _target1; }
+ const BucketId &getTarget2() const { return _target2; }
};
}
-
-}
diff --git a/searchcore/src/vespa/searchcore/proton/common/attributefieldvaluenode.cpp b/searchcore/src/vespa/searchcore/proton/common/attributefieldvaluenode.cpp
index 73df7d511c9..d15eddb3ac4 100644
--- a/searchcore/src/vespa/searchcore/proton/common/attributefieldvaluenode.cpp
+++ b/searchcore/src/vespa/searchcore/proton/common/attributefieldvaluenode.cpp
@@ -1,15 +1,10 @@
// 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.common.attributefieldvaluenode");
#include "attributefieldvaluenode.h"
#include "selectcontext.h"
-#include <vespa/document/select/value.h>
#include <vespa/searchcommon/attribute/attributecontent.h>
-namespace proton
-{
+namespace proton {
using document::select::Context;
using document::select::FloatValue;
diff --git a/searchcore/src/vespa/searchcore/proton/common/bucketfactory.cpp b/searchcore/src/vespa/searchcore/proton/common/bucketfactory.cpp
index bdf35a09038..f5acc578792 100644
--- a/searchcore/src/vespa/searchcore/proton/common/bucketfactory.cpp
+++ b/searchcore/src/vespa/searchcore/proton/common/bucketfactory.cpp
@@ -1,11 +1,6 @@
// 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.common.bucketfactory");
-
#include "bucketfactory.h"
-#include <persistence/spi/types.h>
using document::BucketId;
using document::DocumentId;
@@ -29,5 +24,4 @@ BucketFactory::getBucket(const DocumentId &docId)
return Bucket(getBucketId(docId), PartitionId(0));
}
-
} // namespace proton
diff --git a/searchcore/src/vespa/searchcore/proton/common/commit_time_tracker.cpp b/searchcore/src/vespa/searchcore/proton/common/commit_time_tracker.cpp
index 6acd99d5285..fa14ed4ce53 100644
--- a/searchcore/src/vespa/searchcore/proton/common/commit_time_tracker.cpp
+++ b/searchcore/src/vespa/searchcore/proton/common/commit_time_tracker.cpp
@@ -1,5 +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 "commit_time_tracker.h"
namespace proton {
@@ -29,8 +29,6 @@ CommitTimeTracker::needCommit() const
return true;
}
-
-
void
CommitTimeTracker::setVisibilityDelay(fastos::TimeStamp visibilityDelay)
{
diff --git a/searchcore/src/vespa/searchcore/proton/common/dbdocumentid.cpp b/searchcore/src/vespa/searchcore/proton/common/dbdocumentid.cpp
index ae9911289db..4cf8eafcf41 100644
--- a/searchcore/src/vespa/searchcore/proton/common/dbdocumentid.cpp
+++ b/searchcore/src/vespa/searchcore/proton/common/dbdocumentid.cpp
@@ -1,7 +1,4 @@
// 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.common.dbdocumentid");
#include "dbdocumentid.h"
diff --git a/searchcore/src/vespa/searchcore/proton/common/document_type_inspector.cpp b/searchcore/src/vespa/searchcore/proton/common/document_type_inspector.cpp
index 0cf2e97fdfb..7e86cae6946 100644
--- a/searchcore/src/vespa/searchcore/proton/common/document_type_inspector.cpp
+++ b/searchcore/src/vespa/searchcore/proton/common/document_type_inspector.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.common.document_type_inspector");
-
#include "document_type_inspector.h"
namespace proton {
diff --git a/searchcore/src/vespa/searchcore/proton/common/eventlogger.cpp b/searchcore/src/vespa/searchcore/proton/common/eventlogger.cpp
index 49938ccf2bf..63ee323d078 100644
--- a/searchcore/src/vespa/searchcore/proton/common/eventlogger.cpp
+++ b/searchcore/src/vespa/searchcore/proton/common/eventlogger.cpp
@@ -1,14 +1,15 @@
// 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.common.eventlogger");
#include "eventlogger.h"
#include <vespa/searchlib/util/logutil.h>
#include <vespa/vespalib/util/stringfmt.h>
+#include <vespa/log/log.h>
+LOG_SETUP(".proton.common.eventlogger");
+
using search::util::LogUtil;
using vespalib::JSONStringer;
+using vespalib::make_string;
namespace {
@@ -16,10 +17,7 @@ using search::SerialNum;
using vespalib::string;
void
-doTransactionLogReplayStart(const string &domainName,
- SerialNum first,
- SerialNum last,
- const string &eventName)
+doTransactionLogReplayStart(const string &domainName, SerialNum first, SerialNum last, const string &eventName)
{
JSONStringer jstr;
jstr.beginObject();
@@ -34,9 +32,7 @@ doTransactionLogReplayStart(const string &domainName,
}
void
-doTransactionLogReplayComplete(const string &domainName,
- int64_t elapsedTimeMs,
- const string &eventName)
+doTransactionLogReplayComplete(const string &domainName, int64_t elapsedTimeMs, const string &eventName)
{
JSONStringer jstr;
jstr.beginObject();
@@ -51,22 +47,14 @@ doTransactionLogReplayComplete(const string &domainName,
namespace proton {
void
-EventLogger::transactionLogReplayStart(const string &domainName,
- SerialNum first,
- SerialNum last)
+EventLogger::transactionLogReplayStart(const string &domainName, SerialNum first, SerialNum last)
{
- doTransactionLogReplayStart(domainName,
- first,
- last,
- "transactionlog.replay.start");
+ doTransactionLogReplayStart(domainName, first, last, "transactionlog.replay.start");
}
void
-EventLogger::transactionLogReplayProgress(const string &domainName,
- float progress,
- SerialNum first,
- SerialNum last,
- SerialNum current)
+EventLogger::transactionLogReplayProgress(const string &domainName, float progress,
+ SerialNum first, SerialNum last, SerialNum current)
{
JSONStringer jstr;
jstr.beginObject();
@@ -85,9 +73,7 @@ EventLogger::transactionLogReplayProgress(const string &domainName,
void
EventLogger::transactionLogReplayComplete(const string &domainName, int64_t elapsedTimeMs)
{
- doTransactionLogReplayComplete(domainName,
- elapsedTimeMs,
- "transactionlog.replay.complete");
+ doTransactionLogReplayComplete(domainName, elapsedTimeMs, "transactionlog.replay.complete");
}
void
@@ -101,12 +87,8 @@ EventLogger::flushInit(const string &name)
}
void
-EventLogger::flushStart(const string &name,
- int64_t beforeMemory,
- int64_t afterMemory,
- int64_t toFreeMemory,
- SerialNum unflushed,
- SerialNum current)
+EventLogger::flushStart(const string &name, int64_t beforeMemory, int64_t afterMemory,
+ int64_t toFreeMemory, SerialNum unflushed, SerialNum current)
{
JSONStringer jstr;
jstr.beginObject();
@@ -127,10 +109,8 @@ EventLogger::flushStart(const string &name,
}
void
-EventLogger::flushComplete(const string &name,
- int64_t elapsedTimeMs,
- const string &outputPath,
- size_t outputPathElems)
+EventLogger::flushComplete(const string &name, int64_t elapsedTimeMs,
+ const string &outputPath, size_t outputPathElems)
{
JSONStringer jstr;
jstr.beginObject();
@@ -283,7 +263,7 @@ loadComponentStart(const vespalib::string &subDbName, const vespalib::string &co
jstr.beginObject();
jstr.appendKey("documentsubdb").appendString(subDbName);
jstr.endObject();
- EV_STATE(vespalib::make_string("load.%s.start", componentName.c_str()).c_str(), jstr.toString().c_str());
+ EV_STATE(make_string("load.%s.start", componentName.c_str()).c_str(), jstr.toString().c_str());
}
void
@@ -294,7 +274,7 @@ loadComponentComplete(const vespalib::string &subDbName, const vespalib::string
jstr.appendKey("documentsubdb").appendString(subDbName);
jstr.appendKey("time.elapsed.ms").appendInt64(elapsedTimeMs);
jstr.endObject();
- EV_STATE(vespalib::make_string("load.%s.complete", componentName.c_str()).c_str(), jstr.toString().c_str());
+ EV_STATE(make_string("load.%s.complete", componentName.c_str()).c_str(), jstr.toString().c_str());
}
}
diff --git a/searchcore/src/vespa/searchcore/proton/common/feedtoken.cpp b/searchcore/src/vespa/searchcore/proton/common/feedtoken.cpp
index e1867776a5e..2e701d20c62 100644
--- a/searchcore/src/vespa/searchcore/proton/common/feedtoken.cpp
+++ b/searchcore/src/vespa/searchcore/proton/common/feedtoken.cpp
@@ -1,13 +1,9 @@
// 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.common.feedtoken");
#include "feedtoken.h"
#include <vespa/vespalib/util/atomic.h>
#include <vespa/searchcore/proton/metrics/feed_metrics.h>
-
namespace proton {
FeedToken::FeedToken(ITransport &transport, mbus::Reply::UP reply) :
diff --git a/searchcore/src/vespa/searchcore/proton/common/selectpruner.cpp b/searchcore/src/vespa/searchcore/proton/common/selectpruner.cpp
index fe6a89b0a40..c166dfbe634 100644
--- a/searchcore/src/vespa/searchcore/proton/common/selectpruner.cpp
+++ b/searchcore/src/vespa/searchcore/proton/common/selectpruner.cpp
@@ -1,7 +1,4 @@
// 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.common.selectpruner");
#include "selectpruner.h"
#include <vespa/document/base/exceptions.h>
@@ -16,7 +13,6 @@ LOG_SETUP(".proton.common.selectpruner");
#include <vespa/document/select/constant.h>
#include <vespa/searchlib/attribute/iattributemanager.h>
-
using document::select::And;
using document::select::Compare;
using document::select::Constant;
@@ -49,8 +45,7 @@ using document::Field;
using document::FieldNotFoundException;
using search::AttributeGuard;
-namespace proton
-{
+namespace proton {
SelectPrunerBase::SelectPrunerBase(const vespalib::string &docType,
const search::IAttributeManager *amgr,
diff --git a/searchcore/src/vespa/searchcore/proton/common/state_reporter_utils.cpp b/searchcore/src/vespa/searchcore/proton/common/state_reporter_utils.cpp
index 01f202fe1f4..a35eec12cbb 100644
--- a/searchcore/src/vespa/searchcore/proton/common/state_reporter_utils.cpp
+++ b/searchcore/src/vespa/searchcore/proton/common/state_reporter_utils.cpp
@@ -1,7 +1,4 @@
// 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.common.state_reporter_utils");
#include "state_reporter_utils.h"
#include <vespa/vespalib/data/slime/cursor.h>
@@ -28,4 +25,3 @@ StateReporterUtils::convertToSlime(const StatusReport &statusReport,
}
} // namespace proton
-
diff --git a/searchcore/src/vespa/searchcore/proton/common/subdbtype.h b/searchcore/src/vespa/searchcore/proton/common/subdbtype.h
index 0864b0a8fe7..b782b46aa6b 100644
--- a/searchcore/src/vespa/searchcore/proton/common/subdbtype.h
+++ b/searchcore/src/vespa/searchcore/proton/common/subdbtype.h
@@ -2,8 +2,7 @@
#pragma once
-namespace proton
-{
+namespace proton {
/**
* Enumeration of the different kinds of sub databases within a
diff --git a/searchcore/src/vespa/searchcore/proton/create-class-cpp.sh b/searchcore/src/vespa/searchcore/proton/create-class-cpp.sh
index 1b0b2440c45..4b2d8284aa7 100755
--- a/searchcore/src/vespa/searchcore/proton/create-class-cpp.sh
+++ b/searchcore/src/vespa/searchcore/proton/create-class-cpp.sh
@@ -5,9 +5,6 @@ dir=`dirname $0`
. "$dir/create-base.sh"
cat <<EOF
-#include <vespa/log/log.h>
-LOG_SETUP(".$name");
-#include <vespa/fastos/fastos.h>
#include "$name.h"
$ns_open
diff --git a/searchcore/src/vespa/searchcore/proton/docsummary/fieldcacherepo.cpp b/searchcore/src/vespa/searchcore/proton/docsummary/fieldcacherepo.cpp
index a38bee61480..d14ab4633c6 100644
--- a/searchcore/src/vespa/searchcore/proton/docsummary/fieldcacherepo.cpp
+++ b/searchcore/src/vespa/searchcore/proton/docsummary/fieldcacherepo.cpp
@@ -1,9 +1,9 @@
// 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 "fieldcacherepo.h"
+
#include <vespa/log/log.h>
LOG_SETUP(".proton.docsummary.fieldcacherepo");
-#include "fieldcacherepo.h"
using namespace document;
using namespace search::docsummary;
diff --git a/searchcore/src/vespa/searchcore/proton/docsummary/summarycompacttarget.cpp b/searchcore/src/vespa/searchcore/proton/docsummary/summarycompacttarget.cpp
index 0c332edba6a..59108a92727 100644
--- a/searchcore/src/vespa/searchcore/proton/docsummary/summarycompacttarget.cpp
+++ b/searchcore/src/vespa/searchcore/proton/docsummary/summarycompacttarget.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.
-#include <vespa/fastos/fastos.h>
-#include <vespa/log/log.h>
-LOG_SETUP(".proton.docsummary.summarycompacttarget");
#include "summarycompacttarget.h"
-#include <vespa/searchlib/util/dirtraverse.h>
using search::IDocumentStore;
using search::SerialNum;
diff --git a/searchcore/src/vespa/searchcore/proton/docsummary/summaryflushtarget.cpp b/searchcore/src/vespa/searchcore/proton/docsummary/summaryflushtarget.cpp
index 319750b9473..f4587ef7287 100644
--- a/searchcore/src/vespa/searchcore/proton/docsummary/summaryflushtarget.cpp
+++ b/searchcore/src/vespa/searchcore/proton/docsummary/summaryflushtarget.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.
-#include <vespa/fastos/fastos.h>
-#include <vespa/log/log.h>
-LOG_SETUP(".proton.docsummary.summaryflushtarget");
#include "summaryflushtarget.h"
-#include <vespa/searchlib/util/dirtraverse.h>
using search::IDocumentStore;
using search::SerialNum;
diff --git a/searchcore/src/vespa/searchcore/proton/docsummary/summaryflushtarget.h b/searchcore/src/vespa/searchcore/proton/docsummary/summaryflushtarget.h
index 38fb0df3d52..238428e3084 100644
--- a/searchcore/src/vespa/searchcore/proton/docsummary/summaryflushtarget.h
+++ b/searchcore/src/vespa/searchcore/proton/docsummary/summaryflushtarget.h
@@ -6,7 +6,6 @@
namespace proton {
-
/**
* This class implements the IFlushTarget interface to proxy a summary manager.
*/
diff --git a/searchcore/src/vespa/searchcore/proton/documentmetastore/document_meta_store_explorer.cpp b/searchcore/src/vespa/searchcore/proton/documentmetastore/document_meta_store_explorer.cpp
index bcd9302cde6..1d91e1e812a 100644
--- a/searchcore/src/vespa/searchcore/proton/documentmetastore/document_meta_store_explorer.cpp
+++ b/searchcore/src/vespa/searchcore/proton/documentmetastore/document_meta_store_explorer.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.
-#include <vespa/fastos/fastos.h>
-#include <vespa/log/log.h>
-LOG_SETUP(".proton.documentmetastore.document_meta_store_explorer");
#include "document_meta_store_explorer.h"
-
#include <vespa/vespalib/data/slime/cursor.h>
using vespalib::slime::Cursor;
diff --git a/searchcore/src/vespa/searchcore/proton/documentmetastore/document_meta_store_initializer_result.cpp b/searchcore/src/vespa/searchcore/proton/documentmetastore/document_meta_store_initializer_result.cpp
index 20381e51412..5dc3308436d 100644
--- a/searchcore/src/vespa/searchcore/proton/documentmetastore/document_meta_store_initializer_result.cpp
+++ b/searchcore/src/vespa/searchcore/proton/documentmetastore/document_meta_store_initializer_result.cpp
@@ -1,6 +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 "document_meta_store_initializer_result.h"
namespace proton {
diff --git a/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastoreflushtarget.cpp b/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastoreflushtarget.cpp
index 881604491ae..41f038d0e93 100644
--- a/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastoreflushtarget.cpp
+++ b/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastoreflushtarget.cpp
@@ -1,25 +1,22 @@
// 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.documentmetastore.documentmetastoreflushtarget");
-#include <vespa/searchcore/proton/attribute/attributedisklayout.h>
#include "documentmetastoreflushtarget.h"
+#include "documentmetastore.h"
+#include <vespa/searchcore/proton/attribute/attributedisklayout.h>
+#include <vespa/searchcore/proton/server/itlssyncer.h>
+#include <vespa/searchcore/proton/attribute/attribute_directory.h>
#include <vespa/searchlib/attribute/attributefilesavetarget.h>
#include <vespa/searchlib/attribute/attributememorysavetarget.h>
#include <vespa/searchlib/attribute/attributesaver.h>
#include <vespa/searchlib/util/dirtraverse.h>
+#include <vespa/searchlib/common/serialnumfileheadercontext.h>
#include <vespa/searchlib/util/filekit.h>
#include <vespa/vespalib/io/fileutil.h>
-#include <vespa/vespalib/util/stringfmt.h>
#include <vespa/vespalib/util/closuretask.h>
-#include <vespa/searchcore/proton/common/hw_info.h>
#include <fstream>
-#include <vespa/searchlib/common/serialnumfileheadercontext.h>
-#include <vespa/searchcore/proton/server/itlssyncer.h>
-#include <vespa/searchcore/proton/attribute/attributedisklayout.h>
-#include <vespa/searchcore/proton/attribute/attribute_directory.h>
-#include "documentmetastore.h"
+
+#include <vespa/log/log.h>
+LOG_SETUP(".proton.documentmetastore.documentmetastoreflushtarget");
using namespace search;
using namespace vespalib;
diff --git a/searchcore/src/vespa/searchcore/proton/documentmetastore/ilidreusedelayer.h b/searchcore/src/vespa/searchcore/proton/documentmetastore/ilidreusedelayer.h
index 598744978da..307eb43ab12 100644
--- a/searchcore/src/vespa/searchcore/proton/documentmetastore/ilidreusedelayer.h
+++ b/searchcore/src/vespa/searchcore/proton/documentmetastore/ilidreusedelayer.h
@@ -2,11 +2,9 @@
#pragma once
-namespace proton
-{
-
-namespace documentmetastore
-{
+#include <cstdint>
+#include <vector>
+namespace proton::documentmetastore {
/**
* Interface used to delay reuse of lids until references to the lids have
@@ -39,5 +37,3 @@ public:
};
}
-
-}
diff --git a/searchcore/src/vespa/searchcore/proton/documentmetastore/lid_gid_key_comparator.cpp b/searchcore/src/vespa/searchcore/proton/documentmetastore/lid_gid_key_comparator.cpp
index 55f8f3f7cbe..642fc1b1154 100644
--- a/searchcore/src/vespa/searchcore/proton/documentmetastore/lid_gid_key_comparator.cpp
+++ b/searchcore/src/vespa/searchcore/proton/documentmetastore/lid_gid_key_comparator.cpp
@@ -1,13 +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 <vespa/log/log.h>
-LOG_SETUP(".proton.documentmetastore.lid_gid_key_comparator");
-
#include "lid_gid_key_comparator.h"
-namespace proton {
-namespace documentmetastore {
+namespace proton::documentmetastore {
const search::IDocumentMetaStore::DocId
LidGidKeyComparator::FIND_DOC_ID = std::numeric_limits<DocId>::max();
@@ -31,4 +26,3 @@ LidGidKeyComparator::LidGidKeyComparator(const RawDocumentMetaData &metaData,
}
}
-}
diff --git a/searchcore/src/vespa/searchcore/proton/documentmetastore/lid_reuse_delayer_config.cpp b/searchcore/src/vespa/searchcore/proton/documentmetastore/lid_reuse_delayer_config.cpp
index 84c579ba4e6..7a618d34250 100644
--- a/searchcore/src/vespa/searchcore/proton/documentmetastore/lid_reuse_delayer_config.cpp
+++ b/searchcore/src/vespa/searchcore/proton/documentmetastore/lid_reuse_delayer_config.cpp
@@ -1,15 +1,9 @@
// 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 "lid_reuse_delayer_config.h"
#include <vespa/searchcore/proton/server/documentdbconfig.h>
-namespace proton
-{
-
-namespace documentmetastore
-{
-
+namespace proton::documentmetastore {
LidReuseDelayerConfig::LidReuseDelayerConfig()
: _visibilityDelay(0),
@@ -29,4 +23,3 @@ LidReuseDelayerConfig::LidReuseDelayerConfig(const DocumentDBConfig &
} // namespace proton::documentmetastore
-} // namespace proton
diff --git a/searchcore/src/vespa/searchcore/proton/documentmetastore/lid_reuse_delayer_config.h b/searchcore/src/vespa/searchcore/proton/documentmetastore/lid_reuse_delayer_config.h
index 18d2f55541c..975b5c268e9 100644
--- a/searchcore/src/vespa/searchcore/proton/documentmetastore/lid_reuse_delayer_config.h
+++ b/searchcore/src/vespa/searchcore/proton/documentmetastore/lid_reuse_delayer_config.h
@@ -2,13 +2,12 @@
#pragma once
-namespace proton
-{
+#include <vespa/fastos/timestamp.h>
+namespace proton {
class DocumentDBConfig;
-namespace documentmetastore
-{
+namespace documentmetastore {
/*
* Class representing configuration for lid reuse delayer.
diff --git a/searchcore/src/vespa/searchcore/proton/documentmetastore/lidreusedelayer.cpp b/searchcore/src/vespa/searchcore/proton/documentmetastore/lidreusedelayer.cpp
index 02dcdc2fb03..06578107ee6 100644
--- a/searchcore/src/vespa/searchcore/proton/documentmetastore/lidreusedelayer.cpp
+++ b/searchcore/src/vespa/searchcore/proton/documentmetastore/lidreusedelayer.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.
-#include <vespa/fastos/fastos.h>
-#include <vespa/log/log.h>
-LOG_SETUP(".proton.documentmetastore.lidreusedelayer");
+#include "lidreusedelayer.h"
+#include "i_store.h"
#include <vespa/searchcorespi/index/ithreadingservice.h>
#include <vespa/vespalib/util/closuretask.h>
-#include "i_store.h"
-#include "lidreusedelayer.h"
-namespace proton
-{
-
-namespace documentmetastore
-{
+namespace proton::documentmetastore {
using searchcorespi::index::IThreadingService;
using vespalib::makeClosure;
@@ -106,4 +99,3 @@ LidReuseDelayer::getReuseLids()
}
-}
diff --git a/searchcore/src/vespa/searchcore/proton/documentmetastore/lidstatevector.cpp b/searchcore/src/vespa/searchcore/proton/documentmetastore/lidstatevector.cpp
index 7dc46504d18..8b7a677accd 100644
--- a/searchcore/src/vespa/searchcore/proton/documentmetastore/lidstatevector.cpp
+++ b/searchcore/src/vespa/searchcore/proton/documentmetastore/lidstatevector.cpp
@@ -1,12 +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 <vespa/log/log.h>
-LOG_SETUP(".proton.documentmetastore.lidstatevector");
#include "lidstatevector.h"
-namespace proton
-{
+namespace proton {
using vespalib::GenerationHolder;
diff --git a/searchcore/src/vespa/searchcore/proton/feedoperation/compact_lid_space_operation.cpp b/searchcore/src/vespa/searchcore/proton/feedoperation/compact_lid_space_operation.cpp
index 047813d8a05..e4211fe14cc 100644
--- a/searchcore/src/vespa/searchcore/proton/feedoperation/compact_lid_space_operation.cpp
+++ b/searchcore/src/vespa/searchcore/proton/feedoperation/compact_lid_space_operation.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.feedoperation.compact_lid_space_operation");
-
#include "compact_lid_space_operation.h"
#include <vespa/vespalib/util/stringfmt.h>
diff --git a/searchcore/src/vespa/searchcore/proton/feedoperation/createbucketoperation.cpp b/searchcore/src/vespa/searchcore/proton/feedoperation/createbucketoperation.cpp
index d761677542e..cb696c97bac 100644
--- a/searchcore/src/vespa/searchcore/proton/feedoperation/createbucketoperation.cpp
+++ b/searchcore/src/vespa/searchcore/proton/feedoperation/createbucketoperation.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 <vespa/log/log.h>
-LOG_SETUP(".proton.feedoperation.createbucketoperation");
#include "createbucketoperation.h"
#include <vespa/vespalib/util/stringfmt.h>
+#include <cassert>
using document::BucketId;
using document::DocumentTypeRepo;
diff --git a/searchcore/src/vespa/searchcore/proton/feedoperation/deletebucketoperation.cpp b/searchcore/src/vespa/searchcore/proton/feedoperation/deletebucketoperation.cpp
index 964f2e44702..5fa5132d41d 100644
--- a/searchcore/src/vespa/searchcore/proton/feedoperation/deletebucketoperation.cpp
+++ b/searchcore/src/vespa/searchcore/proton/feedoperation/deletebucketoperation.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 <vespa/log/log.h>
-LOG_SETUP(".proton.feedoperation.deletebucketoperation");
#include "deletebucketoperation.h"
#include <vespa/vespalib/util/stringfmt.h>
+#include <cassert>
using document::BucketId;
using document::DocumentTypeRepo;
diff --git a/searchcore/src/vespa/searchcore/proton/feedoperation/documentoperation.cpp b/searchcore/src/vespa/searchcore/proton/feedoperation/documentoperation.cpp
index f4ff9255547..b9df5160f14 100644
--- a/searchcore/src/vespa/searchcore/proton/feedoperation/documentoperation.cpp
+++ b/searchcore/src/vespa/searchcore/proton/feedoperation/documentoperation.cpp
@@ -1,8 +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 "documentoperation.h"
-#include <vespa/vespalib/util/stringfmt.h>
#include <vespa/document/base/documentid.h>
+#include <cassert>
using document::BucketId;
using document::DocumentId;
diff --git a/searchcore/src/vespa/searchcore/proton/feedoperation/feedoperation.cpp b/searchcore/src/vespa/searchcore/proton/feedoperation/feedoperation.cpp
index 789d3ec97ee..cee360323af 100644
--- a/searchcore/src/vespa/searchcore/proton/feedoperation/feedoperation.cpp
+++ b/searchcore/src/vespa/searchcore/proton/feedoperation/feedoperation.cpp
@@ -1,7 +1,4 @@
// 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.feedoperation.feedoperation");
#include "feedoperation.h"
diff --git a/searchcore/src/vespa/searchcore/proton/feedoperation/joinbucketsoperation.cpp b/searchcore/src/vespa/searchcore/proton/feedoperation/joinbucketsoperation.cpp
index afd96720baf..8e51c4e5e94 100644
--- a/searchcore/src/vespa/searchcore/proton/feedoperation/joinbucketsoperation.cpp
+++ b/searchcore/src/vespa/searchcore/proton/feedoperation/joinbucketsoperation.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 <vespa/log/log.h>
-LOG_SETUP(".proton.feedoperation.joinbucketsoperation");
#include "joinbucketsoperation.h"
#include <vespa/vespalib/util/stringfmt.h>
+#include <cassert>
using document::BucketId;
using document::DocumentTypeRepo;
diff --git a/searchcore/src/vespa/searchcore/proton/feedoperation/lidvectorcontext.cpp b/searchcore/src/vespa/searchcore/proton/feedoperation/lidvectorcontext.cpp
index 387b41bc010..b8b32f31105 100644
--- a/searchcore/src/vespa/searchcore/proton/feedoperation/lidvectorcontext.cpp
+++ b/searchcore/src/vespa/searchcore/proton/feedoperation/lidvectorcontext.cpp
@@ -1,11 +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.feedoperation.lidvectorcontext");
#include "lidvectorcontext.h"
#include <vespa/searchlib/common/bitvector.h>
+#include <vespa/log/log.h>
+LOG_SETUP(".proton.feedoperation.lidvectorcontext");
+
using search::BitVector;
namespace proton {
diff --git a/searchcore/src/vespa/searchcore/proton/feedoperation/moveoperation.cpp b/searchcore/src/vespa/searchcore/proton/feedoperation/moveoperation.cpp
index 59c8b2dda33..2a369cb821b 100644
--- a/searchcore/src/vespa/searchcore/proton/feedoperation/moveoperation.cpp
+++ b/searchcore/src/vespa/searchcore/proton/feedoperation/moveoperation.cpp
@@ -1,5 +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 "moveoperation.h"
#include <vespa/vespalib/util/stringfmt.h>
#include <vespa/document/fieldvalue/document.h>
diff --git a/searchcore/src/vespa/searchcore/proton/feedoperation/newconfigoperation.cpp b/searchcore/src/vespa/searchcore/proton/feedoperation/newconfigoperation.cpp
index 2044fdea43f..33e25786651 100644
--- a/searchcore/src/vespa/searchcore/proton/feedoperation/newconfigoperation.cpp
+++ b/searchcore/src/vespa/searchcore/proton/feedoperation/newconfigoperation.cpp
@@ -1,7 +1,4 @@
// 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.feedoperation.newconfigoperation");
#include "newconfigoperation.h"
#include <vespa/vespalib/util/stringfmt.h>
diff --git a/searchcore/src/vespa/searchcore/proton/feedoperation/noopoperation.cpp b/searchcore/src/vespa/searchcore/proton/feedoperation/noopoperation.cpp
index 0ea7977f2bc..1330fd6eda9 100644
--- a/searchcore/src/vespa/searchcore/proton/feedoperation/noopoperation.cpp
+++ b/searchcore/src/vespa/searchcore/proton/feedoperation/noopoperation.cpp
@@ -1,7 +1,4 @@
// 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.feedoperation.noopoperation");
#include "noopoperation.h"
#include <vespa/vespalib/util/stringfmt.h>
diff --git a/searchcore/src/vespa/searchcore/proton/feedoperation/pruneremoveddocumentsoperation.cpp b/searchcore/src/vespa/searchcore/proton/feedoperation/pruneremoveddocumentsoperation.cpp
index b257fb14d57..aa56daddeb2 100644
--- a/searchcore/src/vespa/searchcore/proton/feedoperation/pruneremoveddocumentsoperation.cpp
+++ b/searchcore/src/vespa/searchcore/proton/feedoperation/pruneremoveddocumentsoperation.cpp
@@ -1,11 +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.feedoperation.pruneremoveddocumentsoperation");
#include "pruneremoveddocumentsoperation.h"
#include <vespa/vespalib/util/stringfmt.h>
+#include <vespa/log/log.h>
+LOG_SETUP(".proton.feedoperation.pruneremoveddocumentsoperation");
+
using document::DocumentTypeRepo;
using search::DocumentIdT;
using storage::spi::Timestamp;
diff --git a/searchcore/src/vespa/searchcore/proton/feedoperation/putoperation.cpp b/searchcore/src/vespa/searchcore/proton/feedoperation/putoperation.cpp
index 701efc368ad..41fd2b1482b 100644
--- a/searchcore/src/vespa/searchcore/proton/feedoperation/putoperation.cpp
+++ b/searchcore/src/vespa/searchcore/proton/feedoperation/putoperation.cpp
@@ -1,5 +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 "putoperation.h"
#include <vespa/document/fieldvalue/document.h>
diff --git a/searchcore/src/vespa/searchcore/proton/feedoperation/removedocumentsoperation.cpp b/searchcore/src/vespa/searchcore/proton/feedoperation/removedocumentsoperation.cpp
index 247a8dfc803..e11677db6fe 100644
--- a/searchcore/src/vespa/searchcore/proton/feedoperation/removedocumentsoperation.cpp
+++ b/searchcore/src/vespa/searchcore/proton/feedoperation/removedocumentsoperation.cpp
@@ -1,7 +1,4 @@
// 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.feedoperation.removedocumentsoperation");
#include "removedocumentsoperation.h"
diff --git a/searchcore/src/vespa/searchcore/proton/feedoperation/removeoperation.cpp b/searchcore/src/vespa/searchcore/proton/feedoperation/removeoperation.cpp
index 58d802716b0..446362dbbab 100644
--- a/searchcore/src/vespa/searchcore/proton/feedoperation/removeoperation.cpp
+++ b/searchcore/src/vespa/searchcore/proton/feedoperation/removeoperation.cpp
@@ -1,7 +1,4 @@
// 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.feedoperation.removeoperation");
#include "removeoperation.h"
diff --git a/searchcore/src/vespa/searchcore/proton/feedoperation/splitbucketoperation.cpp b/searchcore/src/vespa/searchcore/proton/feedoperation/splitbucketoperation.cpp
index 3fbf0e93fdf..a188ae866e6 100644
--- a/searchcore/src/vespa/searchcore/proton/feedoperation/splitbucketoperation.cpp
+++ b/searchcore/src/vespa/searchcore/proton/feedoperation/splitbucketoperation.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 <vespa/log/log.h>
-LOG_SETUP(".proton.feedoperation.splitbucketoperation");
#include "splitbucketoperation.h"
#include <vespa/vespalib/util/stringfmt.h>
+#include <cassert>
using document::BucketId;
using document::DocumentTypeRepo;
diff --git a/searchcore/src/vespa/searchcore/proton/feedoperation/spoolerreplayoperation.cpp b/searchcore/src/vespa/searchcore/proton/feedoperation/spoolerreplayoperation.cpp
index 9413e5c0dbc..10de16cadfd 100644
--- a/searchcore/src/vespa/searchcore/proton/feedoperation/spoolerreplayoperation.cpp
+++ b/searchcore/src/vespa/searchcore/proton/feedoperation/spoolerreplayoperation.cpp
@@ -1,7 +1,4 @@
// 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.feedoperation.spoolerreplayoperation");
#include "spoolerreplayoperation.h"
#include <vespa/vespalib/util/stringfmt.h>
@@ -31,7 +28,6 @@ SpoolerReplayOperation::SpoolerReplayOperation(Type type,
void
SpoolerReplayOperation::serialize(vespalib::nbostream &os) const
{
- LOG(debug, "serialize(): %s", toString().c_str());
os << _spoolerSerialNum;
}
diff --git a/searchcore/src/vespa/searchcore/proton/feedoperation/updateoperation.cpp b/searchcore/src/vespa/searchcore/proton/feedoperation/updateoperation.cpp
index e69b64548bc..c5225ca8f20 100644
--- a/searchcore/src/vespa/searchcore/proton/feedoperation/updateoperation.cpp
+++ b/searchcore/src/vespa/searchcore/proton/feedoperation/updateoperation.cpp
@@ -1,8 +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 "updateoperation.h"
#include <vespa/vespalib/util/stringfmt.h>
#include <vespa/document/base/exceptions.h>
+
#include <vespa/log/log.h>
LOG_SETUP(".proton.feedoperation.updateoperation");
diff --git a/searchcore/src/vespa/searchcore/proton/feedoperation/wipehistoryoperation.cpp b/searchcore/src/vespa/searchcore/proton/feedoperation/wipehistoryoperation.cpp
index 5e4f2046481..8e0dd06cb1b 100644
--- a/searchcore/src/vespa/searchcore/proton/feedoperation/wipehistoryoperation.cpp
+++ b/searchcore/src/vespa/searchcore/proton/feedoperation/wipehistoryoperation.cpp
@@ -1,7 +1,4 @@
// 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.feedoperation.wipehistoryoperation");
#include "wipehistoryoperation.h"
#include <vespa/vespalib/util/stringfmt.h>
diff --git a/searchcore/src/vespa/searchcore/proton/flushengine/cachedflushtarget.cpp b/searchcore/src/vespa/searchcore/proton/flushengine/cachedflushtarget.cpp
index fe10efb816e..81c8a11426a 100644
--- a/searchcore/src/vespa/searchcore/proton/flushengine/cachedflushtarget.cpp
+++ b/searchcore/src/vespa/searchcore/proton/flushengine/cachedflushtarget.cpp
@@ -1,7 +1,4 @@
// 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.flushengine.cachedflushtarget");
#include "cachedflushtarget.h"
diff --git a/searchcore/src/vespa/searchcore/proton/flushengine/flush_engine_explorer.cpp b/searchcore/src/vespa/searchcore/proton/flushengine/flush_engine_explorer.cpp
index 8216c9b1391..a763be5e111 100644
--- a/searchcore/src/vespa/searchcore/proton/flushengine/flush_engine_explorer.cpp
+++ b/searchcore/src/vespa/searchcore/proton/flushengine/flush_engine_explorer.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.flushengine.flush_engine_explorer");
#include "flush_engine_explorer.h"
#include <vespa/vespalib/data/slime/cursor.h>
diff --git a/searchcore/src/vespa/searchcore/proton/flushengine/flush_target_candidates.cpp b/searchcore/src/vespa/searchcore/proton/flushengine/flush_target_candidates.cpp
index e83b0adc3f5..61f025c8e53 100644
--- a/searchcore/src/vespa/searchcore/proton/flushengine/flush_target_candidates.cpp
+++ b/searchcore/src/vespa/searchcore/proton/flushengine/flush_target_candidates.cpp
@@ -1,7 +1,4 @@
// 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.flushengine.flush_target_candidates");
#include "flush_target_candidates.h"
#include "tls_stats.h"
diff --git a/searchcore/src/vespa/searchcore/proton/flushengine/flushcontext.cpp b/searchcore/src/vespa/searchcore/proton/flushengine/flushcontext.cpp
index 1624bc3b51c..f5ccfc7e0cb 100644
--- a/searchcore/src/vespa/searchcore/proton/flushengine/flushcontext.cpp
+++ b/searchcore/src/vespa/searchcore/proton/flushengine/flushcontext.cpp
@@ -1,10 +1,10 @@
// 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.flushengine.flushcontext");
#include "flushcontext.h"
+#include <vespa/log/log.h>
+LOG_SETUP(".proton.flushengine.flushcontext");
+
namespace proton {
FlushContext::FlushContext(
diff --git a/searchcore/src/vespa/searchcore/proton/flushengine/flushtargetproxy.cpp b/searchcore/src/vespa/searchcore/proton/flushengine/flushtargetproxy.cpp
index 92133c6d656..cc1e6b06190 100644
--- a/searchcore/src/vespa/searchcore/proton/flushengine/flushtargetproxy.cpp
+++ b/searchcore/src/vespa/searchcore/proton/flushengine/flushtargetproxy.cpp
@@ -1,7 +1,4 @@
// 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.flushengine.flushtargetproxy");
#include "flushtargetproxy.h"
diff --git a/searchcore/src/vespa/searchcore/proton/flushengine/flushtask.cpp b/searchcore/src/vespa/searchcore/proton/flushengine/flushtask.cpp
index 8af59d3079f..b04f2ae6407 100644
--- a/searchcore/src/vespa/searchcore/proton/flushengine/flushtask.cpp
+++ b/searchcore/src/vespa/searchcore/proton/flushengine/flushtask.cpp
@@ -1,7 +1,4 @@
// 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.flushengine.flushtask");
#include "flushtask.h"
@@ -14,7 +11,7 @@ FlushTask::FlushTask(uint32_t taskId,
_engine(engine),
_context(ctx)
{
- LOG_ASSERT(_context.get() != NULL);
+ assert(_context.get() != NULL);
}
FlushTask::~FlushTask()
diff --git a/searchcore/src/vespa/searchcore/proton/flushengine/prepare_restart_flush_strategy.cpp b/searchcore/src/vespa/searchcore/proton/flushengine/prepare_restart_flush_strategy.cpp
index 1bf45bd332e..ed029751271 100644
--- a/searchcore/src/vespa/searchcore/proton/flushengine/prepare_restart_flush_strategy.cpp
+++ b/searchcore/src/vespa/searchcore/proton/flushengine/prepare_restart_flush_strategy.cpp
@@ -1,12 +1,12 @@
// 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.flushengine.prepare_restart_flush_strategy");
#include "prepare_restart_flush_strategy.h"
#include "flush_target_candidates.h"
#include "tls_stats_map.h"
+#include <vespa/log/log.h>
+LOG_SETUP(".proton.flushengine.prepare_restart_flush_strategy");
+
namespace proton {
using search::SerialNum;
diff --git a/searchcore/src/vespa/searchcore/proton/flushengine/shrink_lid_space_flush_target.cpp b/searchcore/src/vespa/searchcore/proton/flushengine/shrink_lid_space_flush_target.cpp
index 2137d6f5c79..1341410a39d 100644
--- a/searchcore/src/vespa/searchcore/proton/flushengine/shrink_lid_space_flush_target.cpp
+++ b/searchcore/src/vespa/searchcore/proton/flushengine/shrink_lid_space_flush_target.cpp
@@ -1,7 +1,4 @@
// 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 <vespa/log/log.h>
-LOG_SETUP(".proton.flushengine.shrink_lid_space_flush_target");
#include "shrink_lid_space_flush_target.h"
#include <vespa/searchlib/common/i_compactable_lid_space.h>
diff --git a/searchcore/src/vespa/searchcore/proton/flushengine/threadedflushtarget.cpp b/searchcore/src/vespa/searchcore/proton/flushengine/threadedflushtarget.cpp
index 49d400c95f7..5e2065a599a 100644
--- a/searchcore/src/vespa/searchcore/proton/flushengine/threadedflushtarget.cpp
+++ b/searchcore/src/vespa/searchcore/proton/flushengine/threadedflushtarget.cpp
@@ -1,13 +1,10 @@
// 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.flushengine.threadedflushtarget");
#include "threadedflushtarget.h"
-#include <vespa/vespalib/util/executor.h>
#include <vespa/searchcore/proton/server/igetserialnum.h>
#include <vespa/searchlib/common/lambdatask.h>
#include <future>
+#include <cassert>
using searchcorespi::IFlushTarget;
using searchcorespi::FlushStats;
diff --git a/searchcore/src/vespa/searchcore/proton/flushengine/tls_stats.h b/searchcore/src/vespa/searchcore/proton/flushengine/tls_stats.h
index 07e726d2032..963d805ad2c 100644
--- a/searchcore/src/vespa/searchcore/proton/flushengine/tls_stats.h
+++ b/searchcore/src/vespa/searchcore/proton/flushengine/tls_stats.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.
#pragma once
-namespace proton {
-namespace flushengine {
+#include <cstdint>
+
+namespace proton::flushengine {
/*
* Class representing statistics for a transaction log server domain used to
@@ -37,5 +38,4 @@ public:
uint64_t getLastSerial() const { return _lastSerial; }
};
-} // namespace proton::flushengine
-} // namespace proton
+}
diff --git a/searchcore/src/vespa/searchcore/proton/flushengine/tls_stats_factory.cpp b/searchcore/src/vespa/searchcore/proton/flushengine/tls_stats_factory.cpp
index 6819849e959..06fdc46d71b 100644
--- a/searchcore/src/vespa/searchcore/proton/flushengine/tls_stats_factory.cpp
+++ b/searchcore/src/vespa/searchcore/proton/flushengine/tls_stats_factory.cpp
@@ -1,6 +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 "tls_stats_factory.h"
#include "tls_stats_map.h"
#include <vespa/searchlib/transactionlog/translogserver.h>
diff --git a/searchcore/src/vespa/searchcore/proton/flushengine/tls_stats_factory.h b/searchcore/src/vespa/searchcore/proton/flushengine/tls_stats_factory.h
index d580d58b964..85c20413f42 100644
--- a/searchcore/src/vespa/searchcore/proton/flushengine/tls_stats_factory.h
+++ b/searchcore/src/vespa/searchcore/proton/flushengine/tls_stats_factory.h
@@ -2,10 +2,11 @@
#pragma once
#include "i_tls_stats_factory.h"
+#include <memory>
namespace search { namespace transactionlog { class TransLogServer; } }
-namespace proton {
-namespace flushengine {
+
+namespace proton::flushengine {
/*
* Class used to create statistics for a transaction log server over
@@ -21,5 +22,4 @@ public:
virtual TlsStatsMap create() override;
};
-} // namespace proton::flushengine
-} // namespace proton
+}
diff --git a/searchcore/src/vespa/searchcore/proton/index/diskindexwrapper.cpp b/searchcore/src/vespa/searchcore/proton/index/diskindexwrapper.cpp
index ad78835fa37..e5730b66edb 100644
--- a/searchcore/src/vespa/searchcore/proton/index/diskindexwrapper.cpp
+++ b/searchcore/src/vespa/searchcore/proton/index/diskindexwrapper.cpp
@@ -1,7 +1,4 @@
// 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.index.diskindexwrapper");
#include "diskindexwrapper.h"
#include <vespa/searchcorespi/index/indexreadutilities.h>
diff --git a/searchcore/src/vespa/searchcore/proton/index/index_manager_initializer.cpp b/searchcore/src/vespa/searchcore/proton/index/index_manager_initializer.cpp
index 4f882660855..18578be184b 100644
--- a/searchcore/src/vespa/searchcore/proton/index/index_manager_initializer.cpp
+++ b/searchcore/src/vespa/searchcore/proton/index/index_manager_initializer.cpp
@@ -1,13 +1,12 @@
// 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.index.indexmanagerinitializer");
#include "index_manager_initializer.h"
#include <vespa/vespalib/io/fileutil.h>
-namespace proton
-{
+#include <vespa/log/log.h>
+LOG_SETUP(".proton.index.indexmanagerinitializer");
+
+namespace proton {
IndexManagerInitializer::
IndexManagerInitializer(const vespalib::string &baseDir,
diff --git a/searchcore/src/vespa/searchcore/proton/index/indexmanager.cpp b/searchcore/src/vespa/searchcore/proton/index/indexmanager.cpp
index 5ba6e11331c..288dd1067c6 100644
--- a/searchcore/src/vespa/searchcore/proton/index/indexmanager.cpp
+++ b/searchcore/src/vespa/searchcore/proton/index/indexmanager.cpp
@@ -1,7 +1,4 @@
// 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.index.indexmanager");
#include "indexmanager.h"
#include "diskindexwrapper.h"
diff --git a/searchcore/src/vespa/searchcore/proton/index/memoryindexwrapper.cpp b/searchcore/src/vespa/searchcore/proton/index/memoryindexwrapper.cpp
index 73a86c805e2..cb687b80a08 100644
--- a/searchcore/src/vespa/searchcore/proton/index/memoryindexwrapper.cpp
+++ b/searchcore/src/vespa/searchcore/proton/index/memoryindexwrapper.cpp
@@ -1,7 +1,4 @@
// 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.index.memoryindexwrapper");
#include "memoryindexwrapper.h"
#include <vespa/searchlib/common/serialnumfileheadercontext.h>
diff --git a/searchcore/src/vespa/searchcore/proton/initializer/initializer_task.cpp b/searchcore/src/vespa/searchcore/proton/initializer/initializer_task.cpp
index 041b4546e70..09b01180432 100644
--- a/searchcore/src/vespa/searchcore/proton/initializer/initializer_task.cpp
+++ b/searchcore/src/vespa/searchcore/proton/initializer/initializer_task.cpp
@@ -1,11 +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 "initializer_task.h"
-namespace proton {
-
-namespace initializer {
+namespace proton::initializer {
InitializerTask::InitializerTask()
: _state(State::BLOCKED),
@@ -25,7 +22,5 @@ InitializerTask::addDependency(SP dependency)
_dependencies.emplace_back(std::move(dependency));
}
-
} // namespace proton::initializer
-} // namespace proton
diff --git a/searchcore/src/vespa/searchcore/proton/matchengine/matchengine.cpp b/searchcore/src/vespa/searchcore/proton/matchengine/matchengine.cpp
index e9c0cba6069..78fd38ea87a 100644
--- a/searchcore/src/vespa/searchcore/proton/matchengine/matchengine.cpp
+++ b/searchcore/src/vespa/searchcore/proton/matchengine/matchengine.cpp
@@ -1,5 +1,4 @@
// 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 "matchengine.h"
#include <vespa/searchcore/proton/common/state_reporter_utils.h>
#include <vespa/vespalib/data/slime/cursor.h>
diff --git a/searchcore/src/vespa/searchcore/proton/persistenceengine/i_document_retriever.cpp b/searchcore/src/vespa/searchcore/proton/persistenceengine/i_document_retriever.cpp
index 81a56f4aac6..a7bc34a2130 100644
--- a/searchcore/src/vespa/searchcore/proton/persistenceengine/i_document_retriever.cpp
+++ b/searchcore/src/vespa/searchcore/proton/persistenceengine/i_document_retriever.cpp
@@ -1,8 +1,7 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/persistence/spi/read_consistency.h>
-#include <vespa/fastos/fastos.h>
#include "i_document_retriever.h"
+#include <vespa/persistence/spi/read_consistency.h>
namespace proton {
diff --git a/searchcore/src/vespa/searchcore/util/CMakeLists.txt b/searchcore/src/vespa/searchcore/util/CMakeLists.txt
index 98fce6782ca..fd162c3284c 100644
--- a/searchcore/src/vespa/searchcore/util/CMakeLists.txt
+++ b/searchcore/src/vespa/searchcore/util/CMakeLists.txt
@@ -1,7 +1,6 @@
# Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
vespa_add_library(searchcore_util STATIC
SOURCES
- base64encoder.cpp
eventloop.cpp
log.cpp
DEPENDS
diff --git a/searchcore/src/vespa/searchcore/util/base64encoder.cpp b/searchcore/src/vespa/searchcore/util/base64encoder.cpp
deleted file mode 100644
index 7b3938533a7..00000000000
--- a/searchcore/src/vespa/searchcore/util/base64encoder.cpp
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-// Copyright (C) 2001-2003 Fast Search & Transfer ASA
-// Copyright (C) 2003 Overture Services Norway AS
-
-#include <vespa/fastos/fastos.h>
-#include <vespa/searchcore/util/base64encoder.h>
-
-char FastS_Base64Encoder::_base64Padding = '=';
-
-char FastS_Base64Encoder::_base64Table[] =
-{
- 'A','B','C','D','E','F','G','H','I','J','K','L','M',
- 'N','O','P','Q','R','S','T','U','V','W','X','Y','Z',
- 'a','b','c','d','e','f','g','h','i','j','k','l','m',
- 'n','o','p','q','r','s','t','u','v','w','x','y','z',
- '0','1','2','3','4','5','6','7','8','9','+','/'
-};
diff --git a/searchcore/src/vespa/searchcore/util/base64encoder.h b/searchcore/src/vespa/searchcore/util/base64encoder.h
deleted file mode 100644
index 10fcd85abca..00000000000
--- a/searchcore/src/vespa/searchcore/util/base64encoder.h
+++ /dev/null
@@ -1,120 +0,0 @@
-// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-// Copyright (C) 2001-2003 Fast Search & Transfer ASA
-// Copyright (C) 2003 Overture Services Norway AS
-
-#pragma once
-
-
-/**
- * Simple class that may be used to base 64 encode a continuous data buffer.
- **/
-class FastS_Base64Encoder
-{
-private:
- FastS_Base64Encoder(const FastS_Base64Encoder &);
- FastS_Base64Encoder& operator=(const FastS_Base64Encoder &);
-
- /**
- * The char used for padding in base 64 encoding.
- **/
- static char _base64Padding;
-
- /**
- * Table containing the 64 chars used to represent numbers from 0-63
- * in base 64 encoding.
- **/
- static char _base64Table[];
-
-
- const unsigned char *_data;
- const unsigned char *_dataPos;
- const unsigned char *_dataEnd;
-
-public:
-
-
- /**
- * Create a base 64 encoder object with the task of encoding the
- * given buffer.
- *
- * @param data the data to encode.
- * @param datalen the byte-count of the data to encode.
- **/
- FastS_Base64Encoder(const void *data, unsigned int datalen)
- : _data(static_cast<const unsigned char *>(data)),
- _dataPos(_data),
- _dataEnd(_data + datalen)
- {
- }
-
-
- /**
- * @return number of bytes left in the input buffer.
- **/
- unsigned int InputBytesLeft()
- {
- return (_dataEnd - _dataPos);
- }
-
-
- /**
- * This method determines how much output space is needed to encode
- * the rest of the input buffer referenced by this object.
- *
- * @return the space needed to encode the rest of the input.
- **/
- unsigned int OutputBytesNeeded()
- {
- unsigned int groups = (_dataEnd - _dataPos) / 3;
- if (((_dataEnd - _dataPos) % 3) != 0)
- groups++;
-
- return (groups << 2);
- }
-
-
- /**
- * Encode data from the buffer referenced by this object into the
- * buffer given to this method. NOTE: dstLen should be at least 4
- * since this method only encodes in complete groups.
- *
- * @return the number of bytes of output generated.
- * @param dst where to generate output.
- * @param dstLen maximum output to generate.
- **/
- unsigned int Encode(char *dst, unsigned int dstLen)
- {
- unsigned int groups = dstLen >> 2;
-
- char *dstPos = dst;
- for (;groups > 0 && InputBytesLeft() >= 3; groups--) {
- dstPos[0] = _base64Table[_dataPos[0] >> 2];
- dstPos[1] = _base64Table[((_dataPos[0] & 0x03) << 4) + (_dataPos[1] >> 4)];
- dstPos[2] = _base64Table[((_dataPos[1] & 0x0f) << 2) + (_dataPos[2] >> 6)];
- dstPos[3] = _base64Table[_dataPos[2] & 0x3f];
- dstPos += 4;
- _dataPos += 3;
- }
-
- if (groups > 0 && InputBytesLeft() > 0) { // handle padding
- dstPos[0] = _base64Table[_dataPos[0] >> 2];
-
- if (InputBytesLeft() == 2) { // 2 bytes left
- dstPos[1] = _base64Table[((_dataPos[0] & 0x03) << 4) + (_dataPos[1] >> 4)];
- dstPos[2] = _base64Table[(_dataPos[1] & 0x0f) << 2];
- dstPos[3] = _base64Padding;
-
- } else { // 1 byte left
- dstPos[1] = _base64Table[(_dataPos[0] & 0x03) << 4];
- dstPos[2] = _base64Padding;
- dstPos[3] = _base64Padding;
- }
- dstPos += 4;
- _dataPos = _dataEnd;
- }
-
- return (dstPos - dst);
- }
-
-};
-
diff --git a/searchcore/src/vespa/searchcore/util/eventloop.cpp b/searchcore/src/vespa/searchcore/util/eventloop.cpp
index fc249a2369a..a449dcf2007 100644
--- a/searchcore/src/vespa/searchcore/util/eventloop.cpp
+++ b/searchcore/src/vespa/searchcore/util/eventloop.cpp
@@ -1,14 +1,10 @@
// 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/searchcore/util/eventloop.h>
+#include "eventloop.h"
+#include <cstdio>
double FastS_TimeOut::_val[FastS_TimeOut::valCnt];
-
void
FastS_TimeOut::WriteTime(char* buffer, size_t bufsize, double xtime)
{
diff --git a/searchcore/src/vespa/searchcore/util/eventloop.h b/searchcore/src/vespa/searchcore/util/eventloop.h
index 1858352b07f..2b75f198448 100644
--- a/searchcore/src/vespa/searchcore/util/eventloop.h
+++ b/searchcore/src/vespa/searchcore/util/eventloop.h
@@ -1,9 +1,8 @@
// 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 <cstddef>
class FastS_TimeOut
{
diff --git a/searchcore/src/vespa/searchcore/util/log.cpp b/searchcore/src/vespa/searchcore/util/log.cpp
index 064d0ef3e92..2df60a50df3 100644
--- a/searchcore/src/vespa/searchcore/util/log.cpp
+++ b/searchcore/src/vespa/searchcore/util/log.cpp
@@ -1,9 +1,8 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-// Copyright (C) 2000-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/util/log.h>
+
+#include <vespa/log/log.h>
LOG_SETUP(".searchcore.util.log");
/**