aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2017-05-02 14:41:57 +0200
committerHenning Baldersheim <balder@yahoo-inc.com>2017-05-02 14:41:57 +0200
commit5bbc8f20f3d206254f648a210372e30a1b39f46f (patch)
tree7197e9908c0c0ab199ad05a8e32de1f58cf9d0d8 /searchcore
parent0f646f10b377b90fc37e9911f9fe383d112ff157 (diff)
Fix warnings hidden earlier due to including application headers as system includes
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/tests/grouping/grouping.cpp6
-rw-r--r--searchcore/src/tests/proton/attribute/attribute_initializer/attribute_initializer_test.cpp55
-rw-r--r--searchcore/src/tests/proton/attribute/attributeflush_test.cpp17
-rw-r--r--searchcore/src/tests/proton/common/dummydbowner.h1
-rw-r--r--searchcore/src/tests/proton/docsummary/docsummary.cpp50
-rw-r--r--searchcore/src/tests/proton/docsummary/summaryfieldconverter_test.cpp3
-rw-r--r--searchcore/src/tests/proton/feedoperation/feedoperation_test.cpp40
-rw-r--r--searchcore/src/tests/proton/index/fusionrunner_test.cpp20
-rw-r--r--searchcore/src/tests/proton/index/indexcollection_test.cpp10
-rw-r--r--searchcore/src/tests/proton/matching/constant_value_repo/constant_value_repo_test.cpp1
-rw-r--r--searchcore/src/tests/proton/matching/query_test.cpp7
-rw-r--r--searchcore/src/tests/proton/server/disk_mem_usage_filter/disk_mem_usage_filter_test.cpp11
-rw-r--r--searchcore/src/tests/proton/server/memory_flush_config_updater/memory_flush_config_updater_test.cpp5
-rw-r--r--searchcore/src/tests/proton/statusreport/CMakeLists.txt1
-rw-r--r--searchcore/src/tests/proton/statusreport/statusreport.cpp3
-rw-r--r--searchcore/src/vespa/searchcore/fdispatch/common/perftask.cpp8
-rw-r--r--searchcore/src/vespa/searchcore/fdispatch/common/perftask.h4
-rw-r--r--searchcore/src/vespa/searchcore/proton/attribute/address_space_usage_stats.cpp7
-rw-r--r--searchcore/src/vespa/searchcore/proton/attribute/address_space_usage_stats.h1
-rw-r--r--searchcore/src/vespa/searchcore/proton/attribute/attribute_manager_explorer.cpp8
-rw-r--r--searchcore/src/vespa/searchcore/proton/attribute/attribute_manager_explorer.h1
-rw-r--r--searchcore/src/vespa/searchcore/proton/common/CMakeLists.txt1
-rw-r--r--searchcore/src/vespa/searchcore/proton/common/feeddebugger.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/common/feeddebugger.h1
-rw-r--r--searchcore/src/vespa/searchcore/proton/common/handlermap.hpp13
-rw-r--r--searchcore/src/vespa/searchcore/proton/common/statusreport.h23
-rw-r--r--searchcore/src/vespa/searchcore/proton/docsummary/documentstoreadapter.cpp3
-rw-r--r--searchcore/src/vespa/searchcore/proton/docsummary/documentstoreadapter.h7
-rw-r--r--searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastorecontext.cpp7
-rw-r--r--searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastorecontext.h2
-rw-r--r--searchcore/src/vespa/searchcore/proton/index/index_writer.cpp9
-rw-r--r--searchcore/src/vespa/searchcore/proton/index/index_writer.h2
-rw-r--r--searchcore/src/vespa/searchcore/proton/matchengine/matchengine.h2
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/attribute_limiter.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/attribute_limiter.h1
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/docid_range_scheduler.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/docid_range_scheduler.h3
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/fakesearchcontext.cpp11
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/fakesearchcontext.h9
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/matcher.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/partial_result.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/partial_result.h1
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/query.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/query.h1
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/ranking_constants.cpp4
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/ranking_constants.h2
-rw-r--r--searchcore/src/vespa/searchcore/proton/metrics/documentdb_job_trackers.cpp8
-rw-r--r--searchcore/src/vespa/searchcore/proton/metrics/documentdb_job_trackers.h2
-rw-r--r--searchcore/src/vespa/searchcore/proton/metrics/i_job_tracker.h2
-rw-r--r--searchcore/src/vespa/searchcore/proton/metrics/job_tracked_flush_target.cpp6
-rw-r--r--searchcore/src/vespa/searchcore/proton/metrics/job_tracked_flush_target.h1
-rw-r--r--searchcore/src/vespa/searchcore/proton/persistenceengine/document_iterator.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/persistenceengine/document_iterator.h9
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/data_directory_upgrader.cpp3
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/data_directory_upgrader.h1
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/document_db_explorer.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/document_db_explorer.h1
-rw-r--r--searchcore/src/vespa/searchcore/proton/test/bucketstatecalculator.h31
-rw-r--r--searchcore/src/vespa/searchcore/proton/test/documentdb_config_builder.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/test/documentdb_config_builder.h1
-rw-r--r--searchcore/src/vespa/searchcore/proton/test/dummy_document_store.h48
-rw-r--r--searchcore/src/vespa/searchcore/proton/test/dummy_document_sub_db.h1
-rw-r--r--searchcore/src/vespa/searchcore/proton/test/dummy_summary_manager.h2
-rw-r--r--searchcore/src/vespa/searchcore/proton/test/executor_observer.h2
-rw-r--r--searchcore/src/vespa/searchcore/proton/test/resulthandler.h6
-rw-r--r--searchcore/src/vespa/searchcore/proton/test/simple_job_tracker.h4
-rw-r--r--searchcore/src/vespa/searchcore/proton/test/thread_service_observer.h8
-rw-r--r--searchcore/src/vespa/searchcore/proton/test/threading_service_observer.h15
-rw-r--r--searchcore/src/vespa/searchcore/proton/test/userdocumentsbuilder.cpp12
-rw-r--r--searchcore/src/vespa/searchcore/proton/test/userdocumentsbuilder.h10
70 files changed, 246 insertions, 306 deletions
diff --git a/searchcore/src/tests/grouping/grouping.cpp b/searchcore/src/tests/grouping/grouping.cpp
index 638eb40c3dc..156902ac179 100644
--- a/searchcore/src/tests/grouping/grouping.cpp
+++ b/searchcore/src/tests/grouping/grouping.cpp
@@ -139,8 +139,8 @@ class CheckAttributeReferences : public vespalib::ObjectOperation, public vespal
{
public:
CheckAttributeReferences(bool log=false) : _log(log), _numrefs(0) { }
- bool _log;
- int _numrefs;
+ bool _log;
+ uint32_t _numrefs;
private:
void execute(vespalib::Identifiable &obj) override {
if (_log) {
@@ -338,7 +338,7 @@ TEST_F("testGroupingSession", DoomFixture()) {
for (unsigned int i = 0; i < gl3.size(); i++) {
gl3[i]->select(attrCheck_after, attrCheck_after);
}
- EXPECT_EQUAL(attrCheck_after._numrefs, 0);
+ EXPECT_EQUAL(attrCheck_after._numrefs, 0u);
{
EXPECT_EQUAL(id, session.getSessionId());
ASSERT_TRUE(!session.getGroupingManager().empty());
diff --git a/searchcore/src/tests/proton/attribute/attribute_initializer/attribute_initializer_test.cpp b/searchcore/src/tests/proton/attribute/attribute_initializer/attribute_initializer_test.cpp
index 49869d99978..f5eb55f2abc 100644
--- a/searchcore/src/tests/proton/attribute/attribute_initializer/attribute_initializer_test.cpp
+++ b/searchcore/src/tests/proton/attribute/attribute_initializer/attribute_initializer_test.cpp
@@ -1,7 +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 <vespa/log/log.h>
-LOG_SETUP("attribute_initializer_test");
+
#include <vespa/vespalib/testkit/testapp.h>
#include <vespa/vespalib/stllike/string.h>
#include <vespa/searchcore/proton/test/directory_handler.h>
@@ -19,8 +17,7 @@ using search::SerialNum;
const vespalib::string test_dir = "test_output";
-namespace proton
-{
+namespace proton {
namespace {
@@ -100,8 +97,8 @@ TEST("require that integer attribute can be initialized")
saveAttr("a", int32_sv, 10, 2);
Fixture f;
auto av = f.createInitializer({"a", int32_sv}, 5)->init().getAttribute();
- EXPECT_EQUAL(2, av->getCreateSerialNum());
- EXPECT_EQUAL(2, av->getNumDocs());
+ EXPECT_EQUAL(2u, av->getCreateSerialNum());
+ EXPECT_EQUAL(2u, av->getNumDocs());
}
TEST("require that mismatching base type is not loaded")
@@ -109,8 +106,8 @@ TEST("require that mismatching base type is not loaded")
saveAttr("a", int32_sv, 10, 2);
Fixture f;
auto av = f.createInitializer({"a", int16_sv}, 5)->init().getAttribute();
- EXPECT_EQUAL(5, av->getCreateSerialNum());
- EXPECT_EQUAL(1, av->getNumDocs());
+ EXPECT_EQUAL(5u, av->getCreateSerialNum());
+ EXPECT_EQUAL(1u, av->getNumDocs());
}
TEST("require that mismatching collection type is not loaded")
@@ -118,8 +115,8 @@ TEST("require that mismatching collection type is not loaded")
saveAttr("a", int32_sv, 10, 2);
Fixture f;
auto av = f.createInitializer({"a", int32_array}, 5)->init().getAttribute();
- EXPECT_EQUAL(5, av->getCreateSerialNum());
- EXPECT_EQUAL(1, av->getNumDocs());
+ EXPECT_EQUAL(5u, av->getCreateSerialNum());
+ EXPECT_EQUAL(1u, av->getNumDocs());
}
TEST("require that mismatching weighted set collection type params is not loaded")
@@ -128,11 +125,11 @@ TEST("require that mismatching weighted set collection type params is not loaded
saveAttr("b", string_wset2, 10, 2);
Fixture f;
auto av = f.createInitializer({"a", string_wset2}, 5)->init().getAttribute();
- EXPECT_EQUAL(5, av->getCreateSerialNum());
- EXPECT_EQUAL(1, av->getNumDocs());
+ EXPECT_EQUAL(5u, av->getCreateSerialNum());
+ EXPECT_EQUAL(1u, av->getNumDocs());
auto av2 = f.createInitializer({"b", string_wset}, 5)->init().getAttribute();
- EXPECT_EQUAL(5, av2->getCreateSerialNum());
- EXPECT_EQUAL(1, av2->getNumDocs());
+ EXPECT_EQUAL(5u, av2->getCreateSerialNum());
+ EXPECT_EQUAL(1u, av2->getNumDocs());
}
TEST("require that predicate attributes can be initialized")
@@ -140,8 +137,8 @@ TEST("require that predicate attributes can be initialized")
saveAttr("a", predicate, 10, 2);
Fixture f;
auto av = f.createInitializer({"a", predicate}, 5)->init().getAttribute();
- EXPECT_EQUAL(2, av->getCreateSerialNum());
- EXPECT_EQUAL(2, av->getNumDocs());
+ EXPECT_EQUAL(2u, av->getCreateSerialNum());
+ EXPECT_EQUAL(2u, av->getNumDocs());
}
TEST("require that predicate attributes will not be initialized with future-created attribute")
@@ -149,8 +146,8 @@ TEST("require that predicate attributes will not be initialized with future-crea
saveAttr("a", predicate, 10, 8);
Fixture f;
auto av = f.createInitializer({"a", predicate}, 5)->init().getAttribute();
- EXPECT_EQUAL(5, av->getCreateSerialNum());
- EXPECT_EQUAL(1, av->getNumDocs());
+ EXPECT_EQUAL(5u, av->getCreateSerialNum());
+ EXPECT_EQUAL(1u, av->getNumDocs());
}
TEST("require that predicate attributes will not be initialized with mismatching type")
@@ -158,8 +155,8 @@ TEST("require that predicate attributes will not be initialized with mismatching
saveAttr("a", predicate, 10, 2);
Fixture f;
auto av = f.createInitializer({"a", getPredicateWithArity(4)}, 5)->init().getAttribute();
- EXPECT_EQUAL(5, av->getCreateSerialNum());
- EXPECT_EQUAL(1, av->getNumDocs());
+ EXPECT_EQUAL(5u, av->getCreateSerialNum());
+ EXPECT_EQUAL(1u, av->getNumDocs());
}
TEST("require that tensor attribute can be initialized")
@@ -167,8 +164,8 @@ TEST("require that tensor attribute can be initialized")
saveAttr("a", getTensor("tensor(x[10])"), 10, 2);
Fixture f;
auto av = f.createInitializer({"a", getTensor("tensor(x[10])")}, 5)->init().getAttribute();
- EXPECT_EQUAL(2, av->getCreateSerialNum());
- EXPECT_EQUAL(2, av->getNumDocs());
+ EXPECT_EQUAL(2u, av->getCreateSerialNum());
+ EXPECT_EQUAL(2u, av->getNumDocs());
}
TEST("require that tensor attributes will not be initialized with future-created attribute")
@@ -176,8 +173,8 @@ TEST("require that tensor attributes will not be initialized with future-created
saveAttr("a", getTensor("tensor(x[10])"), 10, 8);
Fixture f;
auto av = f.createInitializer({"a", getTensor("tensor(x[10])")}, 5)->init().getAttribute();
- EXPECT_EQUAL(5, av->getCreateSerialNum());
- EXPECT_EQUAL(1, av->getNumDocs());
+ EXPECT_EQUAL(5u, av->getCreateSerialNum());
+ EXPECT_EQUAL(1u, av->getNumDocs());
}
TEST("require that tensor attributes will not be initialized with mismatching type")
@@ -185,8 +182,8 @@ TEST("require that tensor attributes will not be initialized with mismatching ty
saveAttr("a", getTensor("tensor(x[10])"), 10, 2);
Fixture f;
auto av = f.createInitializer({"a", getTensor("tensor(x[11])")}, 5)->init().getAttribute();
- EXPECT_EQUAL(5, av->getCreateSerialNum());
- EXPECT_EQUAL(1, av->getNumDocs());
+ EXPECT_EQUAL(5u, av->getCreateSerialNum());
+ EXPECT_EQUAL(1u, av->getNumDocs());
}
TEST("require that too old attribute is not loaded")
@@ -194,8 +191,8 @@ TEST("require that too old attribute is not loaded")
saveAttr("a", int32_sv, 3, 2);
Fixture f;
auto av = f.createInitializer({"a", int32_sv}, 5)->init().getAttribute();
- EXPECT_EQUAL(5, av->getCreateSerialNum());
- EXPECT_EQUAL(1, av->getNumDocs());
+ EXPECT_EQUAL(5u, av->getCreateSerialNum());
+ EXPECT_EQUAL(1u, av->getNumDocs());
}
}
diff --git a/searchcore/src/tests/proton/attribute/attributeflush_test.cpp b/searchcore/src/tests/proton/attribute/attributeflush_test.cpp
index 50502767395..5375f7817ec 100644
--- a/searchcore/src/tests/proton/attribute/attributeflush_test.cpp
+++ b/searchcore/src/tests/proton/attribute/attributeflush_test.cpp
@@ -1,10 +1,7 @@
// 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("attributeflush_test");
+
#include <vespa/vespalib/testkit/testapp.h>
#include <vespa/vespalib/util/threadstackexecutor.h>
-#include <vespa/vespalib/util/sync.h>
#include <vespa/searchcore/proton/attribute/attributemanager.h>
#include <vespa/searchcore/proton/attribute/attributedisklayout.h>
#include <vespa/searchcore/proton/attribute/attribute_writer.h>
@@ -12,13 +9,14 @@ LOG_SETUP("attributeflush_test");
#include <vespa/searchlib/attribute/attributefactory.h>
#include <vespa/searchlib/attribute/integerbase.h>
#include <vespa/searchlib/common/indexmetainfo.h>
-#include <vespa/searchlib/util/dirtraverse.h>
#include <vespa/vespalib/io/fileutil.h>
#include <vespa/searchlib/index/dummyfileheadercontext.h>
#include <vespa/searchlib/common/foregroundtaskexecutor.h>
#include <vespa/searchcore/proton/test/directory_handler.h>
-#include <vespa/searchcore/proton/common/hw_info.h>
-#include <vespa/searchlib/attribute/attributevector.hpp>
+#include <vespa/fastos/file.h>
+
+#include <vespa/log/log.h>
+LOG_SETUP("attributeflush_test");
using namespace document;
using namespace search;
@@ -36,8 +34,7 @@ typedef std::shared_ptr<Gate> GateSP;
namespace proton {
-namespace
-{
+namespace {
const uint64_t createSerialNum = 42u;
@@ -581,7 +578,7 @@ Test::requireThatFlushedAttributeCanBeLoaded(const HwInfo &hwInfo)
AttributeManager &am = amf._m;
AttributeVector::SP av = amf.addPostingAttribute(attrName);
IntegerAttribute & ia = static_cast<IntegerAttribute &>(*av);
- EXPECT_EQUAL(1, av->getNumDocs());
+ EXPECT_EQUAL(1u, av->getNumDocs());
av->addDocs(numDocs);
EXPECT_EQUAL(numDocs + 1, av->getNumDocs());
for (uint32_t i = 0; i < numDocs; ++i) {
diff --git a/searchcore/src/tests/proton/common/dummydbowner.h b/searchcore/src/tests/proton/common/dummydbowner.h
index 8f44985d619..1b0b609e33d 100644
--- a/searchcore/src/tests/proton/common/dummydbowner.h
+++ b/searchcore/src/tests/proton/common/dummydbowner.h
@@ -17,6 +17,7 @@ struct DummyDBOwner : IDocumentDBOwner {
: _registry(std::make_shared<DocumentDBReferenceRegistry>())
{
}
+ ~DummyDBOwner() {}
bool isInitializing() const override { return false; }
diff --git a/searchcore/src/tests/proton/docsummary/docsummary.cpp b/searchcore/src/tests/proton/docsummary/docsummary.cpp
index e0e0c477753..d7311a2cc63 100644
--- a/searchcore/src/tests/proton/docsummary/docsummary.cpp
+++ b/searchcore/src/tests/proton/docsummary/docsummary.cpp
@@ -343,44 +343,22 @@ private:
uint32_t id,
bool relaxed = false);
- void
- requireThatAdapterHandlesAllFieldTypes();
-
- void
- requireThatAdapterHandlesMultipleDocuments();
-
- void
- requireThatAdapterHandlesDocumentIdField();
-
- void
- requireThatDocsumRequestIsProcessed();
-
- void
- requireThatRewritersAreUsed();
-
- void
- requireThatAttributesAreUsed();
-
- void
- requireThatSummaryAdapterHandlesPutAndRemove();
-
- void
- requireThatAnnotationsAreUsed();
-
- void
- requireThatUrisAreUsed();
-
- void
- requireThatPositionsAreUsed();
-
- void
- requireThatRawFieldsWorks();
-
- void
- requireThatFieldCacheRepoCanReturnDefaultFieldCache();
+ void requireThatAdapterHandlesAllFieldTypes();
+ void requireThatAdapterHandlesMultipleDocuments();
+ void requireThatAdapterHandlesDocumentIdField();
+ void requireThatDocsumRequestIsProcessed();
+ void requireThatRewritersAreUsed();
+ void requireThatAttributesAreUsed();
+ void requireThatSummaryAdapterHandlesPutAndRemove();
+ void requireThatAnnotationsAreUsed();
+ void requireThatUrisAreUsed();
+ void requireThatPositionsAreUsed();
+ void requireThatRawFieldsWorks();
+ void requireThatFieldCacheRepoCanReturnDefaultFieldCache();
public:
Test();
+ ~Test();
int Main() override;
};
@@ -1313,7 +1291,7 @@ Test::Test()
}
}
-
+Test::~Test() {}
int
Test::Main()
diff --git a/searchcore/src/tests/proton/docsummary/summaryfieldconverter_test.cpp b/searchcore/src/tests/proton/docsummary/summaryfieldconverter_test.cpp
index 487e84c02d6..878833fa58b 100644
--- a/searchcore/src/tests/proton/docsummary/summaryfieldconverter_test.cpp
+++ b/searchcore/src/tests/proton/docsummary/summaryfieldconverter_test.cpp
@@ -196,6 +196,7 @@ class Test : public vespalib::TestApp {
void setSpanTree(StringFieldValue & value, SpanTree::UP tree);
public:
Test();
+ ~Test();
int Main() override;
};
@@ -246,6 +247,8 @@ Test::Test() :
ASSERT_TRUE(_documentType);
}
+Test::~Test() {}
+
#define TEST_CALL(func) \
TEST_DO(setUp()); \
TEST_DO(func); \
diff --git a/searchcore/src/tests/proton/feedoperation/feedoperation_test.cpp b/searchcore/src/tests/proton/feedoperation/feedoperation_test.cpp
index f7832d7e4dc..9c17b904eed 100644
--- a/searchcore/src/tests/proton/feedoperation/feedoperation_test.cpp
+++ b/searchcore/src/tests/proton/feedoperation/feedoperation_test.cpp
@@ -1,20 +1,7 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
// Unit tests for feedoperation.
-#include <vespa/log/log.h>
-LOG_SETUP("feedoperation_test");
-#include <vespa/fastos/fastos.h>
-#include <vespa/document/base/documentid.h>
-#include <vespa/document/bucket/bucketid.h>
-#include <vespa/document/datatype/datatype.h>
-#include <vespa/document/fieldvalue/document.h>
-#include <vespa/document/update/documentupdate.h>
-#include <vespa/document/update/assignvalueupdate.h>
-#include <vespa/document/update/fieldupdate.h>
-#include <vespa/document/update/valueupdate.h>
-#include <vespa/document/fieldvalue/fieldvalues.h>
-#include <persistence/spi/types.h>
#include <vespa/searchcore/proton/feedoperation/compact_lid_space_operation.h>
#include <vespa/searchcore/proton/feedoperation/deletebucketoperation.h>
#include <vespa/searchcore/proton/feedoperation/joinbucketsoperation.h>
@@ -29,6 +16,13 @@ LOG_SETUP("feedoperation_test");
#include <vespa/searchcore/proton/feedoperation/updateoperation.h>
#include <vespa/searchcore/proton/feedoperation/wipehistoryoperation.h>
#include <vespa/searchlib/query/base.h>
+#include <persistence/spi/types.h>
+#include <vespa/document/base/documentid.h>
+#include <vespa/document/datatype/datatype.h>
+#include <vespa/document/fieldvalue/document.h>
+#include <vespa/document/update/documentupdate.h>
+#include <vespa/document/update/assignvalueupdate.h>
+#include <vespa/document/fieldvalue/fieldvalues.h>
#include <vespa/document/repo/configbuilder.h>
#include <vespa/document/repo/documenttyperepo.h>
#include <vespa/vespalib/testkit/testapp.h>
@@ -91,12 +85,12 @@ uint32_t getDocIdSize(const DocumentId &doc_id)
void assertDocumentOperation(DocumentOperation &op, BucketId expBucket, uint32_t expDocSize)
{
EXPECT_EQUAL(expBucket, op.getBucketId());
- EXPECT_EQUAL(10, op.getTimestamp().getValue());
+ EXPECT_EQUAL(10u, op.getTimestamp().getValue());
EXPECT_EQUAL(expDocSize, op.getSerializedDocSize());
- EXPECT_EQUAL(1, op.getSubDbId());
- EXPECT_EQUAL(2, op.getLid());
- EXPECT_EQUAL(3, op.getPrevSubDbId());
- EXPECT_EQUAL(4, op.getPrevLid());
+ EXPECT_EQUAL(1u, op.getSubDbId());
+ EXPECT_EQUAL(2u, op.getLid());
+ EXPECT_EQUAL(3u, op.getPrevSubDbId());
+ EXPECT_EQUAL(4u, op.getPrevLid());
}
DocumentTypeRepo::UP
@@ -277,7 +271,7 @@ TEST_F("require that we can serialize and deserialize update operations", Fixtur
op.deserialize(stream, *f._repo);
EXPECT_EQUAL(*upd, *op.getUpdate());
EXPECT_EQUAL(bucket, op.getBucketId());
- EXPECT_EQUAL(10, op.getTimestamp().getValue());
+ EXPECT_EQUAL(10u, op.getTimestamp().getValue());
}
}
@@ -295,7 +289,7 @@ TEST_F("require that we can deserialize old update operations", Fixture)
op.deserialize(stream, *f._repo);
EXPECT_EQUAL(*upd, *op.getUpdate());
EXPECT_EQUAL(bucket, op.getBucketId());
- EXPECT_EQUAL(10, op.getTimestamp().getValue());
+ EXPECT_EQUAL(10u, op.getTimestamp().getValue());
}
}
@@ -310,7 +304,7 @@ TEST_F("require that we can serialize and deserialize put operations", Fixture)
PutOperation op(bucket, Timestamp(10), doc);
op.setDbDocumentId({1, 2});
op.setPrevDbDocumentId({3, 4});
- EXPECT_EQUAL(0, op.getSerializedDocSize());
+ EXPECT_EQUAL(0u, op.getSerializedDocSize());
op.serialize(stream);
EXPECT_EQUAL(expSerializedDocSize, op.getSerializedDocSize());
}
@@ -332,7 +326,7 @@ TEST_F("require that we can serialize and deserialize move operations", Fixture)
{
MoveOperation op(bucket, Timestamp(10), doc, {3, 4}, 1);
op.setTargetLid(2);
- EXPECT_EQUAL(0, op.getSerializedDocSize());
+ EXPECT_EQUAL(0u, op.getSerializedDocSize());
op.serialize(stream);
EXPECT_EQUAL(expSerializedDocSize, op.getSerializedDocSize());
}
@@ -354,7 +348,7 @@ TEST_F("require that we can serialize and deserialize remove operations", Fixtur
RemoveOperation op(bucket, Timestamp(10), docId);
op.setDbDocumentId({1, 2});
op.setPrevDbDocumentId({3, 4});
- EXPECT_EQUAL(0, op.getSerializedDocSize());
+ EXPECT_EQUAL(0u, op.getSerializedDocSize());
op.serialize(stream);
EXPECT_EQUAL(expSerializedDocSize, op.getSerializedDocSize());
}
diff --git a/searchcore/src/tests/proton/index/fusionrunner_test.cpp b/searchcore/src/tests/proton/index/fusionrunner_test.cpp
index 53db6f44c91..af2bafab09c 100644
--- a/searchcore/src/tests/proton/index/fusionrunner_test.cpp
+++ b/searchcore/src/tests/proton/index/fusionrunner_test.cpp
@@ -1,28 +1,18 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
// Unit tests for fusionrunner.
-#include <vespa/fastos/fastos.h>
-#include <vespa/log/log.h>
-LOG_SETUP("fusionrunner_test");
-
-#include <vespa/document/fieldvalue/document.h>
-#include <vespa/document/fieldvalue/fieldvalue.h>
-#include <vespa/searchlib/memoryindex/memoryindex.h>
#include <vespa/searchcore/proton/index/indexmanager.h>
+#include <vespa/searchcore/proton/server/executorthreadingservice.h>
#include <vespa/searchcorespi/index/fusionrunner.h>
-#include <vespa/searchcorespi/index/fusionspec.h>
-#include <vespa/searchlib/attribute/fixedsourceselector.h>
+#include <vespa/searchlib/memoryindex/memoryindex.h>
#include <vespa/searchlib/diskindex/diskindex.h>
#include <vespa/searchlib/diskindex/indexbuilder.h>
-#include <vespa/searchlib/fef/matchdata.h>
#include <vespa/searchlib/fef/matchdatalayout.h>
-#include <vespa/searchlib/fef/termfieldmatchdata.h>
#include <vespa/searchlib/index/docbuilder.h>
#include <vespa/searchlib/index/dummyfileheadercontext.h>
#include <vespa/searchlib/query/tree/simplequery.h>
-#include <vespa/searchlib/queryeval/fake_requestcontext.h>
-#include <vespa/searchcore/proton/server/executorthreadingservice.h>
#include <vespa/vespalib/testkit/testapp.h>
+#include <vespa/fastos/file.h>
#include <set>
using document::Document;
@@ -96,8 +86,8 @@ public:
_ops(_fileHeaderContext,
TuneFileIndexManager(), 0,
_threadingService)
- {
- }
+ {}
+ ~Test() {}
int Main() override;
};
diff --git a/searchcore/src/tests/proton/index/indexcollection_test.cpp b/searchcore/src/tests/proton/index/indexcollection_test.cpp
index b6c98e1631e..e78baadb4de 100644
--- a/searchcore/src/tests/proton/index/indexcollection_test.cpp
+++ b/searchcore/src/tests/proton/index/indexcollection_test.cpp
@@ -1,16 +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("indexcollection_test");
#include <vespa/searchcore/proton/matching/fakesearchcontext.h>
-#include <vespa/searchcorespi/index/indexcollection.h>
#include <vespa/searchcorespi/index/warmupindexcollection.h>
-#include <vespa/searchlib/queryeval/fake_searchable.h>
-#include <vespa/searchlib/attribute/fixedsourceselector.h>
#include <vespa/vespalib/testkit/testapp.h>
#include <vespa/vespalib/util/threadstackexecutor.h>
+#include <vespa/log/log.h>
+LOG_SETUP("indexcollection_test");
+
using search::queryeval::ISourceSelector;
using search::queryeval::FakeSearchable;
using search::FixedSourceSelector;
@@ -46,6 +43,7 @@ public:
_executor(1, 128*1024),
_warmup(new FakeIndexSearchable)
{}
+ ~Test() {}
int Main() override;
};
diff --git a/searchcore/src/tests/proton/matching/constant_value_repo/constant_value_repo_test.cpp b/searchcore/src/tests/proton/matching/constant_value_repo/constant_value_repo_test.cpp
index 45ce6780201..3bfb31893d2 100644
--- a/searchcore/src/tests/proton/matching/constant_value_repo/constant_value_repo_test.cpp
+++ b/searchcore/src/tests/proton/matching/constant_value_repo/constant_value_repo_test.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 <vespa/vespalib/testkit/test_kit.h>
#include <vespa/searchcore/proton/matching/constant_value_repo.h>
diff --git a/searchcore/src/tests/proton/matching/query_test.cpp b/searchcore/src/tests/proton/matching/query_test.cpp
index 12e6ceaddab..d490a85ba0e 100644
--- a/searchcore/src/tests/proton/matching/query_test.cpp
+++ b/searchcore/src/tests/proton/matching/query_test.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.
// Unit tests for query.
-#include <vespa/fastos/fastos.h>
-#include <vespa/log/log.h>
-LOG_SETUP("query_test");
-
#include <vespa/document/datatype/positiondatatype.h>
#include <vespa/searchcore/proton/matching/fakesearchcontext.h>
#include <vespa/searchcore/proton/matching/matchdatareservevisitor.h>
@@ -107,6 +103,7 @@ class Test : public vespalib::TestApp {
void requireThatBlackListBlueprintCanBeUsed();
public:
+ ~Test();
int Main() override;
};
@@ -858,6 +855,8 @@ Test::requireThatBlackListBlueprintCanBeUsed()
EXPECT_EQUAL(exp, act);
}
+Test::~Test() {}
+
int
Test::Main()
{
diff --git a/searchcore/src/tests/proton/server/disk_mem_usage_filter/disk_mem_usage_filter_test.cpp b/searchcore/src/tests/proton/server/disk_mem_usage_filter/disk_mem_usage_filter_test.cpp
index f08121f46f6..49a89bb882d 100644
--- a/searchcore/src/tests/proton/server/disk_mem_usage_filter/disk_mem_usage_filter_test.cpp
+++ b/searchcore/src/tests/proton/server/disk_mem_usage_filter/disk_mem_usage_filter_test.cpp
@@ -1,7 +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("disk_mem_usage_filter_test");
+
#include <vespa/vespalib/testkit/testapp.h>
#include <vespa/searchcore/proton/server/disk_mem_usage_filter.h>
@@ -9,8 +7,7 @@ using proton::DiskMemUsageFilter;
namespace fs = std::experimental::filesystem;
-namespace
-{
+namespace {
struct Fixture
{
@@ -66,9 +63,9 @@ TEST_F("Check that default filter allows write", Fixture)
TEST_F("Check that stats are wired through", Fixture)
{
- EXPECT_EQUAL(42, f._filter.getMemoryStats().getMappingsCount());
+ EXPECT_EQUAL(42u, f._filter.getMemoryStats().getMappingsCount());
f.triggerMemoryLimit();
- EXPECT_EQUAL(43, f._filter.getMemoryStats().getMappingsCount());
+ EXPECT_EQUAL(43u, f._filter.getMemoryStats().getMappingsCount());
}
TEST_F("Check that disk limit can be reached", Fixture)
diff --git a/searchcore/src/tests/proton/server/memory_flush_config_updater/memory_flush_config_updater_test.cpp b/searchcore/src/tests/proton/server/memory_flush_config_updater/memory_flush_config_updater_test.cpp
index 21d8e70c472..9096b5530f8 100644
--- a/searchcore/src/tests/proton/server/memory_flush_config_updater/memory_flush_config_updater_test.cpp
+++ b/searchcore/src/tests/proton/server/memory_flush_config_updater/memory_flush_config_updater_test.cpp
@@ -1,7 +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/vespalib/testkit/testapp.h>
+#include <vespa/vespalib/testkit/testapp.h>
#include <vespa/searchcore/proton/server/memory_flush_config_updater.h>
using namespace proton;
@@ -50,7 +49,7 @@ struct Fixture
: strategy(std::make_shared<MemoryFlush>(MemoryFlushConfigUpdater::convertConfig(getDefaultConfig()))),
updater(strategy, getDefaultConfig())
{}
- void assertStrategyConfig(int64_t expMaxGlobalMemory, int64_t expMaxEachMemory, int64_t expMaxGlobalTlsSize) {
+ void assertStrategyConfig(uint64_t expMaxGlobalMemory, int64_t expMaxEachMemory, uint64_t expMaxGlobalTlsSize) {
EXPECT_EQUAL(expMaxGlobalMemory, strategy->getConfig().maxGlobalMemory);
EXPECT_EQUAL(expMaxEachMemory, strategy->getConfig().maxMemoryGain);
EXPECT_EQUAL(expMaxGlobalTlsSize, strategy->getConfig().maxGlobalTlsSize);
diff --git a/searchcore/src/tests/proton/statusreport/CMakeLists.txt b/searchcore/src/tests/proton/statusreport/CMakeLists.txt
index 98462c157fc..c88613388ab 100644
--- a/searchcore/src/tests/proton/statusreport/CMakeLists.txt
+++ b/searchcore/src/tests/proton/statusreport/CMakeLists.txt
@@ -3,5 +3,6 @@ vespa_add_executable(searchcore_statusreport_test_app TEST
SOURCES
statusreport.cpp
DEPENDS
+ searchcore_pcommon
)
vespa_add_test(NAME searchcore_statusreport_test_app COMMAND searchcore_statusreport_test_app)
diff --git a/searchcore/src/tests/proton/statusreport/statusreport.cpp b/searchcore/src/tests/proton/statusreport/statusreport.cpp
index 81dfe05fa2c..43b4452835a 100644
--- a/searchcore/src/tests/proton/statusreport/statusreport.cpp
+++ b/searchcore/src/tests/proton/statusreport/statusreport.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("statusreport_test");
#include <vespa/vespalib/testkit/testapp.h>
#include <vespa/searchcore/proton/common/statusreport.h>
diff --git a/searchcore/src/vespa/searchcore/fdispatch/common/perftask.cpp b/searchcore/src/vespa/searchcore/fdispatch/common/perftask.cpp
index b3778d6d449..d8c95093a1c 100644
--- a/searchcore/src/vespa/searchcore/fdispatch/common/perftask.cpp
+++ b/searchcore/src/vespa/searchcore/fdispatch/common/perftask.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.
// Copyright (C) 2005 Overture Services Norway AS
-#include <vespa/fastos/fastos.h>
+#include "perftask.h"
+#include "appcontext.h"
+
#include <vespa/log/log.h>
LOG_SETUP(".perftask");
-#include <vespa/fnet/fnet.h>
-#include <vespa/searchcore/fdispatch/common/perftask.h>
-#include <vespa/searchcore/fdispatch/common/appcontext.h>
-
FastS_PerfTask::FastS_PerfTask(FastS_AppContext &ctx, double delay)
: FNET_Task(ctx.GetFNETScheduler()),
diff --git a/searchcore/src/vespa/searchcore/fdispatch/common/perftask.h b/searchcore/src/vespa/searchcore/fdispatch/common/perftask.h
index da7648e5443..797d7ef5a0b 100644
--- a/searchcore/src/vespa/searchcore/fdispatch/common/perftask.h
+++ b/searchcore/src/vespa/searchcore/fdispatch/common/perftask.h
@@ -3,6 +3,8 @@
#pragma once
+#include <vespa/fnet/task.h>
+
class FastS_AppContext;
class FastS_PerfTask : public FNET_Task
@@ -18,7 +20,7 @@ private:
public:
FastS_PerfTask(FastS_AppContext &ctx, double delay);
~FastS_PerfTask();
- virtual void PerformTask();
+ void PerformTask() override;
bool isValid() const { return _valid; }
};
diff --git a/searchcore/src/vespa/searchcore/proton/attribute/address_space_usage_stats.cpp b/searchcore/src/vespa/searchcore/proton/attribute/address_space_usage_stats.cpp
index 2dcdc0d3e9c..330e4ae1ddc 100644
--- a/searchcore/src/vespa/searchcore/proton/attribute/address_space_usage_stats.cpp
+++ b/searchcore/src/vespa/searchcore/proton/attribute/address_space_usage_stats.cpp
@@ -1,18 +1,18 @@
// 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 "address_space_usage_stats.h"
namespace proton {
-AddressSpaceUsageStats::AddressSpaceUsageStats(const search::AddressSpace &
- usage)
+AddressSpaceUsageStats::AddressSpaceUsageStats(const search::AddressSpace & usage)
: _usage(usage),
_attributeName(),
_subDbName()
{
}
+AddressSpaceUsageStats::~AddressSpaceUsageStats() {}
+
void
AddressSpaceUsageStats::merge(const search::AddressSpace &usage,
const vespalib::string &attributeName,
@@ -25,5 +25,4 @@ AddressSpaceUsageStats::merge(const search::AddressSpace &usage,
}
}
-
} // namespace proton
diff --git a/searchcore/src/vespa/searchcore/proton/attribute/address_space_usage_stats.h b/searchcore/src/vespa/searchcore/proton/attribute/address_space_usage_stats.h
index 3d7346d1159..abdcae452e7 100644
--- a/searchcore/src/vespa/searchcore/proton/attribute/address_space_usage_stats.h
+++ b/searchcore/src/vespa/searchcore/proton/attribute/address_space_usage_stats.h
@@ -20,6 +20,7 @@ class AddressSpaceUsageStats
public:
AddressSpaceUsageStats(const search::AddressSpace &usage);
+ ~AddressSpaceUsageStats();
void merge(const search::AddressSpace &usage,
const vespalib::string &attributeName,
const vespalib::string &subDbName);
diff --git a/searchcore/src/vespa/searchcore/proton/attribute/attribute_manager_explorer.cpp b/searchcore/src/vespa/searchcore/proton/attribute/attribute_manager_explorer.cpp
index 304df4aab40..ae942ab899f 100644
--- a/searchcore/src/vespa/searchcore/proton/attribute/attribute_manager_explorer.cpp
+++ b/searchcore/src/vespa/searchcore/proton/attribute/attribute_manager_explorer.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.
-#include <vespa/fastos/fastos.h>
-#include <vespa/log/log.h>
-LOG_SETUP(".proton.attribute.attribute_manager_explorer");
-
#include "attribute_manager_explorer.h"
#include "attribute_vector_explorer.h"
-#include "exclusive_attribute_read_accessor.h"
-#include <vespa/searchlib/attribute/attributeguard.h>
#include <vespa/searchlib/attribute/attributevector.h>
using vespalib::slime::Inserter;
@@ -19,6 +13,8 @@ AttributeManagerExplorer::AttributeManagerExplorer(const proton::IAttributeManag
{
}
+AttributeManagerExplorer::~AttributeManagerExplorer() {}
+
void
AttributeManagerExplorer::get_state(const Inserter &inserter, bool full) const
{
diff --git a/searchcore/src/vespa/searchcore/proton/attribute/attribute_manager_explorer.h b/searchcore/src/vespa/searchcore/proton/attribute/attribute_manager_explorer.h
index cf3e764911c..fec271a0d92 100644
--- a/searchcore/src/vespa/searchcore/proton/attribute/attribute_manager_explorer.h
+++ b/searchcore/src/vespa/searchcore/proton/attribute/attribute_manager_explorer.h
@@ -17,6 +17,7 @@ private:
public:
AttributeManagerExplorer(const proton::IAttributeManager::SP &mgr);
+ ~AttributeManagerExplorer();
// Implements vespalib::StateExplorer
virtual void get_state(const vespalib::slime::Inserter &inserter, bool full) const override;
diff --git a/searchcore/src/vespa/searchcore/proton/common/CMakeLists.txt b/searchcore/src/vespa/searchcore/proton/common/CMakeLists.txt
index a6c9435ec0e..a2e0c0146e6 100644
--- a/searchcore/src/vespa/searchcore/proton/common/CMakeLists.txt
+++ b/searchcore/src/vespa/searchcore/proton/common/CMakeLists.txt
@@ -19,6 +19,7 @@ vespa_add_library(searchcore_pcommon STATIC
selectpruner.cpp
selectcontext.cpp
state_reporter_utils.cpp
+ statusreport.cpp
DEPENDS
searchcore_proton_metrics
)
diff --git a/searchcore/src/vespa/searchcore/proton/common/feeddebugger.cpp b/searchcore/src/vespa/searchcore/proton/common/feeddebugger.cpp
index 48ba7207281..1c082ed9ffe 100644
--- a/searchcore/src/vespa/searchcore/proton/common/feeddebugger.cpp
+++ b/searchcore/src/vespa/searchcore/proton/common/feeddebugger.cpp
@@ -41,6 +41,8 @@ FeedDebugger::FeedDebugger() :
_enableDebugging = ! (_debugLidList.empty() && _debugDocIdList.empty());
}
+FeedDebugger::~FeedDebugger() {}
+
ns_log::Logger::LogLevel
FeedDebugger::getDebugDebuggerInternal(uint32_t lid, const document::DocumentId * docid) const
{
diff --git a/searchcore/src/vespa/searchcore/proton/common/feeddebugger.h b/searchcore/src/vespa/searchcore/proton/common/feeddebugger.h
index 9068cda0d98..4120ecf5c62 100644
--- a/searchcore/src/vespa/searchcore/proton/common/feeddebugger.h
+++ b/searchcore/src/vespa/searchcore/proton/common/feeddebugger.h
@@ -12,6 +12,7 @@ class FeedDebugger
{
public:
FeedDebugger();
+ ~FeedDebugger();
bool isDebugging() const { return _enableDebugging; }
ns_log::Logger::LogLevel getDebugLevel(uint32_t lid, const document::DocumentId & docid) const {
return getDebugLevel(lid, & docid);
diff --git a/searchcore/src/vespa/searchcore/proton/common/handlermap.hpp b/searchcore/src/vespa/searchcore/proton/common/handlermap.hpp
index 9f16976aad3..341a4d77f95 100644
--- a/searchcore/src/vespa/searchcore/proton/common/handlermap.hpp
+++ b/searchcore/src/vespa/searchcore/proton/common/handlermap.hpp
@@ -1,13 +1,13 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
-#include <map>
+#include <vespa/searchcore/proton/common/doctypename.h>
#include <vespa/vespalib/util/exceptions.h>
#include <vespa/vespalib/util/sync.h>
#include <vespa/vespalib/util/sequence.h>
#include <vespa/vespalib/stllike/string.h>
#include <vespa/vespalib/stllike/hash_map.h>
-#include <vespa/searchcore/proton/common/doctypename.h>
+#include <map>
namespace proton {
@@ -42,17 +42,16 @@ public:
public:
typedef std::unique_ptr<Snapshot> UP;
- Snapshot(StdMap &map) : _handlers(), _offset(0)
- {
+ Snapshot(StdMap &map) : _handlers(), _offset(0) {
_handlers.reserve(map.size());
for (MapIterator pos = map.begin(); pos != map.end(); ++pos) {
_handlers.push_back(pos->second);
}
}
- virtual bool valid() const { return (_offset < _handlers.size()); }
- virtual T *get() const { return _handlers[_offset].get(); }
+ bool valid() const override { return (_offset < _handlers.size()); }
+ T *get() const override { return _handlers[_offset].get(); }
HandlerSP getSP() const { return _handlers[_offset]; }
- virtual void next() { ++_offset; }
+ void next() override { ++_offset; }
};
/**
diff --git a/searchcore/src/vespa/searchcore/proton/common/statusreport.h b/searchcore/src/vespa/searchcore/proton/common/statusreport.h
index b41d6bd14e0..15a08fc475e 100644
--- a/searchcore/src/vespa/searchcore/proton/common/statusreport.h
+++ b/searchcore/src/vespa/searchcore/proton/common/statusreport.h
@@ -32,14 +32,8 @@ public:
float _progress;
vespalib::string _message;
- Params(const vespalib::string &component)
- : _component(component),
- _state(DOWN),
- _internalState(),
- _internalConfigState(),
- _progress(std::numeric_limits<float>::quiet_NaN()),
- _message()
- {}
+ Params(const vespalib::string &component);
+ ~Params();
Params &state(State value) {
_state = value;
return *this;
@@ -71,14 +65,8 @@ private:
vespalib::string _message;
public:
- StatusReport(const Params &params)
- : _component(params._component),
- _state(params._state),
- _internalState(params._internalState),
- _internalConfigState(params._internalConfigState),
- _progress(params._progress),
- _message(params._message)
- {}
+ StatusReport(const Params &params);
+ ~StatusReport();
static StatusReport::UP create(const Params &params) {
return StatusReport::UP(new StatusReport(params));
@@ -122,9 +110,6 @@ public:
};
-
-
-
/**
* A StatusProducer is able to produce a list of StatusReport objects
* when needed.
diff --git a/searchcore/src/vespa/searchcore/proton/docsummary/documentstoreadapter.cpp b/searchcore/src/vespa/searchcore/proton/docsummary/documentstoreadapter.cpp
index 3b4a72eb4fd..edcd51aa6aa 100644
--- a/searchcore/src/vespa/searchcore/proton/docsummary/documentstoreadapter.cpp
+++ b/searchcore/src/vespa/searchcore/proton/docsummary/documentstoreadapter.cpp
@@ -159,7 +159,6 @@ DocumentStoreAdapter::convertFromSearchDoc(Document &doc, uint32_t docId)
}
}
-
DocumentStoreAdapter::
DocumentStoreAdapter(const search::IDocumentStore & docStore,
const DocumentTypeRepo &repo,
@@ -180,6 +179,8 @@ DocumentStoreAdapter(const search::IDocumentStore & docStore,
{
}
+DocumentStoreAdapter::~DocumentStoreAdapter() {}
+
DocsumStoreValue
DocumentStoreAdapter::getMappedDocsum(uint32_t docId)
{
diff --git a/searchcore/src/vespa/searchcore/proton/docsummary/documentstoreadapter.h b/searchcore/src/vespa/searchcore/proton/docsummary/documentstoreadapter.h
index 26c6b7683fc..d885f18bfe5 100644
--- a/searchcore/src/vespa/searchcore/proton/docsummary/documentstoreadapter.h
+++ b/searchcore/src/vespa/searchcore/proton/docsummary/documentstoreadapter.h
@@ -2,12 +2,12 @@
#pragma once
-#include <vespa/document/fieldvalue/document.h>
-#include <vespa/searchlib/docstore/idocumentstore.h>
+#include "fieldcache.h"
#include <vespa/searchsummary/docsummary/docsumstore.h>
#include <vespa/searchsummary/docsummary/resultconfig.h>
#include <vespa/searchsummary/docsummary/resultpacker.h>
-#include "fieldcache.h"
+#include <vespa/document/fieldvalue/document.h>
+#include <vespa/searchlib/docstore/idocumentstore.h>
namespace proton {
@@ -41,6 +41,7 @@ public:
const vespalib::string &resultClassName,
const FieldCache::CSP &fieldCache,
const std::set<vespalib::string> &markupFields);
+ ~DocumentStoreAdapter();
const search::docsummary::ResultClass *getResultClass() const {
return _resultClass;
diff --git a/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastorecontext.cpp b/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastorecontext.cpp
index f672aca63d5..68b33438642 100644
--- a/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastorecontext.cpp
+++ b/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastorecontext.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.documentmetastore.documentmetastorecontext");
#include "documentmetastorecontext.h"
namespace proton {
@@ -31,12 +28,12 @@ DocumentMetaStoreContext::DocumentMetaStoreContext(const search::AttributeVector
{
}
+DocumentMetaStoreContext::~DocumentMetaStoreContext() {}
+
void
DocumentMetaStoreContext::constructFreeList(void)
{
_metaStore->constructFreeList();
}
-
}
-
diff --git a/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastorecontext.h b/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastorecontext.h
index 7116673d570..4e77b7982f2 100644
--- a/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastorecontext.h
+++ b/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastorecontext.h
@@ -38,7 +38,7 @@ public:
const search::GrowStrategy &grow = search::GrowStrategy(),
const DocumentMetaStore::IGidCompare::SP &gidCompare =
DocumentMetaStore::IGidCompare::SP(new DocumentMetaStore::DefaultGidCompare));
-
+ ~DocumentMetaStoreContext();
/**
* Create a new context with the given document meta store encapsulated
* as an attribute vector.
diff --git a/searchcore/src/vespa/searchcore/proton/index/index_writer.cpp b/searchcore/src/vespa/searchcore/proton/index/index_writer.cpp
index b3b5e470301..942e0a80a6f 100644
--- a/searchcore/src/vespa/searchcore/proton/index/index_writer.cpp
+++ b/searchcore/src/vespa/searchcore/proton/index/index_writer.cpp
@@ -1,10 +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.server.indexadapter");
#include "index_writer.h"
-#include <vespa/document/fieldvalue/document.h>
+
+#include <vespa/log/log.h>
+LOG_SETUP(".proton.server.indexadapter");
using document::Document;
using document::FieldValue;
@@ -16,6 +15,8 @@ IndexWriter::IndexWriter(const IIndexManager::SP &mgr)
{
}
+IndexWriter::~IndexWriter() {}
+
bool
IndexWriter::ignoreOperation(search::SerialNum serialNum) const {
return (serialNum <= _mgr->getFlushedSerialNum());
diff --git a/searchcore/src/vespa/searchcore/proton/index/index_writer.h b/searchcore/src/vespa/searchcore/proton/index/index_writer.h
index c5dce9948ca..acf6f62a325 100644
--- a/searchcore/src/vespa/searchcore/proton/index/index_writer.h
+++ b/searchcore/src/vespa/searchcore/proton/index/index_writer.h
@@ -15,7 +15,7 @@ private:
public:
IndexWriter(const IIndexManager::SP &mgr);
-
+ ~IndexWriter();
/**
* Implements IIndexWriter.
*/
diff --git a/searchcore/src/vespa/searchcore/proton/matchengine/matchengine.h b/searchcore/src/vespa/searchcore/proton/matchengine/matchengine.h
index 6e812f61a7b..64d039d9442 100644
--- a/searchcore/src/vespa/searchcore/proton/matchengine/matchengine.h
+++ b/searchcore/src/vespa/searchcore/proton/matchengine/matchengine.h
@@ -1,10 +1,10 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
+#include "imatchhandler.h"
#include <vespa/searchcore/proton/common/doctypename.h>
#include <vespa/searchcore/proton/common/handlermap.hpp>
#include <vespa/searchcore/proton/common/statusreport.h>
-#include <vespa/searchcore/proton/matchengine/imatchhandler.h>
#include <vespa/searchlib/engine/searchapi.h>
#include <vespa/vespalib/net/state_explorer.h>
#include <vespa/vespalib/util/threadstackexecutor.h>
diff --git a/searchcore/src/vespa/searchcore/proton/matching/attribute_limiter.cpp b/searchcore/src/vespa/searchcore/proton/matching/attribute_limiter.cpp
index 950db02d193..7ef71eb8385 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/attribute_limiter.cpp
+++ b/searchcore/src/vespa/searchcore/proton/matching/attribute_limiter.cpp
@@ -35,6 +35,8 @@ AttributeLimiter::AttributeLimiter(Searchable &searchable_attributes,
{
}
+AttributeLimiter::~AttributeLimiter() {}
+
namespace {
vespalib::string STRICT_STR("strict");
diff --git a/searchcore/src/vespa/searchcore/proton/matching/attribute_limiter.h b/searchcore/src/vespa/searchcore/proton/matching/attribute_limiter.h
index 10e8de9ebbc..b536d48c45e 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/attribute_limiter.h
+++ b/searchcore/src/vespa/searchcore/proton/matching/attribute_limiter.h
@@ -31,6 +31,7 @@ public:
const vespalib::string &diversity_attribute,
double diversityCutoffFactor,
DiversityCutoffStrategy diversityCutoffStrategy);
+ ~AttributeLimiter();
search::queryeval::SearchIterator::UP create_search(size_t want_hits, size_t max_group_size, bool strictSearch);
bool was_used() const { return ((!_match_datas.empty()) || (_blueprint.get() != nullptr)); }
ssize_t getEstimatedHits() const { return _estimatedHits; }
diff --git a/searchcore/src/vespa/searchcore/proton/matching/docid_range_scheduler.cpp b/searchcore/src/vespa/searchcore/proton/matching/docid_range_scheduler.cpp
index fa617f57f53..1010d8be620 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/docid_range_scheduler.cpp
+++ b/searchcore/src/vespa/searchcore/proton/matching/docid_range_scheduler.cpp
@@ -113,6 +113,8 @@ AdaptiveDocidRangeScheduler::AdaptiveDocidRangeScheduler(size_t num_threads, uin
}
}
+AdaptiveDocidRangeScheduler::~AdaptiveDocidRangeScheduler() {}
+
DocidRange
AdaptiveDocidRangeScheduler::first_range(size_t thread_id)
{
diff --git a/searchcore/src/vespa/searchcore/proton/matching/docid_range_scheduler.h b/searchcore/src/vespa/searchcore/proton/matching/docid_range_scheduler.h
index bdd0053025e..f64a4be4d33 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/docid_range_scheduler.h
+++ b/searchcore/src/vespa/searchcore/proton/matching/docid_range_scheduler.h
@@ -3,12 +3,12 @@
#pragma once
#include <vespa/searchlib/queryeval/begin_and_end_id.h>
+#include <vespa/fastos/dynamiclibrary.h>
#include <mutex>
#include <condition_variable>
#include <atomic>
#include <algorithm>
#include <vector>
-#include <vespa/fastos/dynamiclibrary.h>
namespace proton {
namespace matching {
@@ -195,6 +195,7 @@ private:
VESPA_DLL_LOCAL DocidRange finalize(const Guard &guard, size_t thread_id);
public:
AdaptiveDocidRangeScheduler(size_t num_threads, uint32_t min_task, uint32_t docid_limit);
+ ~AdaptiveDocidRangeScheduler();
DocidRange first_range(size_t thread_id) override;
DocidRange next_range(size_t thread_id) override;
DocidRange total_span(size_t) const override { return _splitter.full_range(); }
diff --git a/searchcore/src/vespa/searchcore/proton/matching/fakesearchcontext.cpp b/searchcore/src/vespa/searchcore/proton/matching/fakesearchcontext.cpp
index 29043874ba8..690c001eab5 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/fakesearchcontext.cpp
+++ b/searchcore/src/vespa/searchcore/proton/matching/fakesearchcontext.cpp
@@ -5,5 +5,16 @@
namespace proton {
namespace matching {
+FakeSearchContext::FakeSearchContext(size_t initialNumDocs)
+ : _clock(),
+ _doom(_clock, -1),
+ _selector(new search::FixedSourceSelector(0, "fs", initialNumDocs)),
+ _indexes(new IndexCollection(_selector)),
+ _attrSearchable(),
+ _docIdLimit(initialNumDocs)
+{}
+
+FakeSearchContext::~FakeSearchContext() {}
+
} // namespace matching
} // namespace proton
diff --git a/searchcore/src/vespa/searchcore/proton/matching/fakesearchcontext.h b/searchcore/src/vespa/searchcore/proton/matching/fakesearchcontext.h
index cebc837887c..081e4a50f18 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/fakesearchcontext.h
+++ b/searchcore/src/vespa/searchcore/proton/matching/fakesearchcontext.h
@@ -31,13 +31,8 @@ private:
uint32_t _docIdLimit;
public:
- FakeSearchContext(size_t initialNumDocs=0)
- : _clock(),
- _doom(_clock, -1),
- _selector(new search::FixedSourceSelector(0, "fs", initialNumDocs)),
- _indexes(new IndexCollection(_selector)),
- _attrSearchable(),
- _docIdLimit(initialNumDocs) {}
+ FakeSearchContext(size_t initialNumDocs=0);
+ ~FakeSearchContext();
FakeSearchContext &addIdx(uint32_t id) {
_indexes->append(id, IndexSearchable::SP(new FakeIndexSearchable()));
diff --git a/searchcore/src/vespa/searchcore/proton/matching/matcher.cpp b/searchcore/src/vespa/searchcore/proton/matching/matcher.cpp
index 22bfc8428b0..11d08a06bc7 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/matcher.cpp
+++ b/searchcore/src/vespa/searchcore/proton/matching/matcher.cpp
@@ -288,7 +288,7 @@ Matcher::match(const SearchRequest &request,
coverage.setSoonActive(metaStore.getNumActiveLids());
coverage.setCovered(std::min(static_cast<size_t>(metaStore.getNumActiveLids()),
(estimate * metaStore.getNumActiveLids())/metaStore.getCommittedDocIdLimit()));
- LOG(debug, "numThreadsPerSearch = %d. Configured = %d, estimated hits=%d, totalHits=%ld",
+ LOG(debug, "numThreadsPerSearch = %zu. Configured = %d, estimated hits=%d, totalHits=%ld",
numThreadsPerSearch, _rankSetup->getNumThreadsPerSearch(), mtf->estimate().estHits, reply->totalHitCount);
}
total_matching_time.stop();
diff --git a/searchcore/src/vespa/searchcore/proton/matching/partial_result.cpp b/searchcore/src/vespa/searchcore/proton/matching/partial_result.cpp
index c560f84ada3..68de3469457 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/partial_result.cpp
+++ b/searchcore/src/vespa/searchcore/proton/matching/partial_result.cpp
@@ -113,6 +113,8 @@ PartialResult::PartialResult(size_t maxSize_in, bool hasSortData_in)
}
}
+PartialResult::~PartialResult() {}
+
void
PartialResult::merge(Source &rhs)
{
diff --git a/searchcore/src/vespa/searchcore/proton/matching/partial_result.h b/searchcore/src/vespa/searchcore/proton/matching/partial_result.h
index fb8245b1477..750ce1667a4 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/partial_result.h
+++ b/searchcore/src/vespa/searchcore/proton/matching/partial_result.h
@@ -29,6 +29,7 @@ private:
public:
PartialResult(size_t maxSize_in, bool hasSortData_in);
+ ~PartialResult();
size_t size() const { return _hits.size(); }
size_t maxSize() const { return _maxSize; }
size_t totalHits() const { return _totalHits; }
diff --git a/searchcore/src/vespa/searchcore/proton/matching/query.cpp b/searchcore/src/vespa/searchcore/proton/matching/query.cpp
index ffe4cf98991..8574770352c 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/query.cpp
+++ b/searchcore/src/vespa/searchcore/proton/matching/query.cpp
@@ -79,6 +79,8 @@ void AddLocationNode(const string &location_str, Node::UP &query_tree, Location
}
} // namespace
+Query::~Query() {}
+
bool
Query::buildTree(const vespalib::stringref &stack, const string &location,
const ViewResolver &resolver, const IIndexEnvironment &indexEnv)
diff --git a/searchcore/src/vespa/searchcore/proton/matching/query.h b/searchcore/src/vespa/searchcore/proton/matching/query.h
index c94354ce99f..aa9ee52d82c 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/query.h
+++ b/searchcore/src/vespa/searchcore/proton/matching/query.h
@@ -26,6 +26,7 @@ private:
Blueprint::UP _blackListBlueprint;
public:
+ ~Query();
/**
* Build query tree from a stack dump.
*
diff --git a/searchcore/src/vespa/searchcore/proton/matching/ranking_constants.cpp b/searchcore/src/vespa/searchcore/proton/matching/ranking_constants.cpp
index 894f36ef144..4900f89e28c 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/ranking_constants.cpp
+++ b/searchcore/src/vespa/searchcore/proton/matching/ranking_constants.cpp
@@ -14,6 +14,8 @@ RankingConstants::Constant::Constant(const vespalib::string &name_in,
{
}
+RankingConstants::Constant::~Constant() {}
+
bool
RankingConstants::Constant::operator==(const Constant &rhs) const
{
@@ -27,6 +29,8 @@ RankingConstants::RankingConstants()
{
}
+RankingConstants::~RankingConstants() {}
+
RankingConstants::RankingConstants(const Vector &constants)
: _constants()
{
diff --git a/searchcore/src/vespa/searchcore/proton/matching/ranking_constants.h b/searchcore/src/vespa/searchcore/proton/matching/ranking_constants.h
index 86498e3b6f3..9ae0d768bb1 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/ranking_constants.h
+++ b/searchcore/src/vespa/searchcore/proton/matching/ranking_constants.h
@@ -22,6 +22,7 @@ public:
Constant(const vespalib::string &name_in,
const vespalib::string &type_in,
const vespalib::string &filePath_in);
+ ~Constant();
bool operator==(const Constant &rhs) const;
};
@@ -35,6 +36,7 @@ public:
using SP = std::shared_ptr<RankingConstants>;
RankingConstants();
RankingConstants(const Vector &constants);
+ ~RankingConstants();
bool operator==(const RankingConstants &rhs) const;
const Constant *getConstant(const vespalib::string &name) const;
size_t size() const { return _constants.size(); }
diff --git a/searchcore/src/vespa/searchcore/proton/metrics/documentdb_job_trackers.cpp b/searchcore/src/vespa/searchcore/proton/metrics/documentdb_job_trackers.cpp
index a95c0d24dfc..ce6152fe464 100644
--- a/searchcore/src/vespa/searchcore/proton/metrics/documentdb_job_trackers.cpp
+++ b/searchcore/src/vespa/searchcore/proton/metrics/documentdb_job_trackers.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.metrics.documentdb_job_trackers");
#include "documentdb_job_trackers.h"
#include "job_tracked_flush_target.h"
+#include <vespa/log/log.h>
+LOG_SETUP(".proton.metrics.documentdb_job_trackers");
+
using searchcorespi::IFlushTarget;
typedef IFlushTarget::Type FTT;
typedef IFlushTarget::Component FTC;
@@ -28,6 +28,8 @@ DocumentDBJobTrackers::DocumentDBJobTrackers()
{
}
+DocumentDBJobTrackers::~DocumentDBJobTrackers() {}
+
namespace {
IFlushTarget::SP
diff --git a/searchcore/src/vespa/searchcore/proton/metrics/documentdb_job_trackers.h b/searchcore/src/vespa/searchcore/proton/metrics/documentdb_job_trackers.h
index 17514f6ac4a..f7bb708e344 100644
--- a/searchcore/src/vespa/searchcore/proton/metrics/documentdb_job_trackers.h
+++ b/searchcore/src/vespa/searchcore/proton/metrics/documentdb_job_trackers.h
@@ -3,7 +3,6 @@
#include "documentdb_tagged_metrics.h"
#include "job_tracker.h"
-#include <vespa/fastos/timestamp.h>
#include <vespa/searchcorespi/flush/iflushtarget.h>
#include <vespa/vespalib/util/sync.h>
#include <chrono>
@@ -32,6 +31,7 @@ private:
public:
DocumentDBJobTrackers();
+ ~DocumentDBJobTrackers();
IJobTracker &getAttributeFlush() { return *_attributeFlush; }
IJobTracker &getMemoryIndexFlush() { return *_memoryIndexFlush; }
diff --git a/searchcore/src/vespa/searchcore/proton/metrics/i_job_tracker.h b/searchcore/src/vespa/searchcore/proton/metrics/i_job_tracker.h
index b3f8c215bf1..e78ac152422 100644
--- a/searchcore/src/vespa/searchcore/proton/metrics/i_job_tracker.h
+++ b/searchcore/src/vespa/searchcore/proton/metrics/i_job_tracker.h
@@ -2,6 +2,8 @@
#pragma once
+#include <memory>
+
namespace proton {
/**
diff --git a/searchcore/src/vespa/searchcore/proton/metrics/job_tracked_flush_target.cpp b/searchcore/src/vespa/searchcore/proton/metrics/job_tracked_flush_target.cpp
index 8ed767da162..e5fc03bae76 100644
--- a/searchcore/src/vespa/searchcore/proton/metrics/job_tracked_flush_target.cpp
+++ b/searchcore/src/vespa/searchcore/proton/metrics/job_tracked_flush_target.cpp
@@ -1,11 +1,7 @@
// 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.metrics.job_tracked_flush_target");
#include "job_tracked_flush_target.h"
#include "job_tracked_flush_task.h"
-#include <memory>
using searchcorespi::IFlushTarget;
using searchcorespi::FlushTask;
@@ -20,6 +16,8 @@ JobTrackedFlushTarget::JobTrackedFlushTarget(const IJobTracker::SP &tracker,
{
}
+JobTrackedFlushTarget::~JobTrackedFlushTarget() {}
+
FlushTask::UP
JobTrackedFlushTarget::initFlush(SerialNum currentSerial)
{
diff --git a/searchcore/src/vespa/searchcore/proton/metrics/job_tracked_flush_target.h b/searchcore/src/vespa/searchcore/proton/metrics/job_tracked_flush_target.h
index 59df279739b..4c37277817c 100644
--- a/searchcore/src/vespa/searchcore/proton/metrics/job_tracked_flush_target.h
+++ b/searchcore/src/vespa/searchcore/proton/metrics/job_tracked_flush_target.h
@@ -19,6 +19,7 @@ private:
public:
JobTrackedFlushTarget(const IJobTracker::SP &tracker,
const searchcorespi::IFlushTarget::SP &target);
+ ~JobTrackedFlushTarget();
const IJobTracker &getTracker() const { return *_tracker; }
const searchcorespi::IFlushTarget &getTarget() const { return *_target; }
diff --git a/searchcore/src/vespa/searchcore/proton/persistenceengine/document_iterator.cpp b/searchcore/src/vespa/searchcore/proton/persistenceengine/document_iterator.cpp
index 818bb13c21a..9df67a6bf11 100644
--- a/searchcore/src/vespa/searchcore/proton/persistenceengine/document_iterator.cpp
+++ b/searchcore/src/vespa/searchcore/proton/persistenceengine/document_iterator.cpp
@@ -90,6 +90,8 @@ DocumentIterator::DocumentIterator(const storage::spi::Bucket &bucket,
{
}
+DocumentIterator::~DocumentIterator() {}
+
void
DocumentIterator::add(const IDocumentRetriever::SP &retriever)
{
diff --git a/searchcore/src/vespa/searchcore/proton/persistenceengine/document_iterator.h b/searchcore/src/vespa/searchcore/proton/persistenceengine/document_iterator.h
index 48388c758df..9c212b1f5f2 100644
--- a/searchcore/src/vespa/searchcore/proton/persistenceengine/document_iterator.h
+++ b/searchcore/src/vespa/searchcore/proton/persistenceengine/document_iterator.h
@@ -2,13 +2,13 @@
#pragma once
-#include <vespa/persistence/spi/bucket.h>
-#include <vespa/persistence/spi/selection.h>
-#include <vespa/persistence/spi/result.h>
#include "i_document_retriever.h"
-#include <vespa/searchlib/common/idocumentmetastore.h>
#include <vespa/searchcore/proton/common/cachedselect.h>
#include <vespa/searchcore/proton/common/selectcontext.h>
+#include <vespa/searchlib/common/idocumentmetastore.h>
+#include <vespa/persistence/spi/bucket.h>
+#include <vespa/persistence/spi/selection.h>
+#include <vespa/persistence/spi/result.h>
#include <vespa/persistence/spi/read_consistency.h>
namespace proton {
@@ -45,6 +45,7 @@ public:
ssize_t defaultSerializedSize,
bool ignoreMaxBytes,
ReadConsistency readConsistency=ReadConsistency::STRONG);
+ ~DocumentIterator();
void add(const IDocumentRetriever::SP &retriever);
storage::spi::IterateResult iterate(size_t maxBytes);
};
diff --git a/searchcore/src/vespa/searchcore/proton/server/data_directory_upgrader.cpp b/searchcore/src/vespa/searchcore/proton/server/data_directory_upgrader.cpp
index d33845f2b0f..3238f67353c 100644
--- a/searchcore/src/vespa/searchcore/proton/server/data_directory_upgrader.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/data_directory_upgrader.cpp
@@ -5,7 +5,6 @@
#include <vespa/vespalib/io/fileutil.h>
#include <vespa/vespalib/stllike/asciistream.h>
#include <vespa/vespalib/util/exceptions.h>
-#include <algorithm>
#include <iostream>
#include <sys/stat.h>
@@ -123,6 +122,8 @@ DataDirectoryUpgrader::DataDirectoryUpgrader(const vespalib::string &scanDir,
{
}
+DataDirectoryUpgrader::~DataDirectoryUpgrader() {}
+
DataDirectoryUpgrader::ScanResult
DataDirectoryUpgrader::scan() const
{
diff --git a/searchcore/src/vespa/searchcore/proton/server/data_directory_upgrader.h b/searchcore/src/vespa/searchcore/proton/server/data_directory_upgrader.h
index ccb4bc45eb9..66963dd8f19 100644
--- a/searchcore/src/vespa/searchcore/proton/server/data_directory_upgrader.h
+++ b/searchcore/src/vespa/searchcore/proton/server/data_directory_upgrader.h
@@ -72,6 +72,7 @@ private:
public:
DataDirectoryUpgrader(const vespalib::string &scanDir, const vespalib::string &destDir);
+ ~DataDirectoryUpgrader();
ScanResult scan() const;
UpgradeResult upgrade(const ScanResult &scanResult) const;
};
diff --git a/searchcore/src/vespa/searchcore/proton/server/document_db_explorer.cpp b/searchcore/src/vespa/searchcore/proton/server/document_db_explorer.cpp
index b47a21fcb9b..e950bd9e0bc 100644
--- a/searchcore/src/vespa/searchcore/proton/server/document_db_explorer.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/document_db_explorer.cpp
@@ -20,6 +20,8 @@ DocumentDBExplorer::DocumentDBExplorer(const DocumentDB::SP &docDb)
{
}
+DocumentDBExplorer::~DocumentDBExplorer() {}
+
void
DocumentDBExplorer::get_state(const Inserter &inserter, bool full) const
{
diff --git a/searchcore/src/vespa/searchcore/proton/server/document_db_explorer.h b/searchcore/src/vespa/searchcore/proton/server/document_db_explorer.h
index a888c6df8c8..65007d42506 100644
--- a/searchcore/src/vespa/searchcore/proton/server/document_db_explorer.h
+++ b/searchcore/src/vespa/searchcore/proton/server/document_db_explorer.h
@@ -17,6 +17,7 @@ private:
public:
DocumentDBExplorer(const DocumentDB::SP &docDb);
+ ~DocumentDBExplorer();
// Implements vespalib::StateExplorer
virtual void get_state(const vespalib::slime::Inserter &inserter, bool full) const override;
diff --git a/searchcore/src/vespa/searchcore/proton/test/bucketstatecalculator.h b/searchcore/src/vespa/searchcore/proton/test/bucketstatecalculator.h
index 90b290b06cd..281c814fc77 100644
--- a/searchcore/src/vespa/searchcore/proton/test/bucketstatecalculator.h
+++ b/searchcore/src/vespa/searchcore/proton/test/bucketstatecalculator.h
@@ -1,12 +1,10 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
-#include <vespa/document/bucket/bucketid.h>
#include <vespa/searchcore/proton/server/ibucketstatecalculator.h>
+#include <vespa/document/bucket/bucketid.h>
-namespace proton {
-
-namespace test {
+namespace proton::test {
typedef document::BucketId::List BucketIdVector;
typedef std::set<document::BucketId> BucketIdSet;
@@ -62,25 +60,10 @@ public:
return _ready.count(bucket) == 1;
}
- bool clusterUp() const override {
- return _clusterUp;
- }
-
- bool nodeUp() const override {
- return _nodeUp;
- }
-
- bool nodeRetired() const override {
- return _nodeRetired;
- }
-
- bool nodeInitializing() const override {
- return false;
- }
+ bool clusterUp() const override { return _clusterUp; }
+ bool nodeUp() const override { return _nodeUp; }
+ bool nodeRetired() const override { return _nodeRetired; }
+ bool nodeInitializing() const override { return false; }
};
-
-} // namespace test
-
-} // namespace proton
-
+}
diff --git a/searchcore/src/vespa/searchcore/proton/test/documentdb_config_builder.cpp b/searchcore/src/vespa/searchcore/proton/test/documentdb_config_builder.cpp
index 14ed502cdc1..4f09382d411 100644
--- a/searchcore/src/vespa/searchcore/proton/test/documentdb_config_builder.cpp
+++ b/searchcore/src/vespa/searchcore/proton/test/documentdb_config_builder.cpp
@@ -70,6 +70,8 @@ DocumentDBConfigBuilder::DocumentDBConfigBuilder(const DocumentDBConfig &cfg)
{
}
+DocumentDBConfigBuilder::~DocumentDBConfigBuilder() {}
+
DocumentDBConfig::SP
DocumentDBConfigBuilder::build()
{
diff --git a/searchcore/src/vespa/searchcore/proton/test/documentdb_config_builder.h b/searchcore/src/vespa/searchcore/proton/test/documentdb_config_builder.h
index c0ae34f1d66..6c2ae4bc20a 100644
--- a/searchcore/src/vespa/searchcore/proton/test/documentdb_config_builder.h
+++ b/searchcore/src/vespa/searchcore/proton/test/documentdb_config_builder.h
@@ -35,6 +35,7 @@ public:
const search::index::Schema::SP &schema,
const vespalib::string &configId,
const vespalib::string &docTypeName);
+ ~DocumentDBConfigBuilder();
DocumentDBConfigBuilder(const DocumentDBConfig &cfg);
diff --git a/searchcore/src/vespa/searchcore/proton/test/dummy_document_store.h b/searchcore/src/vespa/searchcore/proton/test/dummy_document_store.h
index 94c644778e5..b219c3a43be 100644
--- a/searchcore/src/vespa/searchcore/proton/test/dummy_document_store.h
+++ b/searchcore/src/vespa/searchcore/proton/test/dummy_document_store.h
@@ -4,9 +4,7 @@
#include <vespa/searchlib/docstore/cachestats.h>
#include <vespa/searchlib/docstore/idocumentstore.h>
-namespace proton {
-
-namespace test {
+namespace proton::test {
struct DummyDocumentStore : public search::IDocumentStore
{
@@ -18,35 +16,36 @@ struct DummyDocumentStore : public search::IDocumentStore
DummyDocumentStore(const vespalib::string &baseDir)
: _baseDir(baseDir)
{}
+ ~DummyDocumentStore() {}
virtual document::Document::UP read(search::DocumentIdT,
- const document::DocumentTypeRepo &) const {
+ const document::DocumentTypeRepo &) const override {
return document::Document::UP();
}
- virtual void write(uint64_t, const document::Document &, search::DocumentIdT) {}
- virtual void remove(uint64_t, search::DocumentIdT) {}
- virtual void flush(uint64_t) {}
- virtual uint64_t initFlush(uint64_t) { return 0; }
- virtual void compact(uint64_t) {}
- virtual uint64_t lastSyncToken() const { return 0; }
+ virtual void write(uint64_t, const document::Document &, search::DocumentIdT) override {}
+ virtual void remove(uint64_t, search::DocumentIdT) override {}
+ virtual void flush(uint64_t) override {}
+ virtual uint64_t initFlush(uint64_t) override { return 0; }
+ virtual void compact(uint64_t) override {}
+ virtual uint64_t lastSyncToken() const override { return 0; }
virtual uint64_t tentativeLastSyncToken() const override { return 0; }
- virtual fastos::TimeStamp getLastFlushTime() const { return fastos::TimeStamp(); }
- virtual uint64_t nextId() const { return 0; }
- virtual size_t memoryUsed() const { return 0; }
- virtual size_t memoryMeta() const { return 0; }
- virtual size_t getDiskFootprint() const { return 0; }
- virtual size_t getDiskBloat() const { return 0; }
- virtual size_t getMaxCompactGain() const { return getDiskBloat(); }
- virtual search::CacheStats getCacheStats() const { return search::CacheStats(); }
- virtual const vespalib::string &getBaseDir() const { return _baseDir; }
+ virtual fastos::TimeStamp getLastFlushTime() const override { return fastos::TimeStamp(); }
+ virtual uint64_t nextId() const override { return 0; }
+ virtual size_t memoryUsed() const override { return 0; }
+ virtual size_t memoryMeta() const override { return 0; }
+ virtual size_t getDiskFootprint() const override { return 0; }
+ virtual size_t getDiskBloat() const override { return 0; }
+ virtual size_t getMaxCompactGain() const override { return getDiskBloat(); }
+ virtual search::CacheStats getCacheStats() const override { return search::CacheStats(); }
+ virtual const vespalib::string &getBaseDir() const override { return _baseDir; }
virtual void accept(search::IDocumentStoreReadVisitor &,
search::IDocumentStoreVisitorProgress &,
- const document::DocumentTypeRepo &) {}
+ const document::DocumentTypeRepo &) override {}
virtual void accept(search::IDocumentStoreRewriteVisitor &,
search::IDocumentStoreVisitorProgress &,
- const document::DocumentTypeRepo &) {}
+ const document::DocumentTypeRepo &) override {}
- virtual double getVisitCost() const { return 1.0; }
+ virtual double getVisitCost() const override { return 1.0; }
virtual search::DataStoreStorageStats getStorageStats() const override {
return search::DataStoreStorageStats(0, 0, 0.0, 0, 0);
}
@@ -61,7 +60,4 @@ struct DummyDocumentStore : public search::IDocumentStore
virtual void shrinkLidSpace() override {}
};
-} // namespace test
-
-} // namespace proton
-
+}
diff --git a/searchcore/src/vespa/searchcore/proton/test/dummy_document_sub_db.h b/searchcore/src/vespa/searchcore/proton/test/dummy_document_sub_db.h
index 3a3fc00e6f0..3f3797e2b31 100644
--- a/searchcore/src/vespa/searchcore/proton/test/dummy_document_sub_db.h
+++ b/searchcore/src/vespa/searchcore/proton/test/dummy_document_sub_db.h
@@ -40,6 +40,7 @@ struct DummyDocumentSubDb : public IDocumentSubDB
_writeService(std::make_unique<ExecutorThreadingService>(1))
{
}
+ ~DummyDocumentSubDb() {}
void close() override { }
uint32_t getSubDbId() const override { return _subDbId; }
vespalib::string getName() const override { return "dummysubdb"; }
diff --git a/searchcore/src/vespa/searchcore/proton/test/dummy_summary_manager.h b/searchcore/src/vespa/searchcore/proton/test/dummy_summary_manager.h
index e0b478b7de0..4d75efe3ba8 100644
--- a/searchcore/src/vespa/searchcore/proton/test/dummy_summary_manager.h
+++ b/searchcore/src/vespa/searchcore/proton/test/dummy_summary_manager.h
@@ -14,7 +14,7 @@ struct DummySummaryManager : public ISummaryManager
const vespa::config::search::SummarymapConfig &,
const vespa::config::search::summary::JuniperrcConfig &,
const document::DocumentTypeRepo::SP &,
- const std::shared_ptr<search::IAttributeManager> &) {
+ const std::shared_ptr<search::IAttributeManager> &) override {
return ISummarySetup::SP();
}
};
diff --git a/searchcore/src/vespa/searchcore/proton/test/executor_observer.h b/searchcore/src/vespa/searchcore/proton/test/executor_observer.h
index e68f32a14c1..57ebd972cb7 100644
--- a/searchcore/src/vespa/searchcore/proton/test/executor_observer.h
+++ b/searchcore/src/vespa/searchcore/proton/test/executor_observer.h
@@ -21,7 +21,7 @@ public:
uint32_t getExecuteCnt() const { return _executeCnt; }
// Implements vespalib::Executor
- virtual Task::UP execute(Task::UP task) {
+ virtual Task::UP execute(Task::UP task) override {
++_executeCnt;
return _executor.execute(std::move(task));
}
diff --git a/searchcore/src/vespa/searchcore/proton/test/resulthandler.h b/searchcore/src/vespa/searchcore/proton/test/resulthandler.h
index 59c407d2bfa..2f3fec8496a 100644
--- a/searchcore/src/vespa/searchcore/proton/test/resulthandler.h
+++ b/searchcore/src/vespa/searchcore/proton/test/resulthandler.h
@@ -12,7 +12,7 @@ class GenericResultHandler : public IGenericResultHandler
private:
std::unique_ptr<storage::spi::Result> _result;
public:
- virtual void handle(const storage::spi::Result &result) {
+ void handle(const storage::spi::Result &result) override {
_result.reset(new storage::spi::Result(result));
}
bool valid() const { return _result.get() != NULL; }
@@ -25,7 +25,7 @@ class BucketInfoResultHandler : public IBucketInfoResultHandler
private:
std::unique_ptr<storage::spi::BucketInfoResult> _result;
public:
- virtual void handle(const storage::spi::BucketInfoResult &result) {
+ void handle(const storage::spi::BucketInfoResult &result) override {
_result.reset(new storage::spi::BucketInfoResult(result));
}
bool valid() const { return _result.get() != NULL; }
@@ -39,7 +39,7 @@ class BucketIdListResultHandler : public IBucketIdListResultHandler
private:
std::unique_ptr<storage::spi::BucketIdListResult> _result;
public:
- virtual void handle(const storage::spi::BucketIdListResult &result) {
+ void handle(const storage::spi::BucketIdListResult &result) override {
_result.reset(new storage::spi::BucketIdListResult(result));
}
bool valid() const { return _result.get() != NULL; }
diff --git a/searchcore/src/vespa/searchcore/proton/test/simple_job_tracker.h b/searchcore/src/vespa/searchcore/proton/test/simple_job_tracker.h
index aad61a9024c..9de8be3594f 100644
--- a/searchcore/src/vespa/searchcore/proton/test/simple_job_tracker.h
+++ b/searchcore/src/vespa/searchcore/proton/test/simple_job_tracker.h
@@ -18,8 +18,8 @@ struct SimpleJobTracker : public IJobTracker
{}
// Implements IJobTracker
- virtual void start() { _started.countDown(); }
- virtual void end() { _ended.countDown(); }
+ void start() override { _started.countDown(); }
+ void end() override { _ended.countDown(); }
};
} // namespace test
diff --git a/searchcore/src/vespa/searchcore/proton/test/thread_service_observer.h b/searchcore/src/vespa/searchcore/proton/test/thread_service_observer.h
index f81026aaed7..f1c42cd53a8 100644
--- a/searchcore/src/vespa/searchcore/proton/test/thread_service_observer.h
+++ b/searchcore/src/vespa/searchcore/proton/test/thread_service_observer.h
@@ -24,18 +24,18 @@ public:
/**
* Implements IThreadService
*/
- virtual vespalib::Executor::Task::UP execute(vespalib::Executor::Task::UP task) {
+ virtual vespalib::Executor::Task::UP execute(vespalib::Executor::Task::UP task) override {
++_executeCnt;
return _service.execute(std::move(task));
}
- virtual void run(vespalib::Runnable &runnable) {
+ virtual void run(vespalib::Runnable &runnable) override {
_service.run(runnable);
}
- virtual vespalib::Syncable &sync() {
+ virtual vespalib::Syncable &sync() override {
_service.sync();
return *this;
}
- virtual bool isCurrentThread() const {
+ virtual bool isCurrentThread() const override {
return _service.isCurrentThread();
}
};
diff --git a/searchcore/src/vespa/searchcore/proton/test/threading_service_observer.h b/searchcore/src/vespa/searchcore/proton/test/threading_service_observer.h
index 88a224447c6..c3b4b842200 100644
--- a/searchcore/src/vespa/searchcore/proton/test/threading_service_observer.h
+++ b/searchcore/src/vespa/searchcore/proton/test/threading_service_observer.h
@@ -55,30 +55,27 @@ public:
/**
* Implements vespalib::Syncable
*/
- virtual vespalib::Syncable &sync() {
+ virtual vespalib::Syncable &sync() override {
return _service.sync();
}
/**
* Implements IThreadingService
*/
- virtual searchcorespi::index::IThreadService &master() {
+ virtual searchcorespi::index::IThreadService &master() override {
return _master;
}
- virtual searchcorespi::index::IThreadService &index() {
+ virtual searchcorespi::index::IThreadService &index() override {
return _index;
}
- virtual search::ISequencedTaskExecutor &indexFieldInverter()
- {
+ virtual search::ISequencedTaskExecutor &indexFieldInverter() override {
return _indexFieldInverter;
}
- virtual search::ISequencedTaskExecutor &indexFieldWriter()
- {
+ virtual search::ISequencedTaskExecutor &indexFieldWriter() override {
return _indexFieldWriter;
}
- virtual search::ISequencedTaskExecutor &attributeFieldWriter()
- {
+ virtual search::ISequencedTaskExecutor &attributeFieldWriter() override {
return _attributeFieldWriter;
}
};
diff --git a/searchcore/src/vespa/searchcore/proton/test/userdocumentsbuilder.cpp b/searchcore/src/vespa/searchcore/proton/test/userdocumentsbuilder.cpp
index 71f5f21038b..b8a4ef7d4ed 100644
--- a/searchcore/src/vespa/searchcore/proton/test/userdocumentsbuilder.cpp
+++ b/searchcore/src/vespa/searchcore/proton/test/userdocumentsbuilder.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.test.userdocumentsbuilder");
#include "userdocumentsbuilder.h"
-namespace proton {
-
-namespace test {
+namespace proton::test {
UserDocumentsBuilder::UserDocumentsBuilder()
: _schema(),
@@ -16,6 +11,7 @@ UserDocumentsBuilder::UserDocumentsBuilder()
{
}
+UserDocumentsBuilder::~UserDocumentsBuilder() {}
UserDocumentsBuilder &
UserDocumentsBuilder::createDoc(uint32_t userId, search::DocumentIdT lid)
@@ -38,6 +34,4 @@ UserDocumentsBuilder::createDocs(uint32_t userId,
return *this;
}
-} // namespace test
-
-} // namespace proton
+}
diff --git a/searchcore/src/vespa/searchcore/proton/test/userdocumentsbuilder.h b/searchcore/src/vespa/searchcore/proton/test/userdocumentsbuilder.h
index 7c795c69580..84452150862 100644
--- a/searchcore/src/vespa/searchcore/proton/test/userdocumentsbuilder.h
+++ b/searchcore/src/vespa/searchcore/proton/test/userdocumentsbuilder.h
@@ -5,9 +5,7 @@
#include <vespa/searchlib/index/docbuilder.h>
#include <vespa/vespalib/util/stringfmt.h>
-namespace proton {
-
-namespace test {
+namespace proton::test {
/**
* Builder for creating documents for a set of users.
@@ -20,6 +18,7 @@ private:
UserDocuments _docs;
public:
UserDocumentsBuilder();
+ ~UserDocumentsBuilder();
const document::DocumentTypeRepo::SP &getRepo() const {
return _builder.getDocumentTypeRepo();
}
@@ -34,7 +33,4 @@ public:
};
-} // namespace test
-
-} // namespace proton
-
+}