SOLR-12031: Fix a confusion in index size units in the simulator framework.

This commit is contained in:
Andrzej Bialecki 2018-02-28 13:18:27 +01:00
parent eb80ca968e
commit 1485b7a4d7
1 changed files with 4 additions and 2 deletions

View File

@ -396,8 +396,10 @@ public class SimClusterStateProvider implements ClusterStateProvider {
List<ReplicaInfo> replicas = nodeReplicaMap.computeIfAbsent(nodeId, n -> new ArrayList<>());
// mark replica as active
replicaInfo.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