mirror of https://github.com/apache/lucene.git
SOLR-6918: No need to log exceptions (as warn) generated when creating MBean stats if core is shutting down
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1650123 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c2712551be
commit
812e0c6e6f
|
@ -650,6 +650,9 @@ Other Changes
|
||||||
|
|
||||||
* SOLR-6830: Update Woodstox to 4.4.1 and StAX to 3.1.4. (ab)
|
* SOLR-6830: Update Woodstox to 4.4.1 and StAX to 3.1.4. (ab)
|
||||||
|
|
||||||
|
* SOLR-6918: No need to log exceptions (as warn) generated when creating MBean stats if
|
||||||
|
the core is shutting down (Timothy Potter)
|
||||||
|
|
||||||
================== 4.10.3 ==================
|
================== 4.10.3 ==================
|
||||||
|
|
||||||
Bug Fixes
|
Bug Fixes
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
*/
|
*/
|
||||||
package org.apache.solr.core;
|
package org.apache.solr.core;
|
||||||
|
|
||||||
|
import org.apache.lucene.store.AlreadyClosedException;
|
||||||
import org.apache.solr.common.SolrException;
|
import org.apache.solr.common.SolrException;
|
||||||
import org.apache.solr.common.util.NamedList;
|
import org.apache.solr.common.util.NamedList;
|
||||||
import org.apache.solr.core.SolrConfig.JmxConfiguration;
|
import org.apache.solr.core.SolrConfig.JmxConfiguration;
|
||||||
|
@ -279,7 +280,9 @@ public class JmxMonitoredMap<K, V> extends
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
LOG.warn("Could not getStatistics on info bean {}", infoBean.getName(), e);
|
// don't log issue if the core is closing
|
||||||
|
if (!(SolrException.getRootCause(e) instanceof AlreadyClosedException))
|
||||||
|
LOG.warn("Could not getStatistics on info bean {}", infoBean.getName(), e);
|
||||||
}
|
}
|
||||||
|
|
||||||
MBeanAttributeInfo[] attrInfoArr = attrInfoList
|
MBeanAttributeInfo[] attrInfoArr = attrInfoList
|
||||||
|
|
|
@ -572,7 +572,7 @@ public class ReplicationHandler extends RequestHandlerBase implements SolrCoreAw
|
||||||
NamedList list = super.getStatistics();
|
NamedList list = super.getStatistics();
|
||||||
if (core != null) {
|
if (core != null) {
|
||||||
list.add("indexSize", NumberUtils.readableSize(getIndexSize()));
|
list.add("indexSize", NumberUtils.readableSize(getIndexSize()));
|
||||||
CommitVersionInfo vInfo = getIndexVersion();
|
CommitVersionInfo vInfo = (core != null && !core.isClosed()) ? getIndexVersion(): null;
|
||||||
list.add("indexVersion", null == vInfo ? 0 : vInfo.version);
|
list.add("indexVersion", null == vInfo ? 0 : vInfo.version);
|
||||||
list.add(GENERATION, null == vInfo ? 0 : vInfo.generation);
|
list.add(GENERATION, null == vInfo ? 0 : vInfo.generation);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue