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/17 06:22:58 UTC

[solr] branch branch_9_1 updated: SOLR-16248 : equals() & hashCode() impl of DocCollection does not consider PRS (#902)

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

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


The following commit(s) were added to refs/heads/branch_9_1 by this push:
     new f67e662e611 SOLR-16248 : equals() & hashCode() impl of DocCollection does not consider PRS (#902)
f67e662e611 is described below

commit f67e662e61104f0b4266ce5f6b5754d096f870ab
Author: Noble Paul <no...@users.noreply.github.com>
AuthorDate: Sun Jun 12 23:10:56 2022 -0400

    SOLR-16248 : equals() & hashCode() impl of DocCollection does not consider PRS (#902)
---
 solr/solrj/src/java/org/apache/solr/common/cloud/DocCollection.java | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/DocCollection.java b/solr/solrj/src/java/org/apache/solr/common/cloud/DocCollection.java
index c6eea5c0778..6d4f6394d45 100644
--- a/solr/solrj/src/java/org/apache/solr/common/cloud/DocCollection.java
+++ b/solr/solrj/src/java/org/apache/solr/common/cloud/DocCollection.java
@@ -427,12 +427,13 @@ public class DocCollection extends ZkNodeProps implements Iterable<Slice> {
     DocCollection other = (DocCollection) that;
     return super.equals(that)
         && Objects.equals(this.name, other.name)
-        && this.znodeVersion == other.znodeVersion;
+        && this.znodeVersion == other.znodeVersion
+        && this.getChildNodesVersion() == other.getChildNodesVersion();
   }
 
   @Override
   public int hashCode() {
-    return Objects.hash(name, znodeVersion);
+    return Objects.hash(name, znodeVersion, getChildNodesVersion());
   }
 
   /**