summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/search/ContentClusterFixture.java7
-rw-r--r--config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/search/IndexingScriptChangeValidatorTest.java46
-rw-r--r--indexinglanguage/src/main/java/com/yahoo/vespa/indexinglanguage/expressions/NGramExpression.java8
-rw-r--r--indexinglanguage/src/main/java/com/yahoo/vespa/indexinglanguage/expressions/NormalizeExpression.java2
-rw-r--r--storage/src/vespa/storage/storageserver/distributornode.cpp2
-rwxr-xr-xvespa-feed-client-cli/src/main/sh/vespa-feed-client-standalone.sh4
-rw-r--r--zkfacade/src/main/java/com/yahoo/vespa/curator/CuratorCompletionWaiter.java1
7 files changed, 65 insertions, 5 deletions
diff --git a/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/search/ContentClusterFixture.java b/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/search/ContentClusterFixture.java
index 20ff9afd530..e7270eaefa1 100644
--- a/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/search/ContentClusterFixture.java
+++ b/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/search/ContentClusterFixture.java
@@ -31,6 +31,13 @@ public abstract class ContentClusterFixture {
nextCluster = createCluster(nextSd);
}
+ public ContentClusterFixture(String entireSd) throws Exception {
+ currentCluster = new ContentClusterBuilder().build(
+ ContentClusterUtils.createMockRoot(Arrays.asList(entireSd)));
+ nextCluster = new ContentClusterBuilder().build(
+ ContentClusterUtils.createMockRoot(Arrays.asList(entireSd)));
+ }
+
private static ContentCluster createCluster(String sdContent) throws Exception {
return new ContentClusterBuilder().build(
ContentClusterUtils.createMockRoot(
diff --git a/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/search/IndexingScriptChangeValidatorTest.java b/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/search/IndexingScriptChangeValidatorTest.java
index b1fda081b64..f0eaca4bafa 100644
--- a/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/search/IndexingScriptChangeValidatorTest.java
+++ b/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/search/IndexingScriptChangeValidatorTest.java
@@ -6,6 +6,9 @@ import com.yahoo.config.provision.ClusterSpec;
import com.yahoo.vespa.indexinglanguage.expressions.ScriptExpression;
import com.yahoo.vespa.model.application.validation.change.VespaConfigChangeAction;
import com.yahoo.vespa.model.application.validation.change.VespaReindexAction;
+
+import static com.yahoo.config.model.test.TestUtil.joinLines;
+
import org.junit.Test;
import java.util.Arrays;
@@ -25,6 +28,13 @@ public class IndexingScriptChangeValidatorTest {
nextDb().getDerivedConfiguration().getSearch());
}
+ public Fixture(String entireSd) throws Exception {
+ super(entireSd);
+ validator = new IndexingScriptChangeValidator(ClusterSpec.Id.from("test"),
+ currentDb().getDerivedConfiguration().getSearch(),
+ nextDb().getDerivedConfiguration().getSearch());
+ }
+
@Override
public List<VespaConfigChangeAction> validate() {
return validator.validate();
@@ -176,4 +186,40 @@ public class IndexingScriptChangeValidatorTest {
validate());
}
+ @Test
+ public void requireThatNormalizeIsOk() throws Exception {
+ String entireSd = joinLines(
+ "search test {",
+ " document test {",
+ " field inside type array<string> {",
+ " indexing: summary",
+ " }",
+ " }",
+ " field outside type array<string> {",
+ " indexing: input inside | for_each { normalize } | index outside",
+ " }",
+ "}");
+ new Fixture(entireSd).assertValidation();
+ }
+
+ @Test
+ public void requireThatNgramIsOk() throws Exception {
+ String entireSd = joinLines(
+ "search test {",
+ " document test {",
+ " field inside type string {",
+ " indexing: index",
+ " match {",
+ " gram",
+ " gram-size: 3",
+ " }",
+ " }",
+ " }",
+ " field outside type string {",
+ " indexing: input inside | ngram 2 | index outside",
+ " }",
+ "}");
+ new Fixture(entireSd).assertValidation();
+ }
+
}
diff --git a/indexinglanguage/src/main/java/com/yahoo/vespa/indexinglanguage/expressions/NGramExpression.java b/indexinglanguage/src/main/java/com/yahoo/vespa/indexinglanguage/expressions/NGramExpression.java
index 2c56f0e356b..0aa4e4eb772 100644
--- a/indexinglanguage/src/main/java/com/yahoo/vespa/indexinglanguage/expressions/NGramExpression.java
+++ b/indexinglanguage/src/main/java/com/yahoo/vespa/indexinglanguage/expressions/NGramExpression.java
@@ -103,7 +103,13 @@ public final class NGramExpression extends Expression {
if (!(obj instanceof NGramExpression)) return false;
NGramExpression rhs = (NGramExpression)obj;
- if (linguistics != rhs.linguistics) return false;
+ if (linguistics == null) {
+ if (rhs.linguistics != null) return false;
+ } else if (rhs.linguistics != null) {
+ if (linguistics.getClass() != rhs.linguistics.getClass()) return false;
+ } else {
+ return false;
+ }
if (gramSize != rhs.gramSize) return false;
return true;
}
diff --git a/indexinglanguage/src/main/java/com/yahoo/vespa/indexinglanguage/expressions/NormalizeExpression.java b/indexinglanguage/src/main/java/com/yahoo/vespa/indexinglanguage/expressions/NormalizeExpression.java
index fa68d45d110..1a3037761c6 100644
--- a/indexinglanguage/src/main/java/com/yahoo/vespa/indexinglanguage/expressions/NormalizeExpression.java
+++ b/indexinglanguage/src/main/java/com/yahoo/vespa/indexinglanguage/expressions/NormalizeExpression.java
@@ -81,7 +81,7 @@ public final class NormalizeExpression extends Expression {
public boolean equals(Object o) {
if (!(o instanceof NormalizeExpression)) return false;
NormalizeExpression other = (NormalizeExpression)o;
- if (linguistics != other.linguistics) return false;
+ if (linguistics.getClass() != other.linguistics.getClass()) return false;
return true;
}
diff --git a/storage/src/vespa/storage/storageserver/distributornode.cpp b/storage/src/vespa/storage/storageserver/distributornode.cpp
index 657491688e4..30e9f3097f3 100644
--- a/storage/src/vespa/storage/storageserver/distributornode.cpp
+++ b/storage/src/vespa/storage/storageserver/distributornode.cpp
@@ -127,7 +127,7 @@ DistributorNode::generate_unique_timestamp()
"%u timestamps were generated within this time period.",
SanityCheckMaxWallClockSecondSkew, now_seconds,_timestamp_second_counter,
_intra_second_pseudo_usec_counter);
- std::quick_exit(66);
+ std::_Exit(65);
}
assert(_intra_second_pseudo_usec_counter < 1'000'000);
++_intra_second_pseudo_usec_counter;
diff --git a/vespa-feed-client-cli/src/main/sh/vespa-feed-client-standalone.sh b/vespa-feed-client-cli/src/main/sh/vespa-feed-client-standalone.sh
index 57077205d18..f7fa392dbad 100755
--- a/vespa-feed-client-cli/src/main/sh/vespa-feed-client-standalone.sh
+++ b/vespa-feed-client-cli/src/main/sh/vespa-feed-client-standalone.sh
@@ -5,5 +5,5 @@ exec java \
-Djava.awt.headless=true \
-Xms128m -Xmx2048m \
--add-opens=java.base/sun.security.ssl=ALL-UNNAMED \
--Djava.util.logging.config.file=logging.properties \
--cp vespa-feed-client-cli-jar-with-dependencies.jar ai.vespa.feed.client.CliClient "$@"
+-Djava.util.logging.config.file=`dirname $0`/logging.properties \
+-cp `dirname $0`/vespa-feed-client-cli-jar-with-dependencies.jar ai.vespa.feed.client.CliClient "$@"
diff --git a/zkfacade/src/main/java/com/yahoo/vespa/curator/CuratorCompletionWaiter.java b/zkfacade/src/main/java/com/yahoo/vespa/curator/CuratorCompletionWaiter.java
index d9dad13fe66..221674b29b2 100644
--- a/zkfacade/src/main/java/com/yahoo/vespa/curator/CuratorCompletionWaiter.java
+++ b/zkfacade/src/main/java/com/yahoo/vespa/curator/CuratorCompletionWaiter.java
@@ -111,6 +111,7 @@ class CuratorCompletionWaiter implements Curator.CompletionWaiter {
public static Curator.CompletionWaiter createAndInitialize(Curator curator, Path parentPath, String waiterNode, String id) {
Path waiterPath = parentPath.append(waiterNode);
+ log.fine("Recreating ZK path: " + waiterPath);
curator.delete(waiterPath);
curator.createAtomically(waiterPath);
return new CuratorCompletionWaiter(curator, waiterPath.getAbsolute(), id, Clock.systemUTC());