summaryrefslogtreecommitdiffstats
path: root/config-model
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@vespa.ai>2023-07-20 14:50:22 +0200
committerJon Bratseth <bratseth@vespa.ai>2023-07-20 14:50:22 +0200
commit97bd65b51e942fb81eeb43b14b03cad8d2474c6d (patch)
tree3dee5ca95c3ac4380e716ba0959e09a97493a820 /config-model
parent06b3744b44d2a2d4fbe18f9121af2a0c57fd9683 (diff)
Don't scale down if we are likely to scale back up
When we decide to scale number of nodes down we'll see a lower ideal load because we need to be able to handle one node going down. This may lead us to be closer to ideal (at current peak load) than otherwise anticipated, such that we are quite likely to soon scale back up. This checks for that and avoids scaling down dimensions where this is the case.
Diffstat (limited to 'config-model')
-rw-r--r--config-model/src/main/java/com/yahoo/schema/parser/ConvertParsedFields.java8
1 files changed, 4 insertions, 4 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 8a95edd0467..7fd16826667 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
@@ -188,10 +188,10 @@ public class ConvertParsedFields {
for (var dictOp : parsed.getDictionaryOptions()) {
var dictionary = field.getOrSetDictionary();
switch (dictOp) {
- case HASH: dictionary.updateType(Dictionary.Type.HASH); break;
- case BTREE: dictionary.updateType(Dictionary.Type.BTREE); break;
- case CASED: dictionary.updateMatch(Case.CASED); break;
- case UNCASED: dictionary.updateMatch(Case.UNCASED); break;
+ case HASH -> dictionary.updateType(Dictionary.Type.HASH);
+ case BTREE -> dictionary.updateType(Dictionary.Type.BTREE);
+ case CASED -> dictionary.updateMatch(Case.CASED);
+ case UNCASED -> dictionary.updateMatch(Case.UNCASED);
}
}
for (var index : parsed.getIndexes()) {