You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-commits@lucene.apache.org by no...@apache.org on 2009/08/27 08:24:21 UTC
svn commit: r808290 -
/lucene/solr/trunk/src/java/org/apache/solr/handler/ReplicationHandler.java
Author: noble
Date: Thu Aug 27 06:24:20 2009
New Revision: 808290
URL: http://svn.apache.org/viewvc?rev=808290&view=rev
Log:
keep the frequently used commands first
Modified:
lucene/solr/trunk/src/java/org/apache/solr/handler/ReplicationHandler.java
Modified: lucene/solr/trunk/src/java/org/apache/solr/handler/ReplicationHandler.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/java/org/apache/solr/handler/ReplicationHandler.java?rev=808290&r1=808289&r2=808290&view=diff
==============================================================================
--- lucene/solr/trunk/src/java/org/apache/solr/handler/ReplicationHandler.java (original)
+++ lucene/solr/trunk/src/java/org/apache/solr/handler/ReplicationHandler.java Thu Aug 27 06:24:20 2009
@@ -109,13 +109,7 @@
}
// This command does not give the current index version of the master
// It gives the current 'replicateable' index version
- if(CMD_ENABLE_REPL.equalsIgnoreCase(command)){
- replicationEnabled.set(true);
- rsp.add(STATUS, OK_STATUS);
- } else if(CMD_DISABLE_REPL.equalsIgnoreCase(command)){
- replicationEnabled.set(false);
- rsp.add(STATUS, OK_STATUS);
- } else if (command.equals(CMD_INDEX_VERSION)) {
+ if (command.equals(CMD_INDEX_VERSION)) {
IndexCommit commitPoint = indexCommitPoint; // make a copy so it won't change
if (commitPoint != null && replicationEnabled.get()) {
rsp.add(CMD_INDEX_VERSION, commitPoint.getVersion());
@@ -179,7 +173,13 @@
} else if (command.equals(CMD_DETAILS)) {
rsp.add(CMD_DETAILS, getReplicationDetails());
RequestHandlerUtils.addExperimentalFormatWarning(rsp);
- }
+ } else if (CMD_ENABLE_REPL.equalsIgnoreCase(command)) {
+ replicationEnabled.set(true);
+ rsp.add(STATUS, OK_STATUS);
+ } else if (CMD_DISABLE_REPL.equalsIgnoreCase(command)) {
+ replicationEnabled.set(false);
+ rsp.add(STATUS, OK_STATUS);
+ }
}
private List<NamedList> getCommits() {