Apache Lucene open-source search software
SOLR-2036: don't automatically use ram estimator from stats page
Yonik Seeley80659afa983a
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txtindex 8f4918d57ef..0656a02c131 100644--- a/solr/CHANGES.txt+++ b/solr/CHANGES.txt@@ -400,6 +400,9 @@ Bug Fixes* SOLR-2008: avoid possible RejectedExecutionException w/autoCommitby making SolreCore close the UpdateHandler before closing theSearchExecutor. (NarasimhaRaju, hossman)++* SOLR-2036: Avoid expensive fieldCache ram estimation for the+ admin stats page. (yonik)Other Changesdiff --git a/solr/src/java/org/apache/solr/search/SolrFieldCacheMBean.java b/solr/src/java/org/apache/solr/search/SolrFieldCacheMBean.javaindex 24e6d59817b..aa81b7b7205 100644--- a/solr/src/java/org/apache/solr/search/SolrFieldCacheMBean.java+++ b/solr/src/java/org/apache/solr/search/SolrFieldCacheMBean.java@@ -64,16 +64,18 @@ public class SolrFieldCacheMBean implements SolrInfoMBean {stats.add("entry#" + i, e.toString());}- Insanity[] insanity = checker.checkSanity(entries);+ Insanity[] insanity = checker.check(entries);stats.add("insanity_count", insanity.length);for (int i = 0; i < insanity.length; i++) {+ /** RAM estimation is both CPU and memory intensive... we don't want to do it unless asked.// we only estimate the size of insane entriesfor (CacheEntry e : insanity[i].getCacheEntries()) {// don't re-estimate if we've already done it.if (null == e.getEstimatedSize()) e.estimateSize();}+ **/stats.add("insanity#" + i, insanity[i].toString());}