You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by GitBox <gi...@apache.org> on 2023/01/04 22:12:21 UTC

[GitHub] [solr] hiteshk25 commented on a diff in pull request #1242: SOLR-16580: Avoid making copies of DocCollection for PRS updates

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-unsubscribe@solr.apache.org

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


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