diff --git a/solr/core/src/java/org/apache/solr/cloud/ElectionContext.java b/solr/core/src/java/org/apache/solr/cloud/ElectionContext.java index 65cc11d6e84..ca5634044d5 100644 --- a/solr/core/src/java/org/apache/solr/cloud/ElectionContext.java +++ b/solr/core/src/java/org/apache/solr/cloud/ElectionContext.java @@ -226,13 +226,13 @@ final class ShardLeaderElectionContext extends ShardLeaderElectionContextBase { } // solrcloud_debug - if (Boolean.getBoolean("solr.cloud.debug")) { + if (log.isDebugEnabled()) { try { RefCounted searchHolder = core .getNewestSearcher(false); SolrIndexSearcher searcher = searchHolder.get(); try { - System.err.println(core.getCoreDescriptor().getCoreContainer() + log.debug(core.getCoreDescriptor().getCoreContainer() .getZkController().getNodeName() + " synched " + searcher.search(new MatchAllDocsQuery(), 1).totalHits); diff --git a/solr/core/src/java/org/apache/solr/cloud/RecoveryStrategy.java b/solr/core/src/java/org/apache/solr/cloud/RecoveryStrategy.java index 438b75fd70e..6ad73c8ba62 100644 --- a/solr/core/src/java/org/apache/solr/cloud/RecoveryStrategy.java +++ b/solr/core/src/java/org/apache/solr/cloud/RecoveryStrategy.java @@ -156,13 +156,13 @@ public class RecoveryStrategy extends Thread implements ClosableThread { } // solrcloud_debug - if (Boolean.getBoolean("solr.cloud.debug")) { + if (log.isDebugEnabled()) { try { RefCounted searchHolder = core .getNewestSearcher(false); SolrIndexSearcher searcher = searchHolder.get(); try { - System.err.println(core.getCoreDescriptor().getCoreContainer() + log.debug(core.getCoreDescriptor().getCoreContainer() .getZkController().getNodeName() + " replicated " + searcher.search(new MatchAllDocsQuery(), 1).totalHits @@ -387,13 +387,13 @@ public class RecoveryStrategy extends Thread implements ClosableThread { log.info("PeerSync Recovery was successful - registering as Active. core=" + coreName); // solrcloud_debug - if (Boolean.getBoolean("solr.cloud.debug")) { + if (log.isDebugEnabled()) { try { RefCounted searchHolder = core .getNewestSearcher(false); SolrIndexSearcher searcher = searchHolder.get(); try { - System.err.println(core.getCoreDescriptor() + log.debug(core.getCoreDescriptor() .getCoreContainer().getZkController().getNodeName() + " synched " + searcher.search(new MatchAllDocsQuery(), 1).totalHits); @@ -536,13 +536,13 @@ public class RecoveryStrategy extends Thread implements ClosableThread { } // solrcloud_debug - if (Boolean.getBoolean("solr.cloud.debug")) { + if (log.isDebugEnabled()) { try { RefCounted searchHolder = core .getNewestSearcher(false); SolrIndexSearcher searcher = searchHolder.get(); try { - System.err.println(core.getCoreDescriptor().getCoreContainer() + log.debug(core.getCoreDescriptor().getCoreContainer() .getZkController().getNodeName() + " replayed " + searcher.search(new MatchAllDocsQuery(), 1).totalHits); diff --git a/solr/core/src/java/org/apache/solr/cloud/SyncStrategy.java b/solr/core/src/java/org/apache/solr/cloud/SyncStrategy.java index 537f737f470..8249d2732e8 100644 --- a/solr/core/src/java/org/apache/solr/cloud/SyncStrategy.java +++ b/solr/core/src/java/org/apache/solr/cloud/SyncStrategy.java @@ -92,11 +92,7 @@ public class SyncStrategy { return false; } log.info("Sync replicas to " + ZkCoreNodeProps.getCoreUrl(leaderProps)); - // TODO: look at our state usage of sync - // zkController.publish(core, ZkStateReader.SYNC); - - // solrcloud_debug - // System.out.println("SYNC UP"); + if (core.getUpdateHandler().getUpdateLog() == null) { log.error("No UpdateLog found - cannot sync"); return false; diff --git a/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java b/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java index 80072af6c4b..53ebed42404 100644 --- a/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java +++ b/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java @@ -796,13 +796,13 @@ public class CoreAdminHandler extends RequestHandlerBase { boolean success = syncStrategy.sync(zkController, core, new ZkNodeProps(props)); // solrcloud_debug - if (Boolean.getBoolean("solr.cloud.debug")) { + if (log.isDebugEnabled()) { try { RefCounted searchHolder = core .getNewestSearcher(false); SolrIndexSearcher searcher = searchHolder.get(); try { - System.err.println(core.getCoreDescriptor().getCoreContainer() + log.debug(core.getCoreDescriptor().getCoreContainer() .getZkController().getNodeName() + " synched " + searcher.search(new MatchAllDocsQuery(), 1).totalHits); @@ -915,7 +915,7 @@ public class CoreAdminHandler extends RequestHandlerBase { } // solrcloud_debug - if (Boolean.getBoolean("solr.cloud.debug")) { + if (log.isDebugEnabled()) { try { ; LocalSolrQueryRequest r = new LocalSolrQueryRequest(core, @@ -927,7 +927,7 @@ public class CoreAdminHandler extends RequestHandlerBase { .getNewestSearcher(false); SolrIndexSearcher searcher = searchHolder.get(); try { - System.err.println(core.getCoreDescriptor().getCoreContainer() + log.debug(core.getCoreDescriptor().getCoreContainer() .getZkController().getNodeName() + " to replicate " + searcher.search(new MatchAllDocsQuery(), 1).totalHits