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

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

commit 07db177f5bb8ad3c625ea23d0c4724f37f67f68f
Author: Noble Paul <[email protected]>
AuthorDate: Fri Jun 10 17:52:32 2022 +1000

    SOLR-16248 : equals() & hashCode() impl of DocCollection does not consider 
PRS
---
 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