From fd85c3623b75cad84c28a4d26801d78f3d842d49 Mon Sep 17 00:00:00 2001 From: Mark Robert Miller Date: Thu, 6 Feb 2014 19:01:51 +0000 Subject: [PATCH] SOLR-5702: Log config name found for collection at info level. git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1565399 13f79535-47bb-0310-9956-ffa450edef68 --- solr/CHANGES.txt | 3 +++ .../org/apache/solr/common/cloud/ZkStateReader.java | 13 +++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index 7cd43cc9bb7..f327a6a85c2 100644 --- a/solr/CHANGES.txt +++ b/solr/CHANGES.txt @@ -371,6 +371,9 @@ Other Changes * SOLR-5629: SolrIndexSearcher.name should include core name. (Shikhar Bhushan via shalin) +* SOLR-5702: Log config name found for collection at info level. + (Christine Poerschke via Mark Miller) + ================== 4.6.1 ================== Versions of Major Components diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java b/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java index 240a8cb3883..9f3847c322f 100644 --- a/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java +++ b/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java @@ -144,10 +144,15 @@ public class ZkStateReader { configName = props.getStr(CONFIGNAME_PROP); } - if (configName != null && !zkClient.exists(CONFIGS_ZKNODE + "/" + configName, true)) { - log.error("Specified config does not exist in ZooKeeper:" + configName); - throw new ZooKeeperException(ErrorCode.SERVER_ERROR, - "Specified config does not exist in ZooKeeper:" + configName); + if (configName != null) { + if (!zkClient.exists(CONFIGS_ZKNODE + "/" + configName, true)) { + log.error("Specified config does not exist in ZooKeeper:" + configName); + throw new ZooKeeperException(ErrorCode.SERVER_ERROR, + "Specified config does not exist in ZooKeeper:" + configName); + } else if (log.isInfoEnabled()) { + log.info("path={} {}={} specified config exists in ZooKeeper", + new Object[] {path, CONFIGNAME_PROP, configName}); + } } return configName;