SOLR-2791 -- Replication: abortfetch command is broken if replication was started by fetchindex command instead of a regular poll.

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1175696 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Shalin Shekhar Mangar 2011-09-26 07:13:44 +00:00
parent a6157373d8
commit 9ed62f999b
2 changed files with 6 additions and 2 deletions

View File

@ -538,6 +538,9 @@ Bug Fixes
failed 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
----------------------

View File

@ -183,8 +183,9 @@ public class ReplicationHandler extends RequestHandlerBase implements SolrCoreAw
rsp.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);