You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ab...@apache.org on 2018/02/28 12:23:53 UTC
lucene-solr:branch_7x: SOLR-12031: Fix a confusion in index size
units in the simulator framework.
Repository: lucene-solr
Updated Branches:
refs/heads/branch_7x 84b635205 -> f48fc470f
SOLR-12031: Fix a confusion in index size units in the simulator framework.
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/f48fc470
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/f48fc470
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/f48fc470
Branch: refs/heads/branch_7x
Commit: f48fc470f665d2eda1b959ec3472cd5f711afaa0
Parents: 84b6352
Author: Andrzej Bialecki <ab...@apache.org>
Authored: Wed Feb 28 13:18:27 2018 +0100
Committer: Andrzej Bialecki <ab...@apache.org>
Committed: Wed Feb 28 13:23:42 2018 +0100
----------------------------------------------------------------------
.../solr/cloud/autoscaling/sim/SimClusterStateProvider.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/f48fc470/solr/core/src/test/org/apache/solr/cloud/autoscaling/sim/SimClusterStateProvider.java
----------------------------------------------------------------------
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.java
index 19ccc51..d4be8df 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 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