lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thelabd...@apache.org
Subject svn commit: r1650123 - in /lucene/dev/trunk/solr: CHANGES.txt core/src/java/org/apache/solr/core/JmxMonitoredMap.java core/src/java/org/apache/solr/handler/ReplicationHandler.java
Date Wed, 07 Jan 2015 17:35:20 GMT
Author: thelabdude
Date: Wed Jan  7 17:35:20 2015
New Revision: 1650123

URL: http://svn.apache.org/r1650123
Log:
SOLR-6918: No need to log exceptions (as warn) generated when creating MBean stats if core
is shutting down

Modified:
    lucene/dev/trunk/solr/CHANGES.txt
    lucene/dev/trunk/solr/core/src/java/org/apache/solr/core/JmxMonitoredMap.java
    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=1650123&r1=1650122&r2=1650123&view=diff
==============================================================================
--- lucene/dev/trunk/solr/CHANGES.txt (original)
+++ lucene/dev/trunk/solr/CHANGES.txt Wed Jan  7 17:35:20 2015
@@ -650,6 +650,9 @@ Other Changes
 
 * 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 ==================
 
 Bug Fixes

Modified: lucene/dev/trunk/solr/core/src/java/org/apache/solr/core/JmxMonitoredMap.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/java/org/apache/solr/core/JmxMonitoredMap.java?rev=1650123&r1=1650122&r2=1650123&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/java/org/apache/solr/core/JmxMonitoredMap.java (original)
+++ lucene/dev/trunk/solr/core/src/java/org/apache/solr/core/JmxMonitoredMap.java Wed Jan
 7 17:35:20 2015
@@ -16,6 +16,7 @@
  */
 package org.apache.solr.core;
 
+import org.apache.lucene.store.AlreadyClosedException;
 import org.apache.solr.common.SolrException;
 import org.apache.solr.common.util.NamedList;
 import org.apache.solr.core.SolrConfig.JmxConfiguration;
@@ -279,7 +280,9 @@ public class JmxMonitoredMap<K, V> exten
           }
         }
       } 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

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=1650123&r1=1650122&r2=1650123&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 Wed
Jan  7 17:35:20 2015
@@ -572,7 +572,7 @@ public class ReplicationHandler extends
     NamedList list = super.getStatistics();
     if (core != null) {
       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(GENERATION, null == vInfo ? 0 : vInfo.generation);
 



Mime
View raw message