hiteshk25 commented on code in PR #1242:
URL: https://github.com/apache/solr/pull/1242#discussion_r1061927938


##########
solr/solrj/src/java/org/apache/solr/common/cloud/DocCollection.java:
##########
@@ -465,7 +467,11 @@ public boolean isPerReplicaState() {
   }
 
   public PerReplicaStates getPerReplicaStates() {
-    return perReplicaStates;
+    return prsSupplier != null ? prsSupplier.get() : null;

Review Comment:
   What is the purpose of fetching prs state lazily. I think we should fetch in 
doccollection constructor or before it. Also, would be good to make 
doccollection object immutable as caller maybe holding doc collection object 
and that can lead to other concurrency errors/issues?



-- 
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.

To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to