You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by no...@apache.org on 2017/01/03 18:09:01 UTC
lucene-solr:master: SOLR-9915: PeerSync alreadyInSync check is not
backwards compatible and results in full replication during a rolling restart
Repository: lucene-solr
Updated Branches:
refs/heads/master f3306786a -> 5b1f6b2ba
SOLR-9915: PeerSync alreadyInSync check is not backwards compatible and results in full replication during a rolling restart
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/5b1f6b2b
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/5b1f6b2b
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/5b1f6b2b
Branch: refs/heads/master
Commit: 5b1f6b2ba48f8afc6c822c097d0500eb2ed66815
Parents: f330678
Author: Noble Paul <no...@apache.org>
Authored: Wed Jan 4 04:38:51 2017 +1030
Committer: Noble Paul <no...@apache.org>
Committed: Wed Jan 4 04:38:51 2017 +1030
----------------------------------------------------------------------
solr/CHANGES.txt | 4 ++++
solr/core/src/java/org/apache/solr/update/PeerSync.java | 8 +++++++-
2 files changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5b1f6b2b/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index afcd295..8cba8a9 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.
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5b1f6b2b/solr/core/src/java/org/apache/solr/update/PeerSync.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/update/PeerSync.java b/solr/core/src/java/org/apache/solr/update/PeerSync.java
index 1f61a56..12ba7ae 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 ");