diff options
author | Jon Marius Venstad <jonmv@users.noreply.github.com> | 2022-11-28 09:52:58 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-28 09:52:58 +0100 |
commit | 174c4dd99a42c66bffd39272b59d6952f1392a05 (patch) | |
tree | 72b8aa04c76e760085592cd95f4e249a2f7775de | |
parent | e8184a0bff1d83d62c30bd6e35a908ca40909de0 (diff) | |
parent | fe8adae7b0eee9cfd59c404f0013945346b40548 (diff) |
Merge branch 'master' into balder/move-archiving-and-commons-compress-from-vespajlib
-rw-r--r-- | config-model-fat/pom.xml | 4 | ||||
-rw-r--r-- | config-model/src/main/java/com/yahoo/schema/derived/RankProfileList.java | 6 | ||||
-rw-r--r-- | config-model/src/main/java/com/yahoo/vespa/model/admin/metricsproxy/MetricsProxyContainerCluster.java | 3 | ||||
-rw-r--r-- | container-dev/pom.xml | 23 | ||||
-rw-r--r-- | docprocs/pom.xml | 4 | ||||
-rw-r--r-- | fat-model-dependencies/pom.xml | 22 | ||||
-rw-r--r-- | metrics-proxy/src/main/java/ai/vespa/metricsproxy/core/MetricsManager.java | 1 | ||||
-rw-r--r-- | metrics-proxy/src/main/java/ai/vespa/metricsproxy/metric/ExternalMetrics.java | 2 | ||||
-rw-r--r-- | searchcore/src/vespa/searchcore/config/CMakeLists.txt | 2 | ||||
-rw-r--r-- | searchcore/src/vespa/searchcore/config/fdispatchrc.def | 5 | ||||
-rw-r--r-- | searchlib/src/vespa/searchcommon/attribute/status.cpp | 4 | ||||
-rw-r--r-- | searchlib/src/vespa/searchcommon/attribute/status.h | 8 | ||||
-rw-r--r-- | tenant-base/pom.xml | 18 | ||||
-rw-r--r-- | vespaclient-java/pom.xml | 6 |
14 files changed, 40 insertions, 68 deletions
diff --git a/config-model-fat/pom.xml b/config-model-fat/pom.xml index d58bf0fc39f..05ba957e083 100644 --- a/config-model-fat/pom.xml +++ b/config-model-fat/pom.xml @@ -201,7 +201,6 @@ <i>com.google.inject:guice:jar:no_aop:*:*</i> <i>com.google.j2objc:j2objc-annotations:*:*</i> <i>com.google.protobuf:protobuf-java:*:*</i> - <i>com.microsoft.onnxruntime:onnxruntime:*:*</i> <i>com.sun.activation:javax.activation:*:*</i> <i>com.sun.xml.bind:jaxb-core:*:*</i> <i>com.sun.xml.bind:jaxb-impl:*:*</i> @@ -211,12 +210,9 @@ <i>io.prometheus:simpleclient_common:*:*</i> <i>javax.inject:javax.inject:*:*</i> <i>javax.servlet:javax.servlet-api:*:*</i> - <i>net.java.dev.jna:jna:*:*</i> <i>net.openhft:zero-allocation-hashing:*:*</i> <i>org.antlr:antlr-runtime:*:*</i> <i>org.antlr:antlr4-runtime:*:*</i> - <i>org.apache.commons:commons-exec:*:*</i> - <i>org.apache.commons:commons-math3:*:*</i> <i>org.apache.felix:org.apache.felix.framework:*:*</i> <i>org.apache.opennlp:opennlp-tools:*:*</i> <i>org.bouncycastle:bcpkix-jdk18on:*:*</i> diff --git a/config-model/src/main/java/com/yahoo/schema/derived/RankProfileList.java b/config-model/src/main/java/com/yahoo/schema/derived/RankProfileList.java index 27e6d6e57a6..c254385a96e 100644 --- a/config-model/src/main/java/com/yahoo/schema/derived/RankProfileList.java +++ b/config-model/src/main/java/com/yahoo/schema/derived/RankProfileList.java @@ -123,9 +123,13 @@ public class RankProfileList extends Derived implements RankProfilesConfig.Produ rawRankProfiles.put(rawRank.getName(), rawRank); } return rawRankProfiles; - } catch (InterruptedException | ExecutionException e) { + } catch (InterruptedException e) { throw new IllegalStateException(e); } + catch (ExecutionException e) { + throw e.getCause() instanceof IllegalArgumentException ? (IllegalArgumentException)e.getCause() + : new IllegalStateException(e); + } } private static FileDistributedConstants deriveFileDistributedConstants(Schema schema, diff --git a/config-model/src/main/java/com/yahoo/vespa/model/admin/metricsproxy/MetricsProxyContainerCluster.java b/config-model/src/main/java/com/yahoo/vespa/model/admin/metricsproxy/MetricsProxyContainerCluster.java index f7d9c2f4a0d..93b67407933 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/admin/metricsproxy/MetricsProxyContainerCluster.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/admin/metricsproxy/MetricsProxyContainerCluster.java @@ -226,8 +226,7 @@ public class MetricsProxyContainerCluster extends ContainerCluster<MetricsProxyC private Optional<Admin> getAdmin() { if (parent != null) { AbstractConfigProducerRoot r = parent.getRoot(); - if (r instanceof VespaModel) { - VespaModel model = (VespaModel) r; + if (r instanceof VespaModel model) { return Optional.ofNullable(model.getAdmin()); } } diff --git a/container-dev/pom.xml b/container-dev/pom.xml index 13ff9de57aa..1986fe6e792 100644 --- a/container-dev/pom.xml +++ b/container-dev/pom.xml @@ -84,10 +84,6 @@ <version>${project.version}</version> <exclusions> <exclusion> - <groupId>commons-lang</groupId> - <artifactId>commons-lang</artifactId> - </exclusion> - <exclusion> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpclient</artifactId> </exclusion> @@ -184,14 +180,6 @@ <artifactId>icu4j</artifactId> </exclusion> <exclusion> - <groupId>commons-collections</groupId> - <artifactId>commons-collections</artifactId> - </exclusion> - <exclusion> - <groupId>commons-lang</groupId> - <artifactId>commons-lang</artifactId> - </exclusion> - <exclusion> <groupId>org.antlr</groupId> <artifactId>antlr4-runtime</artifactId> </exclusion> @@ -240,17 +228,6 @@ Excluded artifacts should be added explicitly to the application module to make then visible in users' test classpath. --> <dependency> <groupId>com.yahoo.vespa</groupId> - <artifactId>document</artifactId> - <version>${project.version}</version> - <exclusions> - <exclusion> - <groupId>commons-collections</groupId> - <artifactId>commons-collections</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>com.yahoo.vespa</groupId> <artifactId>linguistics</artifactId> <version>${project.version}</version> <exclusions> diff --git a/docprocs/pom.xml b/docprocs/pom.xml index e001d83a00f..6d654deea44 100644 --- a/docprocs/pom.xml +++ b/docprocs/pom.xml @@ -57,10 +57,6 @@ <groupId>com.yahoo.vespa</groupId> <artifactId>annotations</artifactId> </exclusion> - <exclusion> - <groupId>commons-collections</groupId> - <artifactId>commons-collections</artifactId> - </exclusion> </exclusions> <!-- End Workaround --> diff --git a/fat-model-dependencies/pom.xml b/fat-model-dependencies/pom.xml index 9801098d5b6..cd5471e5088 100644 --- a/fat-model-dependencies/pom.xml +++ b/fat-model-dependencies/pom.xml @@ -73,6 +73,13 @@ <groupId>com.yahoo.vespa</groupId> <artifactId>model-integration</artifactId> <version>${project.version}</version> + <exclusions> + <exclusion> + <!-- OPTIMIZATION: very large (60 MB) and not needed for config generation --> + <groupId>com.microsoft.onnxruntime</groupId> + <artifactId>onnxruntime</artifactId> + </exclusion> + </exclusions> </dependency> <dependency> <groupId>com.yahoo.vespa</groupId> @@ -93,6 +100,16 @@ <groupId>com.yahoo.vespa</groupId> <artifactId>vespajlib</artifactId> <version>${project.version}</version> + <exclusions> + <exclusion> + <groupId>org.apache.commons</groupId> + <artifactId>commons-exec</artifactId> + </exclusion> + <exclusion> + <groupId>net.java.dev.jna</groupId> + <artifactId>jna</artifactId> + </exclusion> + </exclusions> </dependency> <dependency> <groupId>com.yahoo.vespa</groupId> @@ -154,6 +171,11 @@ <groupId>com.ibm.icu</groupId> <artifactId>icu4j</artifactId> </exclusion> + <exclusion> + <!-- OPTIMIZATION: large (4 MB) and only used for query dispatch TDistribution--> + <groupId>org.apache.commons</groupId> + <artifactId>commons-math3</artifactId> + </exclusion> </exclusions> </dependency> <dependency> diff --git a/metrics-proxy/src/main/java/ai/vespa/metricsproxy/core/MetricsManager.java b/metrics-proxy/src/main/java/ai/vespa/metricsproxy/core/MetricsManager.java index f9ecaa29153..67c888a8d77 100644 --- a/metrics-proxy/src/main/java/ai/vespa/metricsproxy/core/MetricsManager.java +++ b/metrics-proxy/src/main/java/ai/vespa/metricsproxy/core/MetricsManager.java @@ -23,7 +23,6 @@ import java.util.logging.Logger; import java.util.stream.Collectors; import static ai.vespa.metricsproxy.metric.ExternalMetrics.extractConfigserverDimensions; -import static ai.vespa.metricsproxy.metric.model.processing.MetricsProcessor.applyProcessors; import static java.util.logging.Level.FINE; import static java.util.stream.Collectors.toList; diff --git a/metrics-proxy/src/main/java/ai/vespa/metricsproxy/metric/ExternalMetrics.java b/metrics-proxy/src/main/java/ai/vespa/metricsproxy/metric/ExternalMetrics.java index def61006f15..0c25f31f266 100644 --- a/metrics-proxy/src/main/java/ai/vespa/metricsproxy/metric/ExternalMetrics.java +++ b/metrics-proxy/src/main/java/ai/vespa/metricsproxy/metric/ExternalMetrics.java @@ -62,7 +62,7 @@ public class ExternalMetrics { private Set<MetricId> metricsToRetain() { return consumers.getConsumersByMetric().keySet().stream() - .map(configuredMetric -> configuredMetric.id()) + .map(ConfiguredMetric::id) .collect(toCollection(LinkedHashSet::new)); } diff --git a/searchcore/src/vespa/searchcore/config/CMakeLists.txt b/searchcore/src/vespa/searchcore/config/CMakeLists.txt index 65b0096526f..7069521ba6e 100644 --- a/searchcore/src/vespa/searchcore/config/CMakeLists.txt +++ b/searchcore/src/vespa/searchcore/config/CMakeLists.txt @@ -3,8 +3,6 @@ vespa_add_library(searchcore_fconfig STATIC SOURCES DEPENDS ) -vespa_generate_config(searchcore_fconfig fdispatchrc.def) -install_config_definition(fdispatchrc.def vespa.config.search.core.fdispatchrc.def) vespa_generate_config(searchcore_fconfig proton.def) install_config_definition(proton.def vespa.config.search.core.proton.def) vespa_generate_config(searchcore_fconfig ranking-constants.def) diff --git a/searchcore/src/vespa/searchcore/config/fdispatchrc.def b/searchcore/src/vespa/searchcore/config/fdispatchrc.def deleted file mode 100644 index aff4cab4f91..00000000000 --- a/searchcore/src/vespa/searchcore/config/fdispatchrc.def +++ /dev/null @@ -1,5 +0,0 @@ -# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -namespace=vespa.config.search.core - -## The number of transport threads used when talking to search nodes. -transportthreads int default=1 restart diff --git a/searchlib/src/vespa/searchcommon/attribute/status.cpp b/searchlib/src/vespa/searchcommon/attribute/status.cpp index a7d1f5b3d38..41a40038431 100644 --- a/searchlib/src/vespa/searchcommon/attribute/status.cpp +++ b/searchlib/src/vespa/searchcommon/attribute/status.cpp @@ -37,7 +37,7 @@ Status::Status(const Status& rhs) _lastSyncToken(rhs.getLastSyncToken()), _updates(rhs._updates), _nonIdempotentUpdates(rhs._nonIdempotentUpdates), - _bitVectors(rhs._bitVectors) + _bitVectors(load_relaxed(rhs._bitVectors)) { } @@ -56,7 +56,7 @@ Status::operator=(const Status& rhs) setLastSyncToken(rhs.getLastSyncToken()); _updates = rhs._updates; _nonIdempotentUpdates = rhs._nonIdempotentUpdates; - _bitVectors = rhs._bitVectors; + store_relaxed(_bitVectors, load_relaxed(rhs._bitVectors)); return *this; } diff --git a/searchlib/src/vespa/searchcommon/attribute/status.h b/searchlib/src/vespa/searchcommon/attribute/status.h index f2212d4c76a..3bf547b2a4c 100644 --- a/searchlib/src/vespa/searchcommon/attribute/status.h +++ b/searchlib/src/vespa/searchcommon/attribute/status.h @@ -29,7 +29,7 @@ public: uint64_t getLastSyncToken() const { return _lastSyncToken.load(std::memory_order_relaxed); } uint64_t getUpdateCount() const { return _updates; } uint64_t getNonIdempotentUpdateCount() const { return _nonIdempotentUpdates; } - uint32_t getBitVectors() const { return _bitVectors; } + uint32_t getBitVectors() const { return _bitVectors.load(std::memory_order_relaxed); } void setNumDocs(uint64_t v) { _numDocs.store(v, std::memory_order_relaxed); } void incNumDocs() { _numDocs.store(_numDocs.load(std::memory_order_relaxed) + 1u, @@ -37,8 +37,8 @@ public: void setLastSyncToken(uint64_t v) { _lastSyncToken.store(v, std::memory_order_relaxed); } void incUpdates(uint64_t v=1) { _updates += v; } void incNonIdempotentUpdates(uint64_t v = 1) { _nonIdempotentUpdates += v; } - void incBitVectors() { ++_bitVectors; } - void decBitVectors() { --_bitVectors; } + void incBitVectors() { _bitVectors.store(getBitVectors() + 1, std::memory_order_relaxed); } + void decBitVectors() { _bitVectors.store(getBitVectors() - 1, std::memory_order_relaxed); } static vespalib::string createName(vespalib::stringref index, vespalib::stringref attr); @@ -55,7 +55,7 @@ private: std::atomic<uint64_t> _lastSyncToken; uint64_t _updates; uint64_t _nonIdempotentUpdates; - uint32_t _bitVectors; + std::atomic<uint32_t> _bitVectors; }; } diff --git a/tenant-base/pom.xml b/tenant-base/pom.xml index b50f14558d6..cf7898f6951 100644 --- a/tenant-base/pom.xml +++ b/tenant-base/pom.xml @@ -84,15 +84,11 @@ <version>${vespaversion}</version> <scope>test</scope> <exclusions> - <exclusion> - <groupId>org.apache.commons</groupId> - <artifactId>commons-exec</artifactId> - </exclusion> - <exclusion> - <groupId>commons-lang</groupId> - <artifactId>commons-lang</artifactId> - </exclusion> - </exclusions> + <exclusion> + <groupId>org.apache.commons</groupId> + <artifactId>commons-exec</artifactId> + </exclusion> + </exclusions> </dependency> <dependency> @@ -115,10 +111,6 @@ <groupId>org.apache.commons</groupId> <artifactId>commons-exec</artifactId> </exclusion> - <exclusion> - <groupId>commons-lang</groupId> - <artifactId>commons-lang</artifactId> - </exclusion> </exclusions> </dependency> <dependency> diff --git a/vespaclient-java/pom.xml b/vespaclient-java/pom.xml index 3e5e7ca8025..230ddc5c7d3 100644 --- a/vespaclient-java/pom.xml +++ b/vespaclient-java/pom.xml @@ -46,12 +46,6 @@ </exclusions> </dependency> <dependency> - <!-- Added explicitly to get commons-collections, which is excluded from container-dev --> - <groupId>com.yahoo.vespa</groupId> - <artifactId>document</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> <groupId>com.yahoo.vespa</groupId> <artifactId>documentapi</artifactId> <version>${project.version}</version> |