diff options
author | Jon Bratseth <bratseth@gmail.com> | 2021-05-03 10:09:35 +0200 |
---|---|---|
committer | Jon Bratseth <bratseth@gmail.com> | 2021-05-03 10:09:35 +0200 |
commit | 64d4f671944b75d26422ecff4f686179f5615882 (patch) | |
tree | b94f027125bbd5bae269e882af75a431f7dacc77 /config-model/src | |
parent | de4141be3af652739ec12273f9d0bc6faacf077f (diff) |
Pick the same slobroks each time
Diffstat (limited to 'config-model/src')
-rw-r--r-- | config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/DomAdminV4Builder.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/DomAdminV4Builder.java b/config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/DomAdminV4Builder.java index a0673824907..5e6140c83a8 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/DomAdminV4Builder.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/DomAdminV4Builder.java @@ -153,8 +153,8 @@ public class DomAdminV4Builder extends DomAdminBuilderBase { List<HostResource> picked = sortedContainerHostsFrom(model, count, !retired); // if we can return multiple hosts, include retired nodes which would have been picked before - // (probably - assuming all previous nodes were retired, which is always true for a single cluster - // at the moment (Sept 2015)) to ensure a smoother transition between the old and new topology + // (probably - assuming all previous nodes were retired, which is always true for a single cluster, + // to ensure a smoother transition between the old and new topology // by including both new and old nodes during the retirement period picked.addAll(sortedContainerHostsFrom(model, count, retired)); @@ -166,6 +166,7 @@ public class DomAdminV4Builder extends DomAdminBuilderBase { List<HostResource> hosts = model.getCluster().getContainers().stream() .filter(container -> retired == container.isRetired()) .map(Container::getHostResource) + .sorted(HostResource::comparePrimarilyByIndexTo) .collect(Collectors.toList()); return hosts.subList(0, Math.min(count, hosts.size())); } |