You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ma...@apache.org on 2020/09/02 04:37:16 UTC

[lucene-solr] 02/02: @696 Trying to go after rare case we can stop watching an collection we are still interested in.

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

markrmiller pushed a commit to branch reference_impl_dev
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git

commit 66c6d729e87ddb0ac089ee25b334d9f0a75be056
Author: markrmiller@gmail.com <ma...@gmail.com>
AuthorDate: Tue Sep 1 23:28:25 2020 -0500

    @696 Trying to go after rare case we can stop watching an collection we are still interested in.
---
 solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java b/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java
index e204bd0..78704f7 100644
--- a/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java
+++ b/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java
@@ -252,7 +252,7 @@ public class ZkStateReader implements SolrCloseable {
     final Set<T> stateWatchers = ConcurrentHashMap.newKeySet();
 
     public boolean canBeRemoved() {
-      return coreRefCount.get() + stateWatchers.size() == 0;
+      return coreRefCount.get() <=0 && stateWatchers.size() <= 0;
     }
 
   }