From 97bd65b51e942fb81eeb43b14b03cad8d2474c6d Mon Sep 17 00:00:00 2001 From: Jon Bratseth Date: Thu, 20 Jul 2023 14:50:22 +0200 Subject: 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. --- .../main/java/com/yahoo/schema/parser/ConvertParsedFields.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'config-model') 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()) { -- cgit v1.2.3