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:20:06 UTC

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

Repository: lucene-solr
Updated Branches:
  refs/heads/master eb80ca968 -> 1485b7a4d


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/1485b7a4
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/1485b7a4
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/1485b7a4

Branch: refs/heads/master
Commit: 1485b7a4d72f5bf4123206d59716e75fb2706374
Parents: eb80ca9
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:18:27 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/1485b7a4/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