You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by no...@apache.org on 2022/10/18 18:58:03 UTC

[solr] branch main updated: SOLR-16450: waitForState to cleanly unregister watches if there is a failure

This is an automated email from the ASF dual-hosted git repository.

noble pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr.git


The following commit(s) were added to refs/heads/main by this push:
     new 32e0f68a9bc SOLR-16450: waitForState to cleanly unregister watches if there is a failure
32e0f68a9bc is described below

commit 32e0f68a9bc380905746eec0e7d392594ec132fb
Author: Noble Paul <no...@gmail.com>
AuthorDate: Wed Oct 19 05:57:52 2022 +1100

    SOLR-16450: waitForState to cleanly unregister watches if there is a failure
---
 .../src/java/org/apache/solr/common/cloud/ZkStateReader.java            | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/solr/solrj-zookeeper/src/java/org/apache/solr/common/cloud/ZkStateReader.java b/solr/solrj-zookeeper/src/java/org/apache/solr/common/cloud/ZkStateReader.java
index 573cf45b6c5..26239784115 100644
--- a/solr/solrj-zookeeper/src/java/org/apache/solr/common/cloud/ZkStateReader.java
+++ b/solr/solrj-zookeeper/src/java/org/apache/solr/common/cloud/ZkStateReader.java
@@ -1896,9 +1896,9 @@ public class ZkStateReader implements SolrCloseable {
 
           return matches;
         };
-    registerCollectionStateWatcher(collection, watcher);
 
     try {
+      registerCollectionStateWatcher(collection, watcher);
       // wait for the watcher predicate to return true, or time out
       if (!latch.await(wait, unit))
         throw new TimeoutException(