Skip to content

Apache Lucene open-source search software

SOLR-667: acceptableSize was always set to maxSize

Yonik Seeleybeb67ada0f59
diff --git a/src/java/org/apache/solr/search/FastLRUCache.java b/src/java/org/apache/solr/search/FastLRUCache.java
index e40b4798a7b..110c0a9e5a0 100644
--- a/src/java/org/apache/solr/search/FastLRUCache.java
+++ b/src/java/org/apache/solr/search/FastLRUCache.java
@@ -62,7 +62,8 @@ public class FastLRUCache implements SolrCache {
} else {
acceptableLimit = Integer.parseInt(str);
}
- acceptableLimit = Math.max(limit,acceptableLimit);
+ // acceptable limit should be somehwere between minLimit and limit
+ acceptableLimit = Math.max(minLimit, acceptableLimit);
str = (String) args.get("initialSize");
final int initialSize = str == null ? limit : Integer.parseInt(str);