mirror of https://github.com/apache/lucene.git
SOLR-9915: PeerSync alreadyInSync check is not backwards compatible and results in full replication during a rolling restart
This commit is contained in:
parent
f3306786a1
commit
5b1f6b2ba4
|
@ -370,6 +370,10 @@ Other Changes
|
||||||
* SOLR-9899: StandardDirectoryFactory should use optimizations for all FilterDirectorys not just NRTCachingDirectory.
|
* SOLR-9899: StandardDirectoryFactory should use optimizations for all FilterDirectorys not just NRTCachingDirectory.
|
||||||
(Mark Miller)
|
(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 ==================
|
================== 6.3.0 ==================
|
||||||
|
|
||||||
Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.
|
Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.
|
||||||
|
|
|
@ -336,8 +336,14 @@ public class PeerSync {
|
||||||
ShardResponse srsp = shardHandler.takeCompletedOrError();
|
ShardResponse srsp = shardHandler.takeCompletedOrError();
|
||||||
if (srsp == null) break;
|
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 {
|
try {
|
||||||
IndexFingerprint otherFingerprint = IndexFingerprint.fromObject(srsp.getSolrResponse().getResponse().get("fingerprint"));
|
IndexFingerprint otherFingerprint = IndexFingerprint.fromObject(replicaFingerprint);
|
||||||
IndexFingerprint ourFingerprint = IndexFingerprint.getFingerprint(core, Long.MAX_VALUE);
|
IndexFingerprint ourFingerprint = IndexFingerprint.getFingerprint(core, Long.MAX_VALUE);
|
||||||
if(IndexFingerprint.compare(otherFingerprint, ourFingerprint) == 0) {
|
if(IndexFingerprint.compare(otherFingerprint, ourFingerprint) == 0) {
|
||||||
log.info("We are already in sync. No need to do a PeerSync ");
|
log.info("We are already in sync. No need to do a PeerSync ");
|
||||||
|
|
Loading…
Reference in New Issue