diff options
author | Martin Polden <mpolden@mpolden.no> | 2020-03-24 12:37:37 +0100 |
---|---|---|
committer | Martin Polden <mpolden@mpolden.no> | 2020-03-24 12:37:37 +0100 |
commit | 3d6822b0cb2a6e64911d599da4fbb3b04b94a617 (patch) | |
tree | 5de40ea50f3e92cad0ab84a503281938582d3569 /config-model | |
parent | 76a82eeed23094e0f2b70b1325115b8b1e521904 (diff) |
Add note regarding allocation changes
Diffstat (limited to 'config-model')
-rw-r--r-- | config-model/src/main/java/com/yahoo/vespa/model/container/xml/ContainerModelBuilder.java | 7 | ||||
-rw-r--r-- | config-model/src/main/java/com/yahoo/vespa/model/content/StorageGroup.java | 4 |
2 files changed, 11 insertions, 0 deletions
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/xml/ContainerModelBuilder.java b/config-model/src/main/java/com/yahoo/vespa/model/container/xml/ContainerModelBuilder.java index 1b2df3d47e3..c1f793e255d 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/container/xml/ContainerModelBuilder.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/container/xml/ContainerModelBuilder.java @@ -568,6 +568,13 @@ public class ContainerModelBuilder extends ConfigModelBuilder<ContainerModel> { cluster.setJvmGCOptions(buildJvmGCOptions(context.getDeployState().zone(), jvmGCOptions, context.getDeployState().isHosted())); } + /** + * Add nodes to cluster according to the given containerElement. + * + * Note: DO NOT change allocation behaviour to allow version X and Y of the config-model to allocate a different set + * of nodes. Such changes must be guarded by a common condition (e.g. feature flag) so the behaviour can be changed + * simultaneously for all active config models. + */ private void addNodesFromXml(ApplicationContainerCluster cluster, Element containerElement, ConfigModelContext context) { Element nodesElement = XML.getChild(containerElement, "nodes"); if (nodesElement == null) { diff --git a/config-model/src/main/java/com/yahoo/vespa/model/content/StorageGroup.java b/config-model/src/main/java/com/yahoo/vespa/model/content/StorageGroup.java index adfc703f747..f0c374b398f 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/content/StorageGroup.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/content/StorageGroup.java @@ -376,6 +376,10 @@ public class StorageGroup { * specified using a group count attribute. * <li>Neither element is present: Create a single node. * </ul> + * + * Note: DO NOT change allocation behaviour to allow version X and Y of the config-model to allocate a different + * set of nodes. Such changes must be guarded by a common condition (e.g. feature flag) so the behaviour can be + * changed simultaneously for all active config models. */ private GroupBuilder collectGroup(boolean isHosted, Optional<ModelElement> groupElement, Optional<ModelElement> nodesElement, String name, String index) { StorageGroup group = new StorageGroup( |