lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From er...@apache.org
Subject svn commit: r1540881 - in /lucene/dev/trunk/solr: CHANGES.txt core/src/java/org/apache/solr/handler/ReplicationHandler.java
Date Mon, 11 Nov 2013 23:27:33 GMT
Author: erick
Date: Mon Nov 11 23:27:33 2013
New Revision: 1540881

URL: http://svn.apache.org/r1540881
Log:
SOLR-3397: Insure that replication and SolrCloud are compatible. Actually, just log a warning
if SolrCloud is detected and master or slave is configured in solrconfig.xml

Modified:
    lucene/dev/trunk/solr/CHANGES.txt
    lucene/dev/trunk/solr/core/src/java/org/apache/solr/handler/ReplicationHandler.java

Modified: lucene/dev/trunk/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/CHANGES.txt?rev=1540881&r1=1540880&r2=1540881&view=diff
==============================================================================
--- lucene/dev/trunk/solr/CHANGES.txt (original)
+++ lucene/dev/trunk/solr/CHANGES.txt Mon Nov 11 23:27:33 2013
@@ -209,6 +209,9 @@ Other Changes
 
 * SOLR-5401: SolrResourceLoader logs a warning if a deprecated (factory) class
   is used in schema or config.  (Uwe Schindler)
+  
+* SOLR-3397: Warn if master or slave replication is enabled in SolrCloud mode. (Erick
+  Erickson)
 
 ==================  4.5.1 ==================
 

Modified: lucene/dev/trunk/solr/core/src/java/org/apache/solr/handler/ReplicationHandler.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/java/org/apache/solr/handler/ReplicationHandler.java?rev=1540881&r1=1540880&r2=1540881&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/java/org/apache/solr/handler/ReplicationHandler.java (original)
+++ lucene/dev/trunk/solr/core/src/java/org/apache/solr/handler/ReplicationHandler.java Mon
Nov 11 23:27:33 2013
@@ -861,6 +861,14 @@ public class ReplicationHandler extends 
     }
     NamedList master = (NamedList) initArgs.get("master");
     boolean enableMaster = isEnabled( master );
+
+    if (enableMaster || enableSlave) {
+      if (core.getCoreDescriptor().getCoreContainer().getZkController() != null) {
+        LOG.warn("SolrCloud is enabled for core " + core.getName() + " but so is old-style
replication. Make sure you" +
+            " intend this behavior, it usually indicates a mis-configuration. Master setting
is " +
+            Boolean.toString(enableMaster) + " and slave setting is " + Boolean.toString(enableSlave));
+      }
+    }
     
     if (!enableSlave && !enableMaster) {
       enableMaster = true;



Mime
View raw message