Github user slackhappy commented on a diff in the pull request:

    https://github.com/apache/lucene-solr/pull/294#discussion_r157842876
  
    --- Diff: 
solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java ---
    @@ -632,19 +636,24 @@ private void refreshCollectionList(Watcher watcher) 
throws KeeperException, Inte
       }
     
       private class LazyCollectionRef extends ClusterState.CollectionRef {
    -
         private final String collName;
    +    private long lastUpdateTime;
    +    private DocCollection cachedDocCollection;
     
         public LazyCollectionRef(String collName) {
           super(null);
           this.collName = collName;
    +      this.lastUpdateTime = -1;
         }
     
         @Override
    -    public DocCollection get() {
    +    public synchronized DocCollection get() {
    --- End diff --
    
    I thought synchronized here would provide a good enough performance 
increase without the complexity of other approches


---

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

Reply via email to