[ https://issues.apache.org/jira/browse/SOLR-8323?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15264728#comment-15264728 ]
ASF GitHub Bot commented on SOLR-8323: -------------------------------------- Github user dragonsinth commented on a diff in the pull request: https://github.com/apache/lucene-solr/pull/32#discussion_r61643877 --- Diff: solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java --- @@ -256,9 +257,10 @@ public void updateClusterState() throws KeeperException, InterruptedException { refreshLegacyClusterState(null); // Need a copy so we don't delete from what we're iterating over. Collection<String> safeCopy = new ArrayList<>(watchedCollectionStates.keySet()); + Set<String> liveNodes = new HashSet<>(this.liveNodes); --- End diff -- You don't actually need a copy here, since `liveNodes` is an immutable set. > Add CollectionWatcher API to ZkStateReader > ------------------------------------------ > > Key: SOLR-8323 > URL: https://issues.apache.org/jira/browse/SOLR-8323 > Project: Solr > Issue Type: Improvement > Affects Versions: master > Reporter: Alan Woodward > Assignee: Alan Woodward > Attachments: SOLR-8323.patch, SOLR-8323.patch, SOLR-8323.patch, > SOLR-8323.patch > > > An API to watch for changes to collection state would be a generally useful > thing, both internally and for client use. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org