summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@gmail.com>2022-06-03 12:41:56 +0200
committergjoranv <gv@verizonmedia.com>2022-06-08 11:45:26 +0200
commit00d3905e2c2384507c275af7fcfa8ba11ed545fd (patch)
treebe167f9635c7a26524a84b4bd7dd338ac5792358
parent7bef2e6e86f223023fc7a1d9be1f9f89c47d7460 (diff)
Remove array operation support on Vespa 8
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/DomConfigPayloadBuilder.java28
-rw-r--r--config-model/src/main/javacc/SchemaParser.jj6
-rw-r--r--config-model/src/test/java/com/yahoo/vespa/model/builder/UserConfigBuilderTest.java18
-rw-r--r--config-model/src/test/java/com/yahoo/vespa/model/builder/xml/dom/DomConfigPayloadBuilderTest.java11
-rw-r--r--configserver/pom.xml6
-rw-r--r--model-integration/src/main/javacc/ModelParser.jj2
-rw-r--r--searchcore/src/vespa/searchcore/config/proton.def11
7 files changed, 9 insertions, 73 deletions
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/DomConfigPayloadBuilder.java b/config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/DomConfigPayloadBuilder.java
index 2174616bacf..d77bf28af30 100644
--- a/config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/DomConfigPayloadBuilder.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/DomConfigPayloadBuilder.java
@@ -135,12 +135,7 @@ public class DomConfigPayloadBuilder {
throw new ConfigurationRuntimeException("Element '" + name + "' must have either children or a value");
}
- if (element.hasAttribute("operation")) {
- // leaf array, currently the only supported operation is 'append'
- verifyLegalOperation(element);
- ConfigPayloadBuilder.Array a = payloadBuilder.getArray(name);
- a.append(value);
- } else if ("item".equals(name)) {
+ if ("item".equals(name)) {
if (parentName == null)
throw new ConfigurationRuntimeException("<item> is a reserved keyword for array and map elements");
if (element.hasAttribute("key")) {
@@ -157,16 +152,7 @@ public class DomConfigPayloadBuilder {
private void parseComplex(Element element, List<Element> children, ConfigPayloadBuilder payloadBuilder, String parentName) {
String name = extractName(element);
// Inner value
- if (element.hasAttribute("operation")) {
- // inner array, currently the only supported operation is 'append'
- verifyLegalOperation(element);
- ConfigPayloadBuilder childPayloadBuilder = payloadBuilder.getArray(name).append();
- //Cursor array = node.setArray(name);
- for (Element child : children) {
- //Cursor struct = array.addObject();
- parseElement(child, childPayloadBuilder, name);
- }
- } else if ("item".equals(name)) {
+ if ("item".equals(name)) {
// Reserved item means array/map element as struct
if (element.hasAttribute("key")) {
ConfigPayloadBuilder childPayloadBuilder = payloadBuilder.getMap(parentName).get(element.getAttribute("key"));
@@ -222,14 +208,4 @@ public class DomConfigPayloadBuilder {
}
}
- private void verifyLegalOperation(Element currElem) {
- logger.ifPresent(log -> log.logApplicationPackage(
- Level.WARNING, "The 'operation' attribute is deprecated for removal in Vespa 8. Use 'item' instead."));
-
- String operation = currElem.getAttribute("operation");
- if (! operation.equalsIgnoreCase("append"))
- throw new ConfigurationRuntimeException("The only supported array operation is 'append', got '"
- + operation + "' at XML node '" + XML.getNodePath(currElem, " > ") + "'.");
- }
-
}
diff --git a/config-model/src/main/javacc/SchemaParser.jj b/config-model/src/main/javacc/SchemaParser.jj
index efd5497902e..7ccaf956b43 100644
--- a/config-model/src/main/javacc/SchemaParser.jj
+++ b/config-model/src/main/javacc/SchemaParser.jj
@@ -404,7 +404,7 @@ void rootSchemaItem(ParsedSchema schema) : { }
| rawAsBase64(schema)
| searchStemming(schema)
| importField(schema)
- | rankingConstant(schema) // Deprecated: TODO: Emit warning when on Vespa 8
+ | rankingConstant(schema) // Deprecated: TODO: Vespa > 8: Emit warning
| rankProfile(schema)
| documentSummary(schema)
| fieldOutsideDoc(schema)
@@ -412,7 +412,7 @@ void rootSchemaItem(ParsedSchema schema) : { }
| structOutside(schema)
| annotationOutside(schema)
| fieldSet(schema)
- | onnxModelInSchema(schema) // Deprecated: TODO: Emit warning when on Vespa 8
+ | onnxModelInSchema(schema) // Deprecated: TODO: Vespa > 8: Emit warning
)
}
@@ -2258,7 +2258,7 @@ void constant(ParsedSchema schema, ParsedRankProfile profile) :
profile.add(new RankProfile.Constant(name, type, valuePath));
}
)
- | // Deprecated forms (TODO: Add warning on Vespa 8):
+ | // Deprecated forms (TODO: Vespa > 8: Add warning):
( constantValue(profile, name) | constantTensor(profile, name) )
)
)
diff --git a/config-model/src/test/java/com/yahoo/vespa/model/builder/UserConfigBuilderTest.java b/config-model/src/test/java/com/yahoo/vespa/model/builder/UserConfigBuilderTest.java
index 114038b884e..3b2b022bbf9 100644
--- a/config-model/src/test/java/com/yahoo/vespa/model/builder/UserConfigBuilderTest.java
+++ b/config-model/src/test/java/com/yahoo/vespa/model/builder/UserConfigBuilderTest.java
@@ -53,24 +53,6 @@ public class UserConfigBuilderTest {
}
@Test
- public void require_that_arrays_config_is_resolved() {
- Element configRoot = getDocument("<config name=\"test.arraytypes\">" +
- " <intarr operation=\"append\">13</intarr>" +
- " <intarr operation=\"append\">10</intarr>" +
- " <intarr operation=\"append\">1337</intarr>" +
- "</config>");
- UserConfigRepo map = UserConfigBuilder.build(configRoot, configDefinitionStore, new BaseDeployLogger());
- assertFalse(map.isEmpty());
- ConfigDefinitionKey key = new ConfigDefinitionKey("arraytypes", "test");
- assertNotNull(map.get(key));
- ArraytypesConfig config = createConfig(ArraytypesConfig.class, map.get(key));
- assertEquals(3, config.intarr().size());
- assertEquals(13, config.intarr(0));
- assertEquals(10, config.intarr(1));
- assertEquals(1337, config.intarr(2));
- }
-
- @Test
public void require_that_arrays_of_structs_are_resolved() {
Element configRoot = getDocument(
" <config name='vespa.configdefinition.specialtokens'>" +
diff --git a/config-model/src/test/java/com/yahoo/vespa/model/builder/xml/dom/DomConfigPayloadBuilderTest.java b/config-model/src/test/java/com/yahoo/vespa/model/builder/xml/dom/DomConfigPayloadBuilderTest.java
index a20ce425ac0..90b859e09a3 100644
--- a/config-model/src/test/java/com/yahoo/vespa/model/builder/xml/dom/DomConfigPayloadBuilderTest.java
+++ b/config-model/src/test/java/com/yahoo/vespa/model/builder/xml/dom/DomConfigPayloadBuilderTest.java
@@ -122,17 +122,6 @@ public class DomConfigPayloadBuilderTest {
}
@Test
- public void append_to_leaf_array() {
- // Simulate user config from vespa-services.xml
- Reader xmlConfig = new StringReader("<?xml version=\"1.0\" encoding=\"utf-8\" ?>" +
- "<config name=\"a.function-test\">" +
- " <intarr operation=\"append\">1</intarr>" +
- " <intarr operation=\"append\">2</intarr>" +
- "</config> ");
- assertPayload("{\"intarr\":[\"1\",\"2\"]}", getDocument(xmlConfig));
- }
-
- @Test
public void camel_case_via_dashes() {
Reader xmlConfig = new StringReader("<?xml version=\"1.0\" encoding=\"utf-8\" ?>" +
"<config name=\"test.function-test\">" +
diff --git a/configserver/pom.xml b/configserver/pom.xml
index 755e2b662df..9de371aba39 100644
--- a/configserver/pom.xml
+++ b/configserver/pom.xml
@@ -14,8 +14,8 @@
<dependencies>
<!-- BEGIN Jersey deps.
- TODO: remove after Vespa 8 is released, and provision-controller does not import any Jersey related packages.
- Also, remove all package-info.java files for jersey/jackson packages. -->
+ TODO: Vespa > 8, and provision-controller does not import any Jersey related packages:
+ Remove, and remove all package-info.java files for jersey/jackson packages. -->
<dependency>
<groupId>com.fasterxml.jackson.jaxrs</groupId>
@@ -295,7 +295,7 @@
<artifactId>bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
- <!-- TODO Vespa 8: remove importPackage when the jackson-jaxrs-json-provider bundle is no longer installed in jdisc -->
+ <!-- TODO: Vespa > 8: remove importPackage when the jackson-jaxrs-json-provider bundle is no longer installed in jdisc -->
<!-- added to ensure using the same class as orchestrator, core-dump-reporter, provision-controller and controller-clients -->
<importPackage>com.fasterxml.jackson.jaxrs.json;version="[2.12.6,3)"</importPackage>
</configuration>
diff --git a/model-integration/src/main/javacc/ModelParser.jj b/model-integration/src/main/javacc/ModelParser.jj
index c850d223612..323522abce8 100644
--- a/model-integration/src/main/javacc/ModelParser.jj
+++ b/model-integration/src/main/javacc/ModelParser.jj
@@ -248,7 +248,7 @@ void constant() :
}
}
)
- | // Deprecated forms (TODO: Add warning on Vespa 8):
+ | // Deprecated forms (TODO: Vespa > 8: Add warning ):
( constantValue(name) | constantTensor(name) )
)
)
diff --git a/searchcore/src/vespa/searchcore/config/proton.def b/searchcore/src/vespa/searchcore/config/proton.def
index bb664ea1743..ffd9db2f58b 100644
--- a/searchcore/src/vespa/searchcore/config/proton.def
+++ b/searchcore/src/vespa/searchcore/config/proton.def
@@ -383,17 +383,6 @@ lidspacecompaction.allowedlidbloat int default=1
## The lid bloat factor must be >= allowedlidbloatfactor before considering compaction.
lidspacecompaction.allowedlidbloatfactor double default=0.01
-## DEPRECATED (no longer used): Remove on Vespa 8
-## The delay (in seconds) for when the last remove batch operation would be considered to block lid space compaction.
-##
-## When considering compaction, if the document meta store has received a remove batch operation in the last delay seconds,
-## the lid space compaction job is blocked. It is considered again at the next regular interval (see above).
-##
-## Remove batch operations are used when deleting buckets on a content node.
-## This functionality ensures that during massive deleting of buckets (e.g. as part of redistribution of data to a new node),
-## lid space compaction do not interfere, but instead is applied after deleting of buckets is complete.
-lidspacecompaction.removebatchblockdelay double default=2.0
-
## The rate (ops / second) of remove batch operations for when to block lid space compaction.
##
## When considering compaction, if the current observed rate of remove batch operations