SOLR-2036: don't automatically use ram estimator from stats page

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@984589 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Yonik Seeley 2010-08-11 21:33:28 +00:00
parent 92f4310c11
commit 80659afa98
2 changed files with 6 additions and 1 deletions

View File

@ -401,6 +401,9 @@ Bug Fixes
by making SolreCore close the UpdateHandler before closing the by making SolreCore close the UpdateHandler before closing the
SearchExecutor. (NarasimhaRaju, hossman) SearchExecutor. (NarasimhaRaju, hossman)
* SOLR-2036: Avoid expensive fieldCache ram estimation for the
admin stats page. (yonik)
Other Changes Other Changes
---------------------- ----------------------

View File

@ -64,16 +64,18 @@ public class SolrFieldCacheMBean implements SolrInfoMBean {
stats.add("entry#" + i, e.toString()); stats.add("entry#" + i, e.toString());
} }
Insanity[] insanity = checker.checkSanity(entries); Insanity[] insanity = checker.check(entries);
stats.add("insanity_count", insanity.length); stats.add("insanity_count", insanity.length);
for (int i = 0; i < insanity.length; i++) { 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 entries // we only estimate the size of insane entries
for (CacheEntry e : insanity[i].getCacheEntries()) { for (CacheEntry e : insanity[i].getCacheEntries()) {
// don't re-estimate if we've already done it. // don't re-estimate if we've already done it.
if (null == e.getEstimatedSize()) e.estimateSize(); if (null == e.getEstimatedSize()) e.estimateSize();
} }
**/
stats.add("insanity#" + i, insanity[i].toString()); stats.add("insanity#" + i, insanity[i].toString());
} }