Apache Solr open-source search software
SOLR-2791 -- Replication: abortfetch command is broken if replication was started by fetchindex command instead of a regular poll.
Shalin Shekhar Mangar9ed62f999bf1
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txtindex 076ca87b884..f32046414e0 100644--- a/solr/CHANGES.txt+++ b/solr/CHANGES.txt@@ -538,6 +538,9 @@ Bug Fixesfailed due to sort by function changes introduced in SOLR-1297(Mitsu Hadeishi, hossman)+* SOLR-2791: Replication: abortfetch command is broken if replication was started+ by fetchindex command instead of a regular poll (Yury Kats via shalin)+Other Changes----------------------diff --git a/solr/core/src/java/org/apache/solr/handler/ReplicationHandler.java b/solr/core/src/java/org/apache/solr/handler/ReplicationHandler.javaindex 4467aff995e..fe94860baed 100644--- a/solr/core/src/java/org/apache/solr/handler/ReplicationHandler.java+++ b/solr/core/src/java/org/apache/solr/handler/ReplicationHandler.java@@ -183,8 +183,9 @@ public class ReplicationHandler extends RequestHandlerBase implements SolrCoreAwrsp.add("message","No slave configured");}} else if (command.equalsIgnoreCase(CMD_ABORT_FETCH)) {- if (snapPuller != null){- snapPuller.abortPull();+ SnapPuller temp = tempSnapPuller;+ if (temp != null){+ temp.abortPull();rsp.add(STATUS, OK_STATUS);} else {rsp.add(STATUS,ERR_STATUS);