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 f288b615398 SOLR-16248 : equals() & hashCode() impl of DocCollection 
does not consider PRS (#902)
f288b615398 is described below

commit f288b61539871b82c19779aea7e2e219f6fafb1a
Author: Noble Paul <[email protected]>
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 270bd92db0a..ce30eceac37 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
@@ -425,12 +425,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());
   }
 
   /**

Reply via email to