summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config-model/src/main/java/com/yahoo/schema/parser/ConvertParsedFields.java4
-rw-r--r--config-model/src/main/java/com/yahoo/schema/parser/ConvertParsedSchemas.java4
-rw-r--r--config-model/src/test/java/com/yahoo/schema/SummaryTestCase.java4
-rw-r--r--flags/src/main/java/com/yahoo/vespa/flags/Flags.java11
-rw-r--r--node-repository/src/main/java/com/yahoo/vespa/hosted/provision/provisioning/NodeResourceLimits.java11
-rwxr-xr-xscrewdriver/delete-old-cloudsmith-artifacts.sh8
-rwxr-xr-xscrewdriver/publish-unpublished-rpms-to-archive.sh11
-rw-r--r--searchlib/src/tests/attribute/enum_comparator/enum_comparator_test.cpp39
-rw-r--r--searchlib/src/vespa/searchlib/attribute/dfa_fuzzy_matcher.h2
-rw-r--r--searchlib/src/vespa/searchlib/attribute/dfa_string_comparator.cpp23
-rw-r--r--searchlib/src/vespa/searchlib/attribute/dfa_string_comparator.h3
11 files changed, 79 insertions, 41 deletions
diff --git a/config-model/src/main/java/com/yahoo/schema/parser/ConvertParsedFields.java b/config-model/src/main/java/com/yahoo/schema/parser/ConvertParsedFields.java
index bc0e16abbe3..b5d091cca8d 100644
--- a/config-model/src/main/java/com/yahoo/schema/parser/ConvertParsedFields.java
+++ b/config-model/src/main/java/com/yahoo/schema/parser/ConvertParsedFields.java
@@ -154,8 +154,8 @@ public class ConvertParsedFields {
var dataType = field.getDataType();
var otherType = summaryField.getType();
if (otherType != null && summaryField.getHasExplicitType()) {
- schema.getDeployLogger().log(Level.FINE, () -> "For " + schema.getName() +
- ", field '" + field.getName() +
+ schema.getDeployLogger().log(Level.FINE, () -> "For schema '" + schema.getName() +
+ "', field '" + field.getName() +
"', summary '" + summaryField.name() +
"': Specifying the type is deprecated, ignored and will be an error in Vespa 9." +
" Remove the type specification to silence this warning.");
diff --git a/config-model/src/main/java/com/yahoo/schema/parser/ConvertParsedSchemas.java b/config-model/src/main/java/com/yahoo/schema/parser/ConvertParsedSchemas.java
index 4fd4ab7c69b..ee15b95b198 100644
--- a/config-model/src/main/java/com/yahoo/schema/parser/ConvertParsedSchemas.java
+++ b/config-model/src/main/java/com/yahoo/schema/parser/ConvertParsedSchemas.java
@@ -233,8 +233,8 @@ public class ConvertParsedSchemas {
var parsedType = parsedField.getType();
if (parsedType != null) {
var log = schema.getDeployLogger();
- log.log(Level.FINE, () -> "For " + schema.getName() +
- ", document-summary '" + parsed.name() +
+ log.log(Level.FINE, () -> "For schema '" + schema.getName() +
+ "', document-summary '" + parsed.name() +
"', summary field '" + parsedField.name() +
"': Specifying the type is deprecated, ignored and will be an error in Vespa 9." +
" Remove the type specification to silence this warning.");
diff --git a/config-model/src/test/java/com/yahoo/schema/SummaryTestCase.java b/config-model/src/test/java/com/yahoo/schema/SummaryTestCase.java
index 4f008e661c8..6442edd547d 100644
--- a/config-model/src/test/java/com/yahoo/schema/SummaryTestCase.java
+++ b/config-model/src/test/java/com/yahoo/schema/SummaryTestCase.java
@@ -360,7 +360,7 @@ public class SummaryTestCase {
if (explicit) {
assertEquals(1, logger.entries.size());
assertEquals(Level.FINE, logger.entries.get(0).level);
- assertEquals("For test, field 'foo', summary 'bar':" +
+ assertEquals("For schema 'test', field 'foo', summary 'bar':" +
" Specifying the type is deprecated, ignored and will be an error in Vespa 9." +
" Remove the type specification to silence this warning.", logger.entries.get(0).message);
} else {
@@ -393,7 +393,7 @@ public class SummaryTestCase {
if (explicit) {
assertEquals(1, logger.entries.size());
assertEquals(Level.FINE, logger.entries.get(0).level);
- assertEquals("For test, document-summary 'bar', summary field 'foo':" +
+ assertEquals("For schema 'test', document-summary 'bar', summary field 'foo':" +
" Specifying the type is deprecated, ignored and will be an error in Vespa 9." +
" Remove the type specification to silence this warning.", logger.entries.get(0).message);
} else {
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 d701a35c2ef..06530fdc962 100644
--- a/flags/src/main/java/com/yahoo/vespa/flags/Flags.java
+++ b/flags/src/main/java/com/yahoo/vespa/flags/Flags.java
@@ -14,12 +14,10 @@ import java.util.TreeMap;
import java.util.function.Predicate;
import static com.yahoo.vespa.flags.FetchVector.Dimension.APPLICATION;
-import static com.yahoo.vespa.flags.FetchVector.Dimension.INSTANCE_ID;
import static com.yahoo.vespa.flags.FetchVector.Dimension.CLOUD_ACCOUNT;
-import static com.yahoo.vespa.flags.FetchVector.Dimension.CLUSTER_ID;
-import static com.yahoo.vespa.flags.FetchVector.Dimension.CLUSTER_TYPE;
import static com.yahoo.vespa.flags.FetchVector.Dimension.CONSOLE_USER_EMAIL;
import static com.yahoo.vespa.flags.FetchVector.Dimension.HOSTNAME;
+import static com.yahoo.vespa.flags.FetchVector.Dimension.INSTANCE_ID;
import static com.yahoo.vespa.flags.FetchVector.Dimension.NODE_TYPE;
import static com.yahoo.vespa.flags.FetchVector.Dimension.TENANT_ID;
import static com.yahoo.vespa.flags.FetchVector.Dimension.VESPA_VERSION;
@@ -374,13 +372,6 @@ public class Flags {
"Takes effect on next host provisioning / run of host-admin",
HOSTNAME, CLOUD_ACCOUNT);
- public static final UnboundIntFlag MIN_EXCLUSIVE_ADVERTISED_MEMORY_GB = defineIntFlag(
- "min-exclusive-advertised-memory-gb", 8,
- List.of("freva"), "2023-09-08", "2024-01-15",
- "Minimum amount of advertised memory for exclusive nodes",
- "Takes effect immediately",
- INSTANCE_ID, CLUSTER_ID, CLUSTER_TYPE);
-
public static final UnboundIntFlag CONTENT_LAYER_METADATA_FEATURE_LEVEL = defineIntFlag(
"content-layer-metadata-feature-level", 0,
List.of("vekterli"), "2022-09-12", "2024-02-01",
diff --git a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/provisioning/NodeResourceLimits.java b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/provisioning/NodeResourceLimits.java
index cd331cbd5fa..e2f07163e9d 100644
--- a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/provisioning/NodeResourceLimits.java
+++ b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/provisioning/NodeResourceLimits.java
@@ -7,9 +7,6 @@ import com.yahoo.config.provision.Environment;
import com.yahoo.config.provision.NodeResources;
import com.yahoo.config.provision.NodeType;
import com.yahoo.config.provision.Zone;
-import com.yahoo.vespa.flags.FetchVector;
-import com.yahoo.vespa.flags.Flags;
-import com.yahoo.vespa.flags.IntFlag;
import com.yahoo.vespa.hosted.provision.NodeRepository;
import java.util.Locale;
@@ -23,11 +20,9 @@ import java.util.Locale;
public class NodeResourceLimits {
private final NodeRepository nodeRepository;
- private final IntFlag minExclusiveAdvertisedMemoryGbFlag;
public NodeResourceLimits(NodeRepository nodeRepository) {
this.nodeRepository = nodeRepository;
- this.minExclusiveAdvertisedMemoryGbFlag = Flags.MIN_EXCLUSIVE_ADVERTISED_MEMORY_GB.bindTo(nodeRepository.flagSource());
}
/** Validates the resources applications ask for (which are in "advertised" resource space) */
@@ -87,11 +82,7 @@ public class NodeResourceLimits {
private double minAdvertisedMemoryGb(ApplicationId applicationId, ClusterSpec cluster, boolean exclusive) {
if (cluster.type() == ClusterSpec.Type.admin) return 1;
if (!exclusive) return 4;
- return minExclusiveAdvertisedMemoryGbFlag
- .with(FetchVector.Dimension.INSTANCE_ID, applicationId.serializedForm())
- .with(FetchVector.Dimension.CLUSTER_ID, cluster.id().value())
- .with(FetchVector.Dimension.CLUSTER_TYPE, cluster.type().name())
- .value();
+ return 8;
}
private double minAdvertisedDiskGb(NodeResources requested, boolean exclusive) {
diff --git a/screwdriver/delete-old-cloudsmith-artifacts.sh b/screwdriver/delete-old-cloudsmith-artifacts.sh
index d0fea25bc78..9e345646c13 100755
--- a/screwdriver/delete-old-cloudsmith-artifacts.sh
+++ b/screwdriver/delete-old-cloudsmith-artifacts.sh
@@ -10,7 +10,13 @@ curl -1sLf 'https://dl.cloudsmith.io/public/vespa/open-source-rpms/config.rpm.tx
dnf config-manager --add-repo '/tmp/vespa-open-source-rpms.repo'
rm -f /tmp/vespa-open-source-rpms.repo
-VERSIONS_TO_DELETE=$(dnf list -y --quiet --showduplicates --disablerepo='*' --enablerepo=vespa-open-source-rpms vespa | awk '/[0-9].*\.[0-9].*\.[0-9].*/{print $2}' | sort -V | head -n -$MAX_NUMBER_OF_RELEASES | grep -v "7.594.36")
+# Allow the last Vespa 7 release to remain in the repo
+VERSIONS_TO_DELETE=$(dnf list -y --quiet --showduplicates --disablerepo='*' --enablerepo=vespa-open-source-rpms vespa | awk '/[0-9].*\.[0-9].*\.[0-9].*/{print $2}' | sort -V | grep -v "7.594.36" | head -n -$MAX_NUMBER_OF_RELEASES)
+
+if [[ -z "$VERSIONS_TO_DELETE" ]]; then
+ echo "No old RPM versions to delete found. Exiting."
+ exit 0
+fi
RPMS_TO_DELETE=$(mktemp)
trap "rm -f $RPMS_TO_DELETE" EXIT
diff --git a/screwdriver/publish-unpublished-rpms-to-archive.sh b/screwdriver/publish-unpublished-rpms-to-archive.sh
index 9804fc5eeec..32e1b07d3db 100755
--- a/screwdriver/publish-unpublished-rpms-to-archive.sh
+++ b/screwdriver/publish-unpublished-rpms-to-archive.sh
@@ -38,7 +38,7 @@ cd $DLDIR
readonly DNF="dnf -y -q --forcearch $RPMARCH"
-$DNF list --disablerepo='*' --enablerepo=copr:copr.fedorainfracloud.org:group_vespa:vespa --showduplicates 'vespa*' | grep "Available Packages" -A 100000 | tail -n +2 | sed '/\.src\ */d' | sed "s/\.$RPMARCH\ */-/" | awk '{print $1}' | grep -v '.src$' > $COPR_PACKAGES
+$DNF list --disablerepo='*' --enablerepo=copr:copr.fedorainfracloud.org:group_vespa:vespa --showduplicates 'vespa*' | grep "Available Packages" -A 100000 | tail -n +2 | sed '/\.src\ */d' | sed -E "s/\.($RPMARCH|noarch)\ */-/" | awk '{print $1}' | grep -v '.src$' > $COPR_PACKAGES
echo "Packages on Copr:"
cat $COPR_PACKAGES
@@ -46,9 +46,12 @@ echo
for pv in $(cat $COPR_PACKAGES); do
if ! $DNF list --disablerepo='*' --enablerepo=vespa-open-source-rpms $pv &> /dev/null; then
- echo "$pv not found on in archive. Downloading..."
- $DNF download --disablerepo='*' --enablerepo=copr:copr.fedorainfracloud.org:group_vespa:vespa $pv
- echo "$pv downloaded."
+ # Need one extra check here for noarch packages
+ if ! dnf -y -q --forcearch noarch list --disablerepo='*' --enablerepo=vespa-open-source-rpms $pv &> /dev/null; then
+ echo "$pv not found on in archive. Downloading..."
+ $DNF download --disablerepo='*' --enablerepo=copr:copr.fedorainfracloud.org:group_vespa:vespa $pv
+ echo "$pv downloaded."
+ fi
fi
done
echo
diff --git a/searchlib/src/tests/attribute/enum_comparator/enum_comparator_test.cpp b/searchlib/src/tests/attribute/enum_comparator/enum_comparator_test.cpp
index f99a4c4b3f9..c578f823dfd 100644
--- a/searchlib/src/tests/attribute/enum_comparator/enum_comparator_test.cpp
+++ b/searchlib/src/tests/attribute/enum_comparator/enum_comparator_test.cpp
@@ -267,14 +267,14 @@ TEST(EnumComparatorTest, require_that_cased_less_is_working)
EXPECT_EQ((EnumIndexVector{e1, e4, e3, e2}), vec);
}
-TEST(DfaStringComparatorTest, require_that_less_is_working)
+TEST(DfaStringComparatorTest, require_that_folded_less_is_working)
{
StringEnumStore es(false, DictionaryConfig::Type::BTREE);
EnumIndex e1 = es.insert("Aa");
EnumIndex e2 = es.insert("aa");
EnumIndex e3 = es.insert("aB");
auto aa_utf32 = as_utf32("aa");
- DfaStringComparator cmp1(es.get_data_store(), aa_utf32);
+ DfaStringComparator cmp1(es.get_data_store(), aa_utf32, false);
EXPECT_FALSE(cmp1.less(EnumIndex(), e1));
EXPECT_FALSE(cmp1.less(EnumIndex(), e2));
EXPECT_TRUE(cmp1.less(EnumIndex(), e3));
@@ -282,7 +282,7 @@ TEST(DfaStringComparatorTest, require_that_less_is_working)
EXPECT_FALSE(cmp1.less(e2, EnumIndex()));
EXPECT_FALSE(cmp1.less(e3, EnumIndex()));
auto Aa_utf32 = as_utf32("Aa");
- DfaStringComparator cmp2(es.get_data_store(), Aa_utf32);
+ DfaStringComparator cmp2(es.get_data_store(), Aa_utf32, false);
EXPECT_TRUE(cmp2.less(EnumIndex(), e1));
EXPECT_TRUE(cmp2.less(EnumIndex(), e2));
EXPECT_TRUE(cmp2.less(EnumIndex(), e3));
@@ -291,6 +291,39 @@ TEST(DfaStringComparatorTest, require_that_less_is_working)
EXPECT_FALSE(cmp2.less(e3, EnumIndex()));
}
+TEST(DfaStringComparatorTest, require_that_cased_less_is_working)
+{
+ StringEnumStore es(false, DictionaryConfig(DictionaryConfig::Type::BTREE, DictionaryConfig::Match::CASED));
+ auto e1 = es.insert("Aa");
+ auto e2 = es.insert("aa");
+ auto e3 = es.insert("aB");
+ auto uaa_utf32 = as_utf32("Aa");
+ auto aa_utf32 = as_utf32("aa");
+ DfaStringComparator cmp1(es.get_data_store(), uaa_utf32, true);
+ DfaStringComparator cmp2(es.get_data_store(), aa_utf32, true);
+ EXPECT_FALSE(cmp1.less(e1, e1));
+ EXPECT_TRUE(cmp1.less(e1, e2));
+ EXPECT_TRUE(cmp1.less(e1, e3));
+ EXPECT_FALSE(cmp1.less(e2, e1));
+ EXPECT_FALSE(cmp1.less(e2, e2));
+ EXPECT_FALSE(cmp1.less(e2, e3));
+ EXPECT_FALSE(cmp1.less(e3, e1));
+ EXPECT_TRUE(cmp1.less(e3, e2));
+ EXPECT_FALSE(cmp1.less(e3, e3));
+ EXPECT_FALSE(cmp1.less(EnumIndex(), e1));
+ EXPECT_TRUE(cmp1.less(EnumIndex(), e2));
+ EXPECT_TRUE(cmp1.less(EnumIndex(), e3));
+ EXPECT_FALSE(cmp2.less(EnumIndex(), e1));
+ EXPECT_FALSE(cmp2.less(EnumIndex(), e2));
+ EXPECT_FALSE(cmp2.less(EnumIndex(), e3));
+ EXPECT_FALSE(cmp1.less(e1, EnumIndex()));
+ EXPECT_FALSE(cmp1.less(e2, EnumIndex()));
+ EXPECT_FALSE(cmp1.less(e3, EnumIndex()));
+ EXPECT_TRUE(cmp2.less(e1, EnumIndex()));
+ EXPECT_FALSE(cmp2.less(e2, EnumIndex()));
+ EXPECT_TRUE(cmp2.less(e3, EnumIndex()));
+}
+
}
GTEST_MAIN_RUN_ALL_TESTS()
diff --git a/searchlib/src/vespa/searchlib/attribute/dfa_fuzzy_matcher.h b/searchlib/src/vespa/searchlib/attribute/dfa_fuzzy_matcher.h
index a6467cfc91d..9de77085fae 100644
--- a/searchlib/src/vespa/searchlib/attribute/dfa_fuzzy_matcher.h
+++ b/searchlib/src/vespa/searchlib/attribute/dfa_fuzzy_matcher.h
@@ -62,7 +62,7 @@ public:
return true;
}
}
- DfaStringComparator cmp(data_store, _successor);
+ DfaStringComparator cmp(data_store, _successor, _cased);
itr.seek(vespalib::datastore::AtomicEntryRef(), cmp);
return false;
}
diff --git a/searchlib/src/vespa/searchlib/attribute/dfa_string_comparator.cpp b/searchlib/src/vespa/searchlib/attribute/dfa_string_comparator.cpp
index 762ad1e9042..9204510c0d2 100644
--- a/searchlib/src/vespa/searchlib/attribute/dfa_string_comparator.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/dfa_string_comparator.cpp
@@ -5,9 +5,10 @@
namespace search::attribute {
-DfaStringComparator::DfaStringComparator(const DataStoreType& data_store, const std::vector<uint32_t>& candidate)
+DfaStringComparator::DfaStringComparator(const DataStoreType& data_store, const std::vector<uint32_t>& candidate, bool cased)
: ParentType(data_store),
- _candidate(std::cref(candidate))
+ _candidate(std::cref(candidate)),
+ _cased(cased)
{
}
@@ -16,13 +17,25 @@ DfaStringComparator::less(const vespalib::datastore::EntryRef lhs, const vespali
{
if (lhs.valid()) {
if (rhs.valid()) {
- return FoldedStringCompare::compareFolded<true, true>(get(lhs), get(rhs)) < 0;
+ if (_cased) {
+ return FoldedStringCompare::compareFolded<false, false>(get(lhs), get(rhs)) < 0;
+ } else {
+ return FoldedStringCompare::compareFolded<true, true>(get(lhs), get(rhs)) < 0;
+ }
} else {
- return FoldedStringCompare::compareFolded<true, false>(get(lhs), _candidate) < 0;
+ if (_cased) {
+ return FoldedStringCompare::compareFolded<false, false>(get(lhs), _candidate) < 0;
+ } else {
+ return FoldedStringCompare::compareFolded<true, false>(get(lhs), _candidate) < 0;
+ }
}
} else {
if (rhs.valid()) {
- return FoldedStringCompare::compareFolded<false, true>(_candidate, get(rhs)) < 0;
+ if (_cased) {
+ return FoldedStringCompare::compareFolded<false, false>(_candidate, get(rhs)) < 0;
+ } else {
+ return FoldedStringCompare::compareFolded<false, true>(_candidate, get(rhs)) < 0;
+ }
} else {
return false;
}
diff --git a/searchlib/src/vespa/searchlib/attribute/dfa_string_comparator.h b/searchlib/src/vespa/searchlib/attribute/dfa_string_comparator.h
index f9eaf281ff7..13a337f565c 100644
--- a/searchlib/src/vespa/searchlib/attribute/dfa_string_comparator.h
+++ b/searchlib/src/vespa/searchlib/attribute/dfa_string_comparator.h
@@ -26,9 +26,10 @@ public:
private:
using ParentType::get;
std::reference_wrapper<const std::vector<uint32_t>> _candidate;
+ bool _cased;
public:
- DfaStringComparator(const DataStoreType& data_store, const std::vector<uint32_t>& candidate);
+ DfaStringComparator(const DataStoreType& data_store, const std::vector<uint32_t>& candidate, bool cased);
bool less(const vespalib::datastore::EntryRef lhs, const vespalib::datastore::EntryRef rhs) const override;
};