Skip to content

Apache Lucene open-source search software

SOLR-1216

Noble Paulf2343ea9877c
diff --git a/CHANGES.txt b/CHANGES.txt
index 6c7a1972fc4..188147cfe04 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -241,6 +241,8 @@ New Features
61. SOLR-1214: differentiate between solr home and instanceDir .deprecates the method SolrResourceLoader#locateInstanceDir()
and it is renamed to locateSolrHome (noble)
+62. SOLR-1216 : disambiguate the replication command names. 'snappull' becomes 'fetchindex' 'abortsnappull' becomes 'abortfetch' (noble)
+
Optimizations
----------------------
1. SOLR-374: Use IndexReader.reopen to save resources by re-using parts of the
diff --git a/src/java/org/apache/solr/handler/ReplicationHandler.java b/src/java/org/apache/solr/handler/ReplicationHandler.java
index 72678caee56..ff63bf4e689 100644
--- a/src/java/org/apache/solr/handler/ReplicationHandler.java
+++ b/src/java/org/apache/solr/handler/ReplicationHandler.java
@@ -129,7 +129,7 @@ public class ReplicationHandler extends RequestHandlerBase implements SolrCoreAw
getFileList(solrParams, rsp);
} else if (command.equals(CMD_SNAP_SHOOT)) {
doSnapShoot(solrParams, rsp);
- } else if (command.equals(CMD_SNAP_PULL)) {
+ } else if (command.equalsIgnoreCase(CMD_FETCH_INDEX)) {
new Thread() {
public void run() {
doSnapPull(solrParams);
@@ -142,7 +142,7 @@ public class ReplicationHandler extends RequestHandlerBase implements SolrCoreAw
} else if (command.equals(CMD_ENABLE_POLL)) {
if (snapPuller != null)
snapPuller.enablePoll();
- } else if (command.equals(CMD_ABORT_SNAP_PULL)) {
+ } else if (command.equalsIgnoreCase(CMD_ABORT_FETCH)) {
if (snapPuller != null)
snapPuller.abortPull();
} else if (command.equals(CMD_FILE_CHECKSUM)) {
@@ -945,9 +945,9 @@ public class ReplicationHandler extends RequestHandlerBase implements SolrCoreAw
public static final String CMD_SNAP_SHOOT = "snapshoot";
- public static final String CMD_SNAP_PULL = "snappull";
+ public static final String CMD_FETCH_INDEX = "fetchindex";
- public static final String CMD_ABORT_SNAP_PULL = "abortsnappull";
+ public static final String CMD_ABORT_FETCH = "abortfetch";
public static final String CMD_GET_FILE_LIST = "filelist";
diff --git a/src/test/org/apache/solr/handler/TestReplicationHandler.java b/src/test/org/apache/solr/handler/TestReplicationHandler.java
index 949c47791fa..e9e5a82fe53 100644
--- a/src/test/org/apache/solr/handler/TestReplicationHandler.java
+++ b/src/test/org/apache/solr/handler/TestReplicationHandler.java
@@ -321,7 +321,7 @@ public class TestReplicationHandler extends TestCase {
assertEquals(500, masterQueryResult.getNumFound());
// snappull
- String masterUrl = "http://localhost:" + slaveJetty.getLocalPort() + "/solr/replication?command=snappull&masterUrl=";
+ String masterUrl = "http://localhost:" + slaveJetty.getLocalPort() + "/solr/replication?command=fetchindex&masterUrl=";
masterUrl += "http://localhost:" + masterJetty.getLocalPort() + "/solr/replication";
URL url = new URL(masterUrl);
InputStream stream = url.openStream();
diff --git a/src/webapp/web/admin/replication/index.jsp b/src/webapp/web/admin/replication/index.jsp
index c2731be384d..e326d49123d 100644
--- a/src/webapp/web/admin/replication/index.jsp
+++ b/src/webapp/web/admin/replication/index.jsp
@@ -318,11 +318,11 @@ if (detailsMap != null)
String abortParam = request.getParameter("abort");
if (replicateParam != null)
if (replicateParam.equals("now")) {
- executeCommand("snappull", solrcore, rh);
+ executeCommand("fetchindex", solrcore, rh);
}
if (abortParam != null)
if (abortParam.equals("stop")) {
- executeCommand("abortsnappull", solrcore, rh);
+ executeCommand("abortfetch", solrcore, rh);
}
%>
</td>