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 12:47:21 UTC

[lucene-solr] 01/03: @697 We can still stop watching a collection we actually still care about and is local.

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

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

commit 4f14309ed218253c3c61729ab5d05393f683eddc
Author: markrmiller@gmail.com <ma...@gmail.com>
AuthorDate: Wed Sep 2 06:22:59 2020 -0500

    @697 We can still stop watching a collection we actually still care about and is local.
---
 .../src/java/org/apache/solr/common/cloud/ZkStateReader.java  | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

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 78704f7..38fa54d 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
@@ -1546,8 +1546,7 @@ public class ZkStateReader implements SolrCloseable {
     collectionWatches.compute(collection, (k, v) -> {
       if (v == null)
         return null;
-      if (v.coreRefCount.get() > 0)
-        v.coreRefCount.decrementAndGet();
+      v.coreRefCount.decrementAndGet();
       if (v.canBeRemoved()) {
         watchedCollectionStates.remove(collection);
         lazyCollectionStates.put(collection, new LazyCollectionRef(collection));
@@ -1868,10 +1867,10 @@ public class ZkStateReader implements SolrCloseable {
     }
 
     // Resolve race with unregisterCore.
-    if (!collectionWatches.containsKey(coll)) {
-      watchedCollectionStates.remove(coll);
-      log.debug("Removing uninteresting collection [{}]", coll);
-    }
+//    if (!collectionWatches.containsKey(coll)) {
+//      watchedCollectionStates.remove(coll);
+//      log.debug("Removing uninteresting collection [{}]", coll);
+//    }
 
     return updated;
   }