summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2022-05-15 00:36:44 +0200
committerGitHub <noreply@github.com>2022-05-15 00:36:44 +0200
commit5914c04edb130b689cf3d6c18fb606a63f90974b (patch)
tree3a9dfff58b98898e2e28c0337925f4f04e5eaeb0
parent9cd4da2c34cb9b7b60cd90fb8a5ed3669349c5d1 (diff)
parent362aac34294b41a08e137a7657c5d501c8c17b99 (diff)
Merge pull request #22603 from vespa-engine/balder/gc-unused-code-and-dependencies
GC unused code and dependencies
-rw-r--r--persistence/CMakeLists.txt5
-rw-r--r--persistencetypes/CMakeLists.txt5
-rw-r--r--searchsummary/CMakeLists.txt6
-rw-r--r--searchsummary/src/vespa/searchsummary/docsummary/juniperproperties.cpp12
-rw-r--r--searchsummary/src/vespa/searchsummary/docsummary/juniperproperties.h12
-rw-r--r--vdslib/src/vespa/vdslib/distribution/distribution.h2
-rw-r--r--vsm/src/vespa/vsm/vsm/vsm-adapter.cpp12
7 files changed, 7 insertions, 47 deletions
diff --git a/persistence/CMakeLists.txt b/persistence/CMakeLists.txt
index 48a1265f81d..cf94ba3bb52 100644
--- a/persistence/CMakeLists.txt
+++ b/persistence/CMakeLists.txt
@@ -4,14 +4,9 @@ vespa_define_module(
fastos
vespalog
vespalib
- staging_vespalib
- fnet
document
persistencetypes
- config_cloudconfig
vdslib
- metrics
- configdefinitions
LIBS
src/vespa/persistence
diff --git a/persistencetypes/CMakeLists.txt b/persistencetypes/CMakeLists.txt
index a41f8eb6661..80ecf7a845b 100644
--- a/persistencetypes/CMakeLists.txt
+++ b/persistencetypes/CMakeLists.txt
@@ -1,12 +1,7 @@
# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
vespa_define_module(
DEPENDS
- fastos
- vespalog
vespalib
- staging_vespalib
- fnet
- config_cloudconfig
document
LIBS
diff --git a/searchsummary/CMakeLists.txt b/searchsummary/CMakeLists.txt
index ac392c6582c..0a5c7ed4c99 100644
--- a/searchsummary/CMakeLists.txt
+++ b/searchsummary/CMakeLists.txt
@@ -1,18 +1,12 @@
# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
vespa_define_module(
DEPENDS
- fastos
vespalog
vespalib
- staging_vespalib
- fnet
configdefinitions
fastlib_fast
document
- config_cloudconfig
searchcommon
- persistencetypes
- metrics
searchlib
juniper
diff --git a/searchsummary/src/vespa/searchsummary/docsummary/juniperproperties.cpp b/searchsummary/src/vespa/searchsummary/docsummary/juniperproperties.cpp
index cef0ba5793b..cf3def60f4e 100644
--- a/searchsummary/src/vespa/searchsummary/docsummary/juniperproperties.cpp
+++ b/searchsummary/src/vespa/searchsummary/docsummary/juniperproperties.cpp
@@ -1,7 +1,6 @@
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "juniperproperties.h"
-#include <vespa/searchcommon/config/subscriptionproxyng.h>
#include <vespa/vespalib/util/stringfmt.h>
using vespa::config::search::summary::JuniperrcConfig;
@@ -22,9 +21,7 @@ JuniperProperties::JuniperProperties(const JuniperrcConfig &cfg) :
configure(cfg);
}
-JuniperProperties::~JuniperProperties() {
- // empty
-}
+JuniperProperties::~JuniperProperties() = default;
void
JuniperProperties::reset()
@@ -87,13 +84,6 @@ JuniperProperties::configure(const JuniperrcConfig &cfg)
}
}
-void
-JuniperProperties::subscribe(const char *configId)
-{
- SubscriptionProxyNg<JuniperProperties, JuniperrcConfig> subscriber(*this, &JuniperProperties::configure);
- subscriber.subscribe(configId);
-}
-
const char *
JuniperProperties::GetProperty(const char *name, const char *def)
{
diff --git a/searchsummary/src/vespa/searchsummary/docsummary/juniperproperties.h b/searchsummary/src/vespa/searchsummary/docsummary/juniperproperties.h
index 856d564acc6..6b1613b6c07 100644
--- a/searchsummary/src/vespa/searchsummary/docsummary/juniperproperties.h
+++ b/searchsummary/src/vespa/searchsummary/docsummary/juniperproperties.h
@@ -34,16 +34,6 @@ public:
virtual ~JuniperProperties();
/**
- * This method subscribes to config from the given configuration id. This does the necessary mapping from
- * user-friendly configuration parameters to juniper specific properties. Note that no exceptions thrown by the
- * configuration framework are caught in this method. Please refer to the config framework for details on what to
- * expect.
- *
- * @param configId The config id to subscribe to.
- */
- void subscribe(const char *configId);
-
- /**
* Implements configure callback for config subscription.
*
* @param cfg The configuration object.
@@ -51,7 +41,7 @@ public:
void configure(const vespa::config::search::summary::JuniperrcConfig &cfg);
// Inherit doc from IJuniperProperties.
- const char *GetProperty(const char *name, const char *def = NULL) override;
+ const char *GetProperty(const char *name, const char *def) override;
};
}
diff --git a/vdslib/src/vespa/vdslib/distribution/distribution.h b/vdslib/src/vespa/vdslib/distribution/distribution.h
index c09d8400b3a..7b4f0b742e2 100644
--- a/vdslib/src/vespa/vdslib/distribution/distribution.h
+++ b/vdslib/src/vespa/vdslib/distribution/distribution.h
@@ -8,8 +8,8 @@
#pragma once
+#include "group.h"
#include <vespa/document/bucket/bucketid.h>
-#include <vespa/vdslib/distribution/group.h>
#include <vespa/vdslib/state/nodetype.h>
#include <vespa/vespalib/util/exception.h>
diff --git a/vsm/src/vespa/vsm/vsm/vsm-adapter.cpp b/vsm/src/vespa/vsm/vsm/vsm-adapter.cpp
index 09594832c4a..5507532d4f3 100644
--- a/vsm/src/vespa/vsm/vsm/vsm-adapter.cpp
+++ b/vsm/src/vespa/vsm/vsm/vsm-adapter.cpp
@@ -147,18 +147,14 @@ VSMAdapter::configure(const VSMConfigSnapshot & snapshot)
LOG(debug, "index highlight spec: '%s'", spec.c_str());
// create dynamic docsum writer
- std::unique_ptr<DynamicDocsumWriter>
- writer(new DynamicDocsumWriter(resCfg.release(), kwExtractor.release()));
+ auto writer = std::make_unique<DynamicDocsumWriter>(resCfg.release(), kwExtractor.release());
// configure juniper (used when configuring DynamicDocsumConfig)
- std::unique_ptr<juniper::Juniper> juniper;
- {
- _juniperProps.reset(new JuniperProperties(*juniperrc));
- juniper.reset(new juniper::Juniper(_juniperProps.get(), &_wordFolder));
- }
+ _juniperProps = std::make_unique<JuniperProperties>(*juniperrc);
+ auto juniper = std::make_unique<juniper::Juniper>(_juniperProps.get(), &_wordFolder);
// create new docsum tools
- std::unique_ptr<DocsumTools> docsumTools(new DocsumTools(std::move(writer)));
+ auto docsumTools = std::make_unique<DocsumTools>(std::move(writer));
docsumTools->setJuniper(std::move(juniper));
// configure dynamic docsum writer