summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@broadpark.no>2019-02-08 18:50:50 +0100
committerTor Egge <Tor.Egge@broadpark.no>2019-02-08 18:50:50 +0100
commit429d871df49ab9479a7e6c431a2fa44577a29024 (patch)
tree6b51c8a9cafc024fc2f39dd64a01d1f8993e4152
parent63cd60257711b02a435a92fa0cc3c2fb7b976d9b (diff)
Eliminate some clang warnings in searchcore.
-rw-r--r--searchcore/src/apps/vespa-gen-testdocs/vespa-gen-testdocs.cpp4
-rw-r--r--searchcore/src/tests/proton/documentdb/job_tracked_maintenance_job/job_tracked_maintenance_job_test.cpp2
-rw-r--r--searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp4
-rw-r--r--searchcore/src/tests/proton/documentmetastore/documentmetastore_test.cpp4
-rw-r--r--searchcore/src/tests/proton/feed_and_search/feed_and_search.cpp1
-rw-r--r--searchcore/src/tests/proton/flushengine/flushengine_test.cpp4
-rw-r--r--searchcore/src/tests/proton/matching/matching_test.cpp3
-rw-r--r--searchcore/src/tests/proton/matching/query_test.cpp6
-rw-r--r--searchcore/src/tests/proton/server/memory_flush_config_updater/memory_flush_config_updater_test.cpp10
-rw-r--r--searchcore/src/tests/proton/summaryengine/summaryengine.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/common/hw_info_sampler.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/flushengine/flushengine.cpp4
-rw-r--r--searchcore/src/vespa/searchcore/proton/flushengine/flushtask.h1
-rw-r--r--searchcore/src/vespa/searchcore/proton/matchengine/matchengine.h2
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/matcher.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/persistenceengine/persistence_handler_map.cpp3
-rw-r--r--searchcore/src/vespa/searchcore/proton/reference/dummy_gid_to_lid_change_handler.h2
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/documentdb_metrics_updater.cpp5
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/documentdb_metrics_updater.h1
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.cpp1
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/fast_access_doc_subdb.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/feedhandler.cpp3
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/feedhandler.h1
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/maintenance_jobs_injector.cpp9
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/proton.cpp6
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/proton.h2
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/searchabledocsubdb.cpp1
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/searchabledocsubdb.h1
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/storeonlydocsubdb.cpp3
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/storeonlydocsubdb.h1
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/storeonlyfeedview.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/test/document_meta_store_observer.h2
32 files changed, 35 insertions, 61 deletions
diff --git a/searchcore/src/apps/vespa-gen-testdocs/vespa-gen-testdocs.cpp b/searchcore/src/apps/vespa-gen-testdocs/vespa-gen-testdocs.cpp
index e6b7b34903b..ede3f8256af 100644
--- a/searchcore/src/apps/vespa-gen-testdocs/vespa-gen-testdocs.cpp
+++ b/searchcore/src/apps/vespa-gen-testdocs/vespa-gen-testdocs.cpp
@@ -350,7 +350,6 @@ RandTextFieldGenerator::generateValue(vespalib::asciistream &doc, uint32_t)
class ModTextFieldGenerator : public FieldGenerator
{
- search::Rand48 &_rnd;
std::vector<uint32_t> _mods;
public:
@@ -363,10 +362,9 @@ public:
ModTextFieldGenerator::ModTextFieldGenerator(const string &name,
- search::Rand48 &rnd,
+ [[maybe_unused]] search::Rand48 &rnd,
const std::vector<uint32_t> &mods)
: FieldGenerator(name),
- _rnd(rnd),
_mods(mods)
{
}
diff --git a/searchcore/src/tests/proton/documentdb/job_tracked_maintenance_job/job_tracked_maintenance_job_test.cpp b/searchcore/src/tests/proton/documentdb/job_tracked_maintenance_job/job_tracked_maintenance_job_test.cpp
index c1626e94809..8c1ad7bf551 100644
--- a/searchcore/src/tests/proton/documentdb/job_tracked_maintenance_job/job_tracked_maintenance_job_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/job_tracked_maintenance_job/job_tracked_maintenance_job_test.cpp
@@ -22,7 +22,7 @@ getGateVector(size_t size)
{
GateVector retval;
for (size_t i = 0; i < size; ++i) {
- retval.push_back(std::move(GateUP(new Gate())));
+ retval.push_back(GateUP(new Gate()));
}
return retval;
}
diff --git a/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp b/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp
index 4a3ced6891c..c3974368e54 100644
--- a/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp
@@ -1003,7 +1003,6 @@ TEST_F("require that bucket move controller is active",
f._builder.createDocs(3, 1, 3); // 2 docs
f._builder.createDocs(4, 3, 6); // 3 docs
test::UserDocuments notReadyDocs(f._builder.getDocs());
- BucketId bucketId3(notReadyDocs.getBucket(3));
BucketId bucketId4(notReadyDocs.getBucket(4));
f.insertDocs(notReadyDocs, f._notReady);
f._builder.clearDocs();
@@ -1053,15 +1052,12 @@ TEST_F("require that document pruner is active",
f._builder.createDocs(1, 1, 4); // 3 docs
f._builder.createDocs(2, 4, 6); // 2 docs
test::UserDocuments keepDocs(f._builder.getDocs());
- BucketId bucketId1(keepDocs.getBucket(1));
- BucketId bucketId2(keepDocs.getBucket(2));
f.removeDocs(keepDocs, keepTime);
f._builder.clearDocs();
f._builder.createDocs(3, 6, 8); // 2 docs
f._builder.createDocs(4, 8, 11); // 3 docs
test::UserDocuments removeDocs(f._builder.getDocs());
BucketId bucketId3(removeDocs.getBucket(3));
- BucketId bucketId4(removeDocs.getBucket(4));
f.removeDocs(removeDocs, remTime);
f.notifyClusterStateChanged();
EXPECT_TRUE(f._executor.isIdle());
diff --git a/searchcore/src/tests/proton/documentmetastore/documentmetastore_test.cpp b/searchcore/src/tests/proton/documentmetastore/documentmetastore_test.cpp
index bbe6db7733e..d436c63ae2e 100644
--- a/searchcore/src/tests/proton/documentmetastore/documentmetastore_test.cpp
+++ b/searchcore/src/tests/proton/documentmetastore/documentmetastore_test.cpp
@@ -709,10 +709,10 @@ TEST("requireThatWeCanPutAndRemoveBeforeFreeListConstruct")
EXPECT_EQUAL(2u, dms.getNumUsedLids());
EXPECT_EQUAL(5u, dms.getNumDocs());
// gid1 already there with lid 1
- EXPECT_EXCEPTION(!dms.put(gid1, bucketId1, time1, docSize1, 2).ok(),
+ EXPECT_EXCEPTION(dms.put(gid1, bucketId1, time1, docSize1, 2).ok(),
vespalib::IllegalStateException,
"gid found, but using another lid");
- EXPECT_EXCEPTION(!dms.put(gid5, bucketId5, time5, docSize5, 1).ok(),
+ EXPECT_EXCEPTION(dms.put(gid5, bucketId5, time5, docSize5, 1).ok(),
vespalib::IllegalStateException,
"gid not found, but lid is used by another gid");
EXPECT_TRUE(assertLid(1, gid1, dms));
diff --git a/searchcore/src/tests/proton/feed_and_search/feed_and_search.cpp b/searchcore/src/tests/proton/feed_and_search/feed_and_search.cpp
index e851e30a31d..18d4fbdb6d7 100644
--- a/searchcore/src/tests/proton/feed_and_search/feed_and_search.cpp
+++ b/searchcore/src/tests/proton/feed_and_search/feed_and_search.cpp
@@ -91,7 +91,6 @@ const string word1 = "foo";
const string word2 = "bar";
const DocumentIdT doc_id1 = 1;
const DocumentIdT doc_id2 = 2;
-const uint32_t field_id = 1;
Schema getSchema() {
Schema schema;
diff --git a/searchcore/src/tests/proton/flushengine/flushengine_test.cpp b/searchcore/src/tests/proton/flushengine/flushengine_test.cpp
index f668072b9fd..96092625979 100644
--- a/searchcore/src/tests/proton/flushengine/flushengine_test.cpp
+++ b/searchcore/src/tests/proton/flushengine/flushengine_test.cpp
@@ -108,7 +108,7 @@ public:
return std::make_unique<WrappedFlushTask>(std::move(task),
_handler);
}
- return std::move(task);
+ return task;
}
};
@@ -160,7 +160,7 @@ public:
wrappedTargets.push_back(std::make_shared<WrappedFlushTarget>
(target, *this));
}
- return std::move(wrappedTargets);
+ return wrappedTargets;
}
// Called once by flush engine slave thread for each task done
diff --git a/searchcore/src/tests/proton/matching/matching_test.cpp b/searchcore/src/tests/proton/matching/matching_test.cpp
index 7c6779fdc63..2a29847a634 100644
--- a/searchcore/src/tests/proton/matching/matching_test.cpp
+++ b/searchcore/src/tests/proton/matching/matching_test.cpp
@@ -185,10 +185,9 @@ struct MyWorld {
for (uint32_t i = 0; i < NUM_DOCS; ++i) {
document::DocumentId docId(vespalib::make_string("doc::%u", i));
const document::GlobalId &gid = docId.getGlobalId();
- typedef DocumentMetaStore::Result PutRes;
document::BucketId bucketId(BucketFactory::getBucketId(docId));
uint32_t docSize = 1;
- PutRes putRes(metaStore.put(gid, bucketId, Timestamp(0u), docSize, i));
+ metaStore.put(gid, bucketId, Timestamp(0u), docSize, i);
metaStore.setBucketState(bucketId, true);
}
}
diff --git a/searchcore/src/tests/proton/matching/query_test.cpp b/searchcore/src/tests/proton/matching/query_test.cpp
index 82aab72068d..8ecf6fd4a43 100644
--- a/searchcore/src/tests/proton/matching/query_test.cpp
+++ b/searchcore/src/tests/proton/matching/query_test.cpp
@@ -802,7 +802,8 @@ void Test::requireThatWeakAndBlueprintsAreCreatedCorrectly() {
wand.append(Node::UP(new ProtonStringTerm("foo", field, 0, Weight(3))));
wand.append(Node::UP(new ProtonStringTerm("bar", field, 0, Weight(7))));
- ResolveViewVisitor resolve_visitor(ViewResolver(), plain_index_env);
+ ViewResolver viewResolver;
+ ResolveViewVisitor resolve_visitor(viewResolver, plain_index_env);
wand.accept(resolve_visitor);
FakeRequestContext requestContext;
@@ -834,7 +835,8 @@ void Test::requireThatParallelWandBlueprintsAreCreatedCorrectly() {
wand.append(Node::UP(new ProtonStringTerm("foo", field, 0, Weight(3))));
wand.append(Node::UP(new ProtonStringTerm("bar", field, 0, Weight(7))));
- ResolveViewVisitor resolve_visitor(ViewResolver(), attribute_index_env);
+ ViewResolver viewResolver;
+ ResolveViewVisitor resolve_visitor(viewResolver, attribute_index_env);
wand.accept(resolve_visitor);
FakeRequestContext requestContext;
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 b3a7f5f525e..716b369d928 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
@@ -89,13 +89,13 @@ TEST_F("require that strategy is updated with conservative max tls size value if
TEST_F("require that strategy is updated with conservative max memory value if memory limit is reached", Fixture)
{
f.notifyDiskMemUsage(belowLimit(), aboveLimit());
- TEST_DO(f.assertStrategyConfig(2, 0.5, 20));
+ TEST_DO(f.assertStrategyConfig(2, 0, 20));
}
TEST_F("require that strategy is updated with all conservative values if both limits are reached", Fixture)
{
f.notifyDiskMemUsage(aboveLimit(), aboveLimit());
- TEST_DO(f.assertStrategyConfig(2, 0.5, 12));
+ TEST_DO(f.assertStrategyConfig(2, 0, 12));
}
TEST_F("require that last disk/memory usage state is remembered when setting new config", Fixture)
@@ -129,11 +129,11 @@ TEST_F("require that we must go below low watermark for disk usage before using
TEST_F("require that we must go below low watermark for memory usage before using normal max memory value again", Fixture)
{
f.notifyDiskMemUsage(belowLimit(), ResourceUsageState(0.7, 0.8));
- TEST_DO(f.assertStrategyConfig(2, 0.5, 20));
+ TEST_DO(f.assertStrategyConfig(2, 0, 20));
f.notifyDiskMemUsage(belowLimit(), ResourceUsageState(0.7, 0.7));
- TEST_DO(f.assertStrategyConfig(2, 0.5, 20));
+ TEST_DO(f.assertStrategyConfig(2, 0, 20));
f.notifyDiskMemUsage(belowLimit(), ResourceUsageState(0.7, 0.56));
- TEST_DO(f.assertStrategyConfig(2, 0.5, 20));
+ TEST_DO(f.assertStrategyConfig(2, 0, 20));
f.notifyDiskMemUsage(belowLimit(), ResourceUsageState(0.7, 0.55));
TEST_DO(f.assertStrategyConfig(4, 1, 20));
f.notifyDiskMemUsage(belowLimit(), ResourceUsageState(0.7, 0.6));
diff --git a/searchcore/src/tests/proton/summaryengine/summaryengine.cpp b/searchcore/src/tests/proton/summaryengine/summaryengine.cpp
index 56596ec5bb6..23ef86a46b7 100644
--- a/searchcore/src/tests/proton/summaryengine/summaryengine.cpp
+++ b/searchcore/src/tests/proton/summaryengine/summaryengine.cpp
@@ -254,7 +254,7 @@ createSlimeRequestLarger(size_t num,
array.addData(Memory(GID1, 12));
array.addData(Memory(GID2, 12));
}
- return std::move(r);
+ return r;
}
Slime
diff --git a/searchcore/src/vespa/searchcore/proton/common/hw_info_sampler.cpp b/searchcore/src/vespa/searchcore/proton/common/hw_info_sampler.cpp
index c94a3048298..1492a34b241 100644
--- a/searchcore/src/vespa/searchcore/proton/common/hw_info_sampler.cpp
+++ b/searchcore/src/vespa/searchcore/proton/common/hw_info_sampler.cpp
@@ -60,7 +60,7 @@ std::unique_ptr<HwinfoConfig> readConfig(const vespalib::string &path) {
ConfigSubscriber s(spec);
std::unique_ptr<ConfigHandle<HwinfoConfig>> handle = s.subscribe<HwinfoConfig>("hwinfo");
s.nextConfig(0);
- return std::move(handle->getConfig());
+ return handle->getConfig();
}
diff --git a/searchcore/src/vespa/searchcore/proton/flushengine/flushengine.cpp b/searchcore/src/vespa/searchcore/proton/flushengine/flushengine.cpp
index f7e0b7981bb..ed56599b6fe 100644
--- a/searchcore/src/vespa/searchcore/proton/flushengine/flushengine.cpp
+++ b/searchcore/src/vespa/searchcore/proton/flushengine/flushengine.cpp
@@ -377,7 +377,7 @@ FlushEngine::putFlushHandler(const DocTypeName &docTypeName, const IFlushHandler
_pendingPrune.erase(result);
}
_pendingPrune.insert(flushHandler);
- return std::move(result);
+ return result;
}
IFlushHandler::SP
@@ -386,7 +386,7 @@ FlushEngine::removeFlushHandler(const DocTypeName &docTypeName)
std::lock_guard<std::mutex> guard(_lock);
IFlushHandler::SP result(_handlers.removeHandler(docTypeName));
_pendingPrune.erase(result);
- return std::move(result);
+ return result;
}
FlushEngine::FlushMetaSet
diff --git a/searchcore/src/vespa/searchcore/proton/flushengine/flushtask.h b/searchcore/src/vespa/searchcore/proton/flushengine/flushtask.h
index 1a7d3cf9ff6..7860acaab41 100644
--- a/searchcore/src/vespa/searchcore/proton/flushengine/flushtask.h
+++ b/searchcore/src/vespa/searchcore/proton/flushengine/flushtask.h
@@ -15,7 +15,6 @@ private:
uint32_t _taskId;
FlushEngine &_engine;
FlushContext::SP _context;
- search::SerialNum _serial;
public:
FlushTask(const FlushTask &) = delete;
diff --git a/searchcore/src/vespa/searchcore/proton/matchengine/matchengine.h b/searchcore/src/vespa/searchcore/proton/matchengine/matchengine.h
index e23a734fc2f..896ac83403a 100644
--- a/searchcore/src/vespa/searchcore/proton/matchengine/matchengine.h
+++ b/searchcore/src/vespa/searchcore/proton/matchengine/matchengine.h
@@ -23,9 +23,7 @@ private:
HandlerMap<ISearchHandler> _handlers;
vespalib::ThreadStackExecutor _executor;
vespalib::SimpleThreadBundle::Pool _threadBundlePool;
- bool _online;
bool _nodeUp;
- bool _inService;
public:
/**
diff --git a/searchcore/src/vespa/searchcore/proton/matching/matcher.cpp b/searchcore/src/vespa/searchcore/proton/matching/matcher.cpp
index b32af7e3e5a..100f3eff0e7 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/matcher.cpp
+++ b/searchcore/src/vespa/searchcore/proton/matching/matcher.cpp
@@ -150,7 +150,7 @@ Matcher::getStats()
{
std::lock_guard<std::mutex> guard(_statsLock);
MatchingStats stats = std::move(_stats);
- _stats = std::move(MatchingStats());
+ _stats = MatchingStats();
_stats.softDoomFactor(stats.softDoomFactor());
return stats;
}
diff --git a/searchcore/src/vespa/searchcore/proton/persistenceengine/persistence_handler_map.cpp b/searchcore/src/vespa/searchcore/proton/persistenceengine/persistence_handler_map.cpp
index feea15ddadd..06969167ab3 100644
--- a/searchcore/src/vespa/searchcore/proton/persistenceengine/persistence_handler_map.cpp
+++ b/searchcore/src/vespa/searchcore/proton/persistenceengine/persistence_handler_map.cpp
@@ -51,9 +51,10 @@ PersistenceHandlerMap::getHandlerSnapshot() const
handlers.push_back(handlerItr.second);
}
}
+ size_t handlersSize = handlers.size();
return std::make_unique<HandlerSnapshot>
(std::make_unique<DocTypeToHandlerMap::Snapshot>(std::move(handlers)),
- handlers.size());
+ handlersSize);
}
namespace {
diff --git a/searchcore/src/vespa/searchcore/proton/reference/dummy_gid_to_lid_change_handler.h b/searchcore/src/vespa/searchcore/proton/reference/dummy_gid_to_lid_change_handler.h
index 494edec78fc..4e5a0389add 100644
--- a/searchcore/src/vespa/searchcore/proton/reference/dummy_gid_to_lid_change_handler.h
+++ b/searchcore/src/vespa/searchcore/proton/reference/dummy_gid_to_lid_change_handler.h
@@ -18,8 +18,6 @@ namespace proton {
*/
class DummyGidToLidChangeHandler : public IGidToLidChangeHandler
{
- bool _closed;
-
public:
DummyGidToLidChangeHandler();
virtual ~DummyGidToLidChangeHandler();
diff --git a/searchcore/src/vespa/searchcore/proton/server/documentdb_metrics_updater.cpp b/searchcore/src/vespa/searchcore/proton/server/documentdb_metrics_updater.cpp
index e01fb048266..c673f615f25 100644
--- a/searchcore/src/vespa/searchcore/proton/server/documentdb_metrics_updater.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/documentdb_metrics_updater.cpp
@@ -35,13 +35,12 @@ DocumentDBMetricsUpdater::DocumentDBMetricsUpdater(const DocumentSubDBCollection
DocumentDBJobTrackers &jobTrackers,
matching::SessionManager &sessionManager,
const AttributeUsageFilter &writeFilter,
- const DDBState &state)
+ [[maybe_unused]] const DDBState &state)
: _subDBs(subDBs),
_writeService(writeService),
_jobTrackers(jobTrackers),
_sessionManager(sessionManager),
- _writeFilter(writeFilter),
- _state(state)
+ _writeFilter(writeFilter)
{
}
diff --git a/searchcore/src/vespa/searchcore/proton/server/documentdb_metrics_updater.h b/searchcore/src/vespa/searchcore/proton/server/documentdb_metrics_updater.h
index 7c27b273c59..dbf4c45007f 100644
--- a/searchcore/src/vespa/searchcore/proton/server/documentdb_metrics_updater.h
+++ b/searchcore/src/vespa/searchcore/proton/server/documentdb_metrics_updater.h
@@ -34,7 +34,6 @@ private:
DocumentDBJobTrackers &_jobTrackers;
matching::SessionManager &_sessionManager;
const AttributeUsageFilter &_writeFilter;
- const DDBState &_state;
// Last updated document store cache statistics. Necessary due to metrics implementation is upside down.
DocumentStoreCacheStats _lastDocStoreCacheStats;
diff --git a/searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.cpp b/searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.cpp
index 1d1bbf21d70..82d31fbb6e6 100644
--- a/searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.cpp
@@ -227,7 +227,6 @@ DocumentDBConfigManager::update(const ConfigSnapshot &snapshot)
using RankProfilesConfigSP = DocumentDBConfig::RankProfilesConfigSP;
using RankingConstantsConfigSP = std::shared_ptr<vespa::config::search::core::RankingConstantsConfig>;
using IndexschemaConfigSP = DocumentDBConfig::IndexschemaConfigSP;
- using AttributesConfigSP = DocumentDBConfig::AttributesConfigSP;
using SummaryConfigSP = DocumentDBConfig::SummaryConfigSP;
using SummarymapConfigSP = DocumentDBConfig::SummarymapConfigSP;
using JuniperrcConfigSP = DocumentDBConfig::JuniperrcConfigSP;
diff --git a/searchcore/src/vespa/searchcore/proton/server/fast_access_doc_subdb.cpp b/searchcore/src/vespa/searchcore/proton/server/fast_access_doc_subdb.cpp
index 531873fcd19..744b5060ca5 100644
--- a/searchcore/src/vespa/searchcore/proton/server/fast_access_doc_subdb.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/fast_access_doc_subdb.cpp
@@ -33,8 +33,6 @@ namespace proton {
namespace {
-constexpr search::SerialNum ATTRIBUTE_INIT_SERIAL = 1;
-
struct AttributeGuardComp
{
vespalib::string name;
diff --git a/searchcore/src/vespa/searchcore/proton/server/feedhandler.cpp b/searchcore/src/vespa/searchcore/proton/server/feedhandler.cpp
index 97cc25e635f..a0d62f2052d 100644
--- a/searchcore/src/vespa/searchcore/proton/server/feedhandler.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/feedhandler.cpp
@@ -327,7 +327,7 @@ FeedHandler::changeFeedState(FeedState::SP newState, const std::lock_guard<std::
FeedHandler::FeedHandler(IThreadingService &writeService,
const vespalib::string &tlsSpec,
const DocTypeName &docTypeName,
- DDBState &state,
+ [[maybe_unused]] DDBState &state,
IFeedHandlerOwner &owner,
const IResourceWriteFilter &writeFilter,
IReplayConfig &replayConfig,
@@ -341,7 +341,6 @@ FeedHandler::FeedHandler(IThreadingService &writeService,
IGetSerialNum(),
_writeService(writeService),
_docTypeName(docTypeName),
- _state(state),
_owner(owner),
_writeFilter(writeFilter),
_replayConfig(replayConfig),
diff --git a/searchcore/src/vespa/searchcore/proton/server/feedhandler.h b/searchcore/src/vespa/searchcore/proton/server/feedhandler.h
index ef554a2ee3a..af06f898716 100644
--- a/searchcore/src/vespa/searchcore/proton/server/feedhandler.h
+++ b/searchcore/src/vespa/searchcore/proton/server/feedhandler.h
@@ -74,7 +74,6 @@ private:
IThreadingService &_writeService;
DocTypeName _docTypeName;
- DDBState &_state;
IFeedHandlerOwner &_owner;
const IResourceWriteFilter &_writeFilter;
IReplayConfig &_replayConfig;
diff --git a/searchcore/src/vespa/searchcore/proton/server/maintenance_jobs_injector.cpp b/searchcore/src/vespa/searchcore/proton/server/maintenance_jobs_injector.cpp
index c68d794a5e0..744ce2aa7f4 100644
--- a/searchcore/src/vespa/searchcore/proton/server/maintenance_jobs_injector.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/maintenance_jobs_injector.cpp
@@ -43,8 +43,7 @@ injectLidSpaceCompactionJobs(MaintenanceController &controller,
config.getBlockableJobConfig(),
clusterStateChangedNotifier,
(calc ? calc->nodeRetired() : false)));
- controller.registerJobInMasterThread(std::move(trackJob(tracker,
- std::move(job))));
+ controller.registerJobInMasterThread(trackJob(tracker, std::move(job)));
}
}
@@ -76,8 +75,8 @@ injectBucketMoveJob(MaintenanceController &controller,
diskMemUsageNotifier,
blockableConfig,
docTypeName, bucketSpace));
- controller.registerJobInMasterThread(std::move(trackJob(jobTrackers.getBucketMove(),
- std::move(bmj))));
+ controller.registerJobInMasterThread(trackJob(jobTrackers.getBucketMove(),
+ std::move(bmj)));
}
}
@@ -115,7 +114,7 @@ MaintenanceJobsInjector::injectJobs(MaintenanceController &controller,
MUP pruneRDjob(new PruneRemovedDocumentsJob(config.getPruneRemovedDocumentsConfig(), *mRemSubDB._metaStore,
mRemSubDB._subDbId, docTypeName, prdHandler, fbHandler));
controller.registerJobInMasterThread(
- std::move(trackJob(jobTrackers.getRemovedDocumentsPrune(), std::move(pruneRDjob))));
+ trackJob(jobTrackers.getRemovedDocumentsPrune(), std::move(pruneRDjob)));
if (!config.getLidSpaceCompactionConfig().isDisabled()) {
injectLidSpaceCompactionJobs(controller, config, lscHandlers, opStorer,
fbHandler, jobTrackers.getLidSpaceCompact(),
diff --git a/searchcore/src/vespa/searchcore/proton/server/proton.cpp b/searchcore/src/vespa/searchcore/proton/server/proton.cpp
index 3542fcc3716..978720f88ae 100644
--- a/searchcore/src/vespa/searchcore/proton/server/proton.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/proton.cpp
@@ -107,9 +107,8 @@ VESPA_THREAD_STACK_TAG(close_executor)
}
-Proton::ProtonFileHeaderContext::ProtonFileHeaderContext(const Proton &proton_, const vespalib::string &creator)
- : _proton(proton_),
- _hostName(),
+Proton::ProtonFileHeaderContext::ProtonFileHeaderContext([[maybe_unused]] const Proton &proton_, const vespalib::string &creator)
+ : _hostName(),
_creator(creator),
_cluster(),
_pid(getpid())
@@ -204,7 +203,6 @@ Proton::Proton(const config::ConfigUri & configUri,
_queryLimiter(),
_clock(0.010),
_threadPool(128 * 1024),
- _configGen(0),
_distributionKey(-1),
_isInitializing(true),
_isReplayDone(false),
diff --git a/searchcore/src/vespa/searchcore/proton/server/proton.h b/searchcore/src/vespa/searchcore/proton/server/proton.h
index 39e32c7f504..14ddcee3d5c 100644
--- a/searchcore/src/vespa/searchcore/proton/server/proton.h
+++ b/searchcore/src/vespa/searchcore/proton/server/proton.h
@@ -75,7 +75,6 @@ private:
class ProtonFileHeaderContext : public search::common::FileHeaderContext
{
- const Proton &_proton;
vespalib::string _hostName;
vespalib::string _creator;
vespalib::string _cluster;
@@ -120,7 +119,6 @@ private:
matching::QueryLimiter _queryLimiter;
vespalib::Clock _clock;
FastOS_ThreadPool _threadPool;
- int64_t _configGen;
uint32_t _distributionKey;
bool _isInitializing;
bool _isReplayDone;
diff --git a/searchcore/src/vespa/searchcore/proton/server/searchabledocsubdb.cpp b/searchcore/src/vespa/searchcore/proton/server/searchabledocsubdb.cpp
index c0c9b961ac8..7a46e0769cf 100644
--- a/searchcore/src/vespa/searchcore/proton/server/searchabledocsubdb.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/searchabledocsubdb.cpp
@@ -46,7 +46,6 @@ SearchableDocSubDB::SearchableDocSubDB(const Config &cfg, const Context &ctx)
_constantValueRepo(_constantValueCache),
_configurer(_iSummaryMgr, _rSearchView, _rFeedView, ctx._queryLimiter, _constantValueRepo, ctx._clock,
getSubDbName(), ctx._fastUpdCtx._storeOnlyCtx._owner.getDistributionKey()),
- _numSearcherThreads(cfg._numSearcherThreads),
_warmupExecutor(ctx._warmupExecutor),
_realGidToLidChangeHandler(std::make_shared<GidToLidChangeHandler>()),
_flushConfig(),
diff --git a/searchcore/src/vespa/searchcore/proton/server/searchabledocsubdb.h b/searchcore/src/vespa/searchcore/proton/server/searchabledocsubdb.h
index 52e0309dc16..e39ada31673 100644
--- a/searchcore/src/vespa/searchcore/proton/server/searchabledocsubdb.h
+++ b/searchcore/src/vespa/searchcore/proton/server/searchabledocsubdb.h
@@ -80,7 +80,6 @@ private:
vespalib::eval::ConstantValueCache _constantValueCache;
matching::ConstantValueRepo _constantValueRepo;
SearchableDocSubDBConfigurer _configurer;
- const size_t _numSearcherThreads;
vespalib::ThreadExecutor &_warmupExecutor;
std::shared_ptr<GidToLidChangeHandler> _realGidToLidChangeHandler;
DocumentDBFlushConfig _flushConfig;
diff --git a/searchcore/src/vespa/searchcore/proton/server/storeonlydocsubdb.cpp b/searchcore/src/vespa/searchcore/proton/server/storeonlydocsubdb.cpp
index 99186f89c6d..ef580cf44ce 100644
--- a/searchcore/src/vespa/searchcore/proton/server/storeonlydocsubdb.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/storeonlydocsubdb.cpp
@@ -505,12 +505,11 @@ StoreOnlyDocSubDB::getDocumentDBReference()
}
StoreOnlySubDBFileHeaderContext::
-StoreOnlySubDBFileHeaderContext(StoreOnlyDocSubDB &owner,
+StoreOnlySubDBFileHeaderContext([[maybe_unused]] StoreOnlyDocSubDB &owner,
const FileHeaderContext & parentFileHeaderContext,
const DocTypeName &docTypeName,
const vespalib::string &baseDir)
: FileHeaderContext(),
- _owner(owner),
_parentFileHeaderContext(parentFileHeaderContext),
_docTypeName(docTypeName),
_subDB()
diff --git a/searchcore/src/vespa/searchcore/proton/server/storeonlydocsubdb.h b/searchcore/src/vespa/searchcore/proton/server/storeonlydocsubdb.h
index 450779de7dd..2518ea38f82 100644
--- a/searchcore/src/vespa/searchcore/proton/server/storeonlydocsubdb.h
+++ b/searchcore/src/vespa/searchcore/proton/server/storeonlydocsubdb.h
@@ -64,7 +64,6 @@ class StoreOnlyDocSubDB;
*/
class StoreOnlySubDBFileHeaderContext : public search::common::FileHeaderContext
{
- StoreOnlyDocSubDB &_owner;
const search::common::FileHeaderContext &_parentFileHeaderContext;
const DocTypeName &_docTypeName;
vespalib::string _subDB;
diff --git a/searchcore/src/vespa/searchcore/proton/server/storeonlyfeedview.cpp b/searchcore/src/vespa/searchcore/proton/server/storeonlyfeedview.cpp
index 22ff1b90de4..59b9a655d2a 100644
--- a/searchcore/src/vespa/searchcore/proton/server/storeonlyfeedview.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/storeonlyfeedview.cpp
@@ -353,7 +353,7 @@ void StoreOnlyFeedView::putSummary(SerialNum serialNum, Lid lid,
summaryExecutor().execute(
makeLambdaTask([serialNum, lid, futureStream = std::move(futureStream), onDone, this] () mutable {
(void) onDone;
- vespalib::nbostream os = std::move(futureStream.get());
+ vespalib::nbostream os = futureStream.get();
if (!os.empty()) {
_summaryAdapter->put(serialNum, lid, os);
}
diff --git a/searchcore/src/vespa/searchcore/proton/test/document_meta_store_observer.h b/searchcore/src/vespa/searchcore/proton/test/document_meta_store_observer.h
index fa29eb33933..5cc547b4dcb 100644
--- a/searchcore/src/vespa/searchcore/proton/test/document_meta_store_observer.h
+++ b/searchcore/src/vespa/searchcore/proton/test/document_meta_store_observer.h
@@ -120,7 +120,7 @@ struct DocumentMetaStoreObserver : public IDocumentMetaStore
virtual void setBucketState(const BucketId &bucketId, bool active) override {
_store.setBucketState(bucketId, active);
}
- virtual void populateActiveBuckets(const BucketId::List &buckets) override {
+ virtual void populateActiveBuckets(const document::BucketId::List &buckets) override {
_store.populateActiveBuckets(buckets);
}