SOLR-10233: Stop warning users about misconfigured ReplicationHandler when using replica types

This commit is contained in:
Tomas Fernandez Lobbe 2017-06-06 17:23:01 -07:00
parent 97655b880c
commit a03c3369e2
2 changed files with 2 additions and 2 deletions

View File

@ -155,7 +155,7 @@ public class IndexFetcher {
private boolean useExternalCompression = false; private boolean useExternalCompression = false;
private boolean fetchFromLeader = false; boolean fetchFromLeader = false;
private final HttpClient myHttpClient; private final HttpClient myHttpClient;

View File

@ -1217,7 +1217,7 @@ public class ReplicationHandler extends RequestHandlerBase implements SolrCoreAw
NamedList master = (NamedList) initArgs.get("master"); NamedList master = (NamedList) initArgs.get("master");
boolean enableMaster = isEnabled( master ); boolean enableMaster = isEnabled( master );
if (enableMaster || enableSlave) { if (enableMaster || (enableSlave && !currentIndexFetcher.fetchFromLeader)) {
if (core.getCoreContainer().getZkController() != null) { if (core.getCoreContainer().getZkController() != null) {
LOG.warn("SolrCloud is enabled for core " + core.getName() + " but so is old-style replication. Make sure you" + 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 " + " intend this behavior, it usually indicates a mis-configuration. Master setting is " +