Apache Lucene open-source search software
SOLR-12031: Fix a confusion in index size units in the simulator framework.
Andrzej Bialecki1485b7a4d72f
diff --git a/solr/core/src/test/org/apache/solr/cloud/autoscaling/sim/SimClusterStateProvider.java b/solr/core/src/test/org/apache/solr/cloud/autoscaling/sim/SimClusterStateProvider.javaindex 19ccc51ff28..d4be8df78de 100644--- a/solr/core/src/test/org/apache/solr/cloud/autoscaling/sim/SimClusterStateProvider.java+++ b/solr/core/src/test/org/apache/solr/cloud/autoscaling/sim/SimClusterStateProvider.java@@ -396,8 +396,10 @@ public class SimClusterStateProvider implements ClusterStateProvider {List<ReplicaInfo> replicas = nodeReplicaMap.computeIfAbsent(nodeId, n -> new ArrayList<>());// mark replica as activereplicaInfo.getVariables().put(ZkStateReader.STATE_PROP, Replica.State.ACTIVE.toString());- // add a property expected in tests- replicaInfo.getVariables().put(Suggestion.coreidxsize, SimCloudManager.DEFAULT_IDX_SIZE_BYTES);+ // add a property expected in Policy calculations and in tests+ // NOTE: this confusingly reuses INDEX.sizeInBytes name but+ // the actual value is expressed in GB units!!!+ replicaInfo.getVariables().put(Suggestion.coreidxsize, 1);replicas.add(replicaInfo);// at this point nuke our cached DocCollection state