ErickErickson commented on a change in pull request #1579:
URL: https://github.com/apache/lucene-solr/pull/1579#discussion_r445263282



##########
File path: solr/solrj/src/java/org/apache/solr/common/cloud/DocCollection.java
##########
@@ -383,10 +382,12 @@ public boolean equals(Object that) {
     return super.equals(that) && Objects.equals(this.name, other.name) && 
this.znodeVersion == other.znodeVersion;
   }
 
-//  @Override
-//  public int hashCode() {
-//    throw new UnsupportedOperationException("TODO unimplemented 
DocCollection.hashCode");
-//  }
+  @Override
+  public int hashCode() {
+    return Objects.hash(super.hashCode(), znodeVersion, name, 
replicationFactor,
+            numNrtReplicas, numTlogReplicas, numPullReplicas, maxShardsPerNode,
+            autoAddReplicas, policy, readOnly);

Review comment:
       Fixed zkNodeProps to return the hash of the propmap. I think for this, 
the name and znodeversion are enough (not even adding returning super.hashCode) 
in the interests of speed. 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to