If you only change that method, doesn't that break the existing 
clusterShape() method?  It appears to be intentionally distinct from 
activeClusterShape() ?

(At a glance, activeClusterShape() is the only one that seems broken based 
on the way compareActiveReplicaCountsForShards() is defined.)

Perhaps just reafactor the current 
logic in compareActiveReplicaCountsForShards() into 
clusterShape(), and put the logic you propose directly into 
activeClusterShape().

Or ... simpler ...

Redefine the API of compareActiveReplicaCountsForShards to take in an 
Iterable<Slice> instead of DocCollection, and then fix 
activeClusterShape() to pass in collectionState.getActiveSlices() while 
leaving clusterShape() alone.


: Date: Fri, 3 Nov 2023 18:25:52 +0100
: From: Ilan Ginzburg <ilans...@gmail.com>
: Reply-To: dev@solr.apache.org
: To: dev@solr.apache.org
: Subject: Change active replica counting in tests
: 
: Hi,
: 
: I plan to change the method compareActiveReplicaCountsForShards() in
: SolrCloudTestCase (code link
: 
<https://github.com/apache/solr/blob/main/solr/test-framework/src/java/org/apache/solr/cloud/SolrCloudTestCase.java#L238>)
: that counts the total number of active replicas for a collection to only
: count active replicas *of active shards*.
: 
: I will create a Jira and a PR for the change.
: This mail is in case someone thinks it's a bad idea (and says so quickly
: please 😅) so I don't invest time for nothing.
: 
: Thanks,
: Ilan
: 

-Hoss
http://www.lucidworks.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@solr.apache.org
For additional commands, e-mail: dev-h...@solr.apache.org

Reply via email to