Apache Lucene open-source search software
SOLR-9915: PeerSync alreadyInSync check is not backwards compatible and results in full replication during a rolling restart
Noble Paul5b1f6b2ba48f
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txtindex afcd295db73..8cba8a995b3 100644--- a/solr/CHANGES.txt+++ b/solr/CHANGES.txt@@ -370,6 +370,10 @@ Other Changes* SOLR-9899: StandardDirectoryFactory should use optimizations for all FilterDirectorys not just NRTCachingDirectory.(Mark Miller)+* SOLR-9915: PeerSync alreadyInSync check is not backwards compatible and results in full replication during a rolling restart+ (Tim Owen via noble)++================== 6.3.0 ==================Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.diff --git a/solr/core/src/java/org/apache/solr/update/PeerSync.java b/solr/core/src/java/org/apache/solr/update/PeerSync.javaindex 1f61a568b2f..12ba7ae7b4e 100644--- a/solr/core/src/java/org/apache/solr/update/PeerSync.java+++ b/solr/core/src/java/org/apache/solr/update/PeerSync.java@@ -335,9 +335,15 @@ public class PeerSync {for (;;) {ShardResponse srsp = shardHandler.takeCompletedOrError();if (srsp == null) break;++ Object replicaFingerprint = srsp.getSolrResponse().getResponse().get("fingerprint");+ if (replicaFingerprint == null) {+ log.warn("Replica did not return a fingerprint - possibly an older Solr version");+ continue;+ }try {- IndexFingerprint otherFingerprint = IndexFingerprint.fromObject(srsp.getSolrResponse().getResponse().get("fingerprint"));+ IndexFingerprint otherFingerprint = IndexFingerprint.fromObject(replicaFingerprint);IndexFingerprint ourFingerprint = IndexFingerprint.getFingerprint(core, Long.MAX_VALUE);if(IndexFingerprint.compare(otherFingerprint, ourFingerprint) == 0) {log.info("We are already in sync. No need to do a PeerSync ");