murblanc commented on a change in pull request #2148: URL: https://github.com/apache/lucene-solr/pull/2148#discussion_r551623735
########## File path: solr/solrj/src/java/org/apache/solr/common/cloud/DocCollection.java ########## @@ -253,6 +297,16 @@ public void forEachReplica(BiConsumer<String, Replica> consumer) { public int getZNodeVersion(){ return znodeVersion; } + public int getChildNodesVersion() { + return perReplicaStates == null ? -1 : perReplicaStates.cversion; + } + + public boolean isModified(int dataVersion, int childVersion) { + if (dataVersion > znodeVersion) return true; Review comment: Body of method can be replaced by: `return (dataVersion > znodeVersion) || (childVersion > getChildNodesVersion());` ---------------------------------------------------------------- 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