murblanc commented on a change in pull request #2133: URL: https://github.com/apache/lucene-solr/pull/2133#discussion_r548488944
########## File path: solr/core/src/java/org/apache/solr/cluster/placement/impl/CollectionMetricsBuilder.java ########## @@ -61,18 +80,19 @@ public ShardMetrics build() { replicaMetricsBuilders.forEach((name, replicaBuilder) -> { ReplicaMetrics metrics = replicaBuilder.build(); metricsMap.put(name, metrics); - // skip leader from map if (replicaBuilder.leader) { if (leaderMetricsBuilder == null) { leaderMetricsBuilder = replicaBuilder; } - if (replicaBuilder != leaderMetricsBuilder) { Review comment: Why did you remove that check? It doesn't deserve a new if statement (just `else` to the `leaderMetricsBuilder == null` condition is equivalent) but it's interesting, it means two replicas pretend they are shard leader... Maybe error log? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org