mirror of https://github.com/apache/lucene.git
SOLR-10169: PeerSync will hit an NPE on no response errors when looking for fingerprint.
This commit is contained in:
parent
7edfd9c410
commit
a417a2cd6a
|
@ -161,7 +161,9 @@ Bug Fixes
|
|||
(Amrit Sarkar, Varun Thacker)
|
||||
|
||||
* SOLR-11840: Fix bin/solr help-text inconsistencies (Jason Gerlowski)
|
||||
|
||||
|
||||
* SOLR-10169: PeerSync will hit an NPE on no response errors when looking for fingerprint. (Erick Erickson)
|
||||
|
||||
Optimizations
|
||||
----------------------
|
||||
|
||||
|
|
|
@ -388,9 +388,13 @@ public class PeerSync implements SolrMetricProducer {
|
|||
ShardResponse srsp = shardHandler.takeCompletedOrError();
|
||||
if (srsp == null) break;
|
||||
|
||||
Object replicaFingerprint = srsp.getSolrResponse().getResponse().get("fingerprint");
|
||||
Object replicaFingerprint = null;
|
||||
if (srsp.getSolrResponse() != null && srsp.getSolrResponse().getResponse() != null) {
|
||||
replicaFingerprint = srsp.getSolrResponse().getResponse().get("fingerprint");
|
||||
}
|
||||
|
||||
if (replicaFingerprint == null) {
|
||||
log.warn("Replica did not return a fingerprint - possibly an older Solr version");
|
||||
log.warn("Replica did not return a fingerprint - possibly an older Solr version or exception");
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -402,7 +406,7 @@ public class PeerSync implements SolrMetricProducer {
|
|||
return true;
|
||||
}
|
||||
} catch(IOException e) {
|
||||
log.warn("Could not cofirm if we are already in sync. Continue with PeerSync");
|
||||
log.warn("Could not confirm if we are already in sync. Continue with PeerSync");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue