diff options
9 files changed, 27 insertions, 29 deletions
diff --git a/flags/src/main/java/com/yahoo/vespa/flags/Flags.java b/flags/src/main/java/com/yahoo/vespa/flags/Flags.java index a7d33ab96b1..ae281dc708f 100644 --- a/flags/src/main/java/com/yahoo/vespa/flags/Flags.java +++ b/flags/src/main/java/com/yahoo/vespa/flags/Flags.java @@ -414,7 +414,7 @@ public class Flags { public static final UnboundBooleanFlag ENABLE_CONDITIONAL_PUT_REMOVE_WRITE_REPAIR = defineFeatureFlag( "enable-conditional-put-remove-write-repair", true, - List.of("vekterli", "havardpe"), "2023-05-10", "2023-07-01", + List.of("vekterli", "havardpe"), "2023-05-10", "2023-09-01", "If set, a conditional Put or Remove operation for a document in an inconsistent bucket " + "will initiate a write-repair that evaluates the condition across all mutually inconsistent " + "replicas, with the newest document version (if any) being authoritative", diff --git a/searchcore/src/vespa/searchcore/proton/matching/matcher.cpp b/searchcore/src/vespa/searchcore/proton/matching/matcher.cpp index b2d1593aafc..26cf9901f57 100644 --- a/searchcore/src/vespa/searchcore/proton/matching/matcher.cpp +++ b/searchcore/src/vespa/searchcore/proton/matching/matcher.cpp @@ -17,6 +17,7 @@ #include <vespa/searchlib/fef/ranksetup.h> #include <vespa/searchlib/fef/test/plugin/setup.h> #include <vespa/vespalib/data/slime/inserter.h> +#include <cinttypes> #include <vespa/log/log.h> LOG_SETUP(".proton.matching.matcher"); @@ -72,9 +73,9 @@ numThreads(size_t hits, size_t minHits) { class LimitedThreadBundleWrapper final : public vespalib::ThreadBundle { public: - LimitedThreadBundleWrapper(vespalib::ThreadBundle &threadBundle, uint32_t maxThreads) : - _threadBundle(threadBundle), - _maxThreads(std::min(maxThreads, static_cast<uint32_t>(threadBundle.size()))) + LimitedThreadBundleWrapper(vespalib::ThreadBundle &threadBundle, uint32_t maxThreads) + : _threadBundle(threadBundle), + _maxThreads(std::min(maxThreads, static_cast<uint32_t>(threadBundle.size()))) { } size_t size() const override { return _maxThreads; } void run(vespalib::Runnable* const* targets, size_t cnt) override { @@ -86,9 +87,13 @@ private: }; bool -willNeedRanking(const SearchRequest & request, const GroupingContext & groupingContext) { +willNeedRanking(const SearchRequest & request, const GroupingContext & groupingContext, + search::feature_t rank_score_drop_limit) +{ return (groupingContext.needRanking() || (request.maxhits != 0)) - && (request.sortSpec.empty() || (request.sortSpec.find("[rank]") != vespalib::string::npos)); + && (request.sortSpec.empty() || + (request.sortSpec.find("[rank]") != vespalib::string::npos) || + !std::isnan(rank_score_drop_limit)); } SearchReply::UP @@ -221,9 +226,9 @@ updateCoverage(Coverage & coverage, const MaybeMatchPhaseLimiter & limiter, cons LOG(debug, "soft doomed, degraded from timeout covered = %" PRIu64, coverage.getCovered()); } LOG(debug, "docid limit = %d", totalSpace); - LOG(debug, "num active lids = %lu", coverage.getActive()); + LOG(debug, "num active lids = %" PRIu64, coverage.getActive()); LOG(debug, "space Estimate = %zd", spaceEstimate); - LOG(debug, "covered = %zu", coverage.getCovered()); + LOG(debug, "covered = %" PRIu64, coverage.getCovered()); } } @@ -278,7 +283,7 @@ Matcher::match(const SearchRequest &request, vespalib::ThreadBundle &threadBundl MatchParams params(searchContext.getDocIdLimit(), heapSize, arraySize, rank_score_drop_limit, request.offset, request.maxhits, !_rankSetup->getSecondPhaseRank().empty(), - willNeedRanking(request, groupingContext)); + willNeedRanking(request, groupingContext, rank_score_drop_limit)); ResultProcessor rp(attrContext, metaStore, sessionMgr, groupingContext, sessionId, request.sortSpec, params.offset, params.hits); @@ -334,7 +339,7 @@ Matcher::updateStats(const MatchingStats & my_stats, const search::engine::Reque } if ((_stats.softDoomed() < 10) || (_stats.softDoomed()%100 == 0)) { LOG(info, - "Triggered softtimeout %s count: %zu. Coverage = %lu of %lu documents. request=%1.3f," + "Triggered softtimeout %s count: %zu. Coverage = %" PRIu64 " of %" PRIu64 " documents. request=%1.3f," " doomOvertime=%1.3f, overtime_limit=%1.3f and duration=%1.3f, rankprofile=%s" ", factor %s adjusted from %1.3f to %1.3f", isDoomExplicit ? "with query override" : "factor adjustment", diff --git a/searchcore/src/vespa/searchcore/proton/server/documentdbconfig.cpp b/searchcore/src/vespa/searchcore/proton/server/documentdbconfig.cpp index 904e495e0f2..eb8ec083caf 100644 --- a/searchcore/src/vespa/searchcore/proton/server/documentdbconfig.cpp +++ b/searchcore/src/vespa/searchcore/proton/server/documentdbconfig.cpp @@ -98,7 +98,7 @@ DocumentDBConfig::DocumentDBConfig( { } -DocumentDBConfig::DocumentDBConfig(const DocumentDBConfig &cfg) = default; +DocumentDBConfig::DocumentDBConfig(const DocumentDBConfig &cfg) noexcept = default; DocumentDBConfig::~DocumentDBConfig() = default; diff --git a/searchcore/src/vespa/searchcore/proton/server/documentdbconfig.h b/searchcore/src/vespa/searchcore/proton/server/documentdbconfig.h index ce8181716ad..caaeb5186b9 100644 --- a/searchcore/src/vespa/searchcore/proton/server/documentdbconfig.h +++ b/searchcore/src/vespa/searchcore/proton/server/documentdbconfig.h @@ -173,7 +173,7 @@ public: const vespalib::string &configId, const vespalib::string &docTypeName) noexcept; - DocumentDBConfig(const DocumentDBConfig &cfg); + DocumentDBConfig(const DocumentDBConfig &cfg) noexcept; DocumentDBConfig & operator=(const DocumentDBConfig &cfg) = delete; ~DocumentDBConfig(); diff --git a/searchlib/src/vespa/searchlib/aggregation/groupinglevel.cpp b/searchlib/src/vespa/searchlib/aggregation/groupinglevel.cpp index d4a263b23ff..b68b9680b5b 100644 --- a/searchlib/src/vespa/searchlib/aggregation/groupinglevel.cpp +++ b/searchlib/src/vespa/searchlib/aggregation/groupinglevel.cpp @@ -27,7 +27,9 @@ GroupingLevel::GroupingLevel() noexcept GroupingLevel::~GroupingLevel() = default; GroupingLevel::GroupingLevel(const GroupingLevel &) = default; +GroupingLevel::GroupingLevel(GroupingLevel&&) noexcept = default; GroupingLevel & GroupingLevel::operator =(const GroupingLevel &) = default; +GroupingLevel& GroupingLevel::operator=(GroupingLevel&&) noexcept = default; Serializer & GroupingLevel::onSerialize(Serializer & os) const diff --git a/searchlib/src/vespa/searchlib/aggregation/groupinglevel.h b/searchlib/src/vespa/searchlib/aggregation/groupinglevel.h index 95489a1bc8c..2cffe498e96 100644 --- a/searchlib/src/vespa/searchlib/aggregation/groupinglevel.h +++ b/searchlib/src/vespa/searchlib/aggregation/groupinglevel.h @@ -87,8 +87,8 @@ private: vespalib::CloneablePtr<Grouper> _grouper; public: GroupingLevel() noexcept; - GroupingLevel(GroupingLevel &&) noexcept = default; - GroupingLevel & operator =(GroupingLevel &&) noexcept = default; + GroupingLevel(GroupingLevel&&) noexcept; + GroupingLevel& operator=(GroupingLevel&&) noexcept; GroupingLevel(const GroupingLevel &); GroupingLevel & operator =(const GroupingLevel &); ~GroupingLevel(); diff --git a/vespa-athenz/src/main/java/com/yahoo/vespa/athenz/identityprovider/api/IdentityDocument.java b/vespa-athenz/src/main/java/com/yahoo/vespa/athenz/identityprovider/api/IdentityDocument.java index c7517ef8adb..00d82177367 100644 --- a/vespa-athenz/src/main/java/com/yahoo/vespa/athenz/identityprovider/api/IdentityDocument.java +++ b/vespa-athenz/src/main/java/com/yahoo/vespa/athenz/identityprovider/api/IdentityDocument.java @@ -2,20 +2,17 @@ package com.yahoo.vespa.athenz.identityprovider.api; import com.yahoo.vespa.athenz.api.AthenzIdentity; -import com.yahoo.vespa.athenz.api.AthenzService; import java.time.Instant; import java.util.HashMap; -import java.util.List; import java.util.Map; -import java.util.Optional; import java.util.Set; /** * Represents an unsigned identity document * @author mortent */ -public record IdentityDocument(VespaUniqueInstanceId providerUniqueId, AthenzService providerService, String configServerHostname, +public record IdentityDocument(VespaUniqueInstanceId providerUniqueId, AthenzIdentity providerService, String configServerHostname, String instanceHostname, Instant createdAt, Set<String> ipAddresses, IdentityType identityType, ClusterType clusterType, String ztsUrl, AthenzIdentity serviceIdentity, Map<String, Object> unknownAttributes) { @@ -31,7 +28,7 @@ public record IdentityDocument(VespaUniqueInstanceId providerUniqueId, AthenzSer unknownAttributes = Map.copyOf(nonNull); } - public IdentityDocument(VespaUniqueInstanceId providerUniqueId, AthenzService providerService, String configServerHostname, + public IdentityDocument(VespaUniqueInstanceId providerUniqueId, AthenzIdentity providerService, String configServerHostname, String instanceHostname, Instant createdAt, Set<String> ipAddresses, IdentityType identityType, ClusterType clusterType, String ztsUrl, AthenzIdentity serviceIdentity) { @@ -39,7 +36,7 @@ public record IdentityDocument(VespaUniqueInstanceId providerUniqueId, AthenzSer } - public IdentityDocument withServiceIdentity(AthenzService athenzService) { + public IdentityDocument withServiceIdentity(AthenzIdentity serviceIdentity) { return new IdentityDocument( this.providerUniqueId, this.providerService, @@ -50,7 +47,7 @@ public record IdentityDocument(VespaUniqueInstanceId providerUniqueId, AthenzSer this.identityType, this.clusterType, this.ztsUrl, - athenzService, + serviceIdentity, this.unknownAttributes); } } diff --git a/vespa-athenz/src/main/java/com/yahoo/vespa/athenz/identityprovider/client/IdentityDocumentSigner.java b/vespa-athenz/src/main/java/com/yahoo/vespa/athenz/identityprovider/client/IdentityDocumentSigner.java index 11b30585933..4a9e1814c82 100644 --- a/vespa-athenz/src/main/java/com/yahoo/vespa/athenz/identityprovider/client/IdentityDocumentSigner.java +++ b/vespa-athenz/src/main/java/com/yahoo/vespa/athenz/identityprovider/client/IdentityDocumentSigner.java @@ -51,7 +51,7 @@ public class IdentityDocumentSigner { // Cluster type is ignored due to old Vespa versions not forwarding unknown fields in signed identity document private String generateSignature(VespaUniqueInstanceId providerUniqueId, - AthenzService providerService, + AthenzIdentity providerService, String configServerHostname, String instanceHostname, Instant createdAt, @@ -109,7 +109,7 @@ public class IdentityDocumentSigner { private static void writeToSigner(Signature signer, VespaUniqueInstanceId providerUniqueId, - AthenzService providerService, + AthenzIdentity providerService, String configServerHostname, String instanceHostname, Instant createdAt, diff --git a/vespamalloc/src/tests/test1/new_test.cpp b/vespamalloc/src/tests/test1/new_test.cpp index d41258fb115..92c9a66f8e8 100644 --- a/vespamalloc/src/tests/test1/new_test.cpp +++ b/vespamalloc/src/tests/test1/new_test.cpp @@ -288,13 +288,7 @@ TEST("test memalign") { } TEST("test aligned_alloc") { - verify_alignment(wrap_aligned_alloc(0, 0), 1, 1); - verify_alignment(wrap_aligned_alloc(0, 1), 1, 1); verify_alignment(wrap_aligned_alloc(1, 0), 1, 1); - for (size_t align : {3,7,19}) { - // According to man pages these should fail, but it seems it rounds up and does best effort - verify_alignment(wrap_aligned_alloc(align, align*7), 1ul << vespalib::Optimized::msbIdx(align), align*7); - } for (size_t align : {1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536}) { verify_alignment(wrap_aligned_alloc(align, align*7), align, align*7); } |