From b4fe911cc8e4bddff18226bc8c98a2deb735a8fc Mon Sep 17 00:00:00 2001 From: Andrzej Bialecki Date: Thu, 14 Nov 2019 21:21:15 +0100 Subject: [PATCH] SOLR-13817: Remove legacy SolrCache implementations. --- solr/CHANGES.txt | 6 + .../solr/collection1/conf/solrconfig.xml | 12 +- .../conf/dataimport-solrconfig.xml | 12 +- .../conf/contentstream-solrconfig.xml | 12 +- .../dataimport-nodatasource-solrconfig.xml | 12 +- .../conf/dataimport-solrconfig.xml | 12 +- .../solr/collection1/conf/solrconfig.xml | 8 +- .../solr/collection1/conf/solrconfig-ltr.xml | 4 +- .../conf/solrconfig-ltr_Th10_10.xml | 4 +- .../collection1/conf/solrconfig-multiseg.xml | 4 +- .../solr/collection1/conf/solrconfig.xml | 8 +- .../java/org/apache/solr/core/SolrConfig.java | 4 +- .../org/apache/solr/search/CacheConfig.java | 2 +- .../org/apache/solr/search/CaffeineCache.java | 3 + .../org/apache/solr/search/FastLRUCache.java | 394 ---------- .../java/org/apache/solr/search/LFUCache.java | 412 ----------- .../java/org/apache/solr/search/LRUCache.java | 547 -------------- .../solr/search/stats/LRUStatsCache.java | 8 +- .../apache/solr/util/ConcurrentLFUCache.java | 692 ------------------ .../conf/solrconfig-analytics-query.xml | 10 +- .../conf/solrconfig-cache-enable-disable.xml | 6 +- .../collection1/conf/solrconfig-caching.xml | 6 +- .../conf/solrconfig-collapseqparser.xml | 10 +- .../conf/solrconfig-deeppaging.xml | 4 +- .../conf/solrconfig-delaying-component.xml | 6 +- .../collection1/conf/solrconfig-elevate.xml | 6 +- .../conf/solrconfig-managed-schema.xml | 6 +- .../collection1/conf/solrconfig-minhash.xml | 10 +- .../collection1/conf/solrconfig-noopregen.xml | 2 +- .../conf/solrconfig-plugcollector.xml | 10 +- .../conf/solrconfig-sortingresponse.xml | 2 +- .../collection1/conf/solrconfig-spatial.xml | 4 +- .../solr/collection1/conf/solrconfig-tlog.xml | 8 +- .../solr/collection1/conf/solrconfig.xml | 10 +- .../solr/collection1/conf/solrconfig_perf.xml | 6 +- .../configsets/_default/conf/solrconfig.xml | 31 +- .../exitable-directory/conf/solrconfig.xml | 8 +- .../org/apache/solr/SolrInfoBeanTest.java | 6 +- .../solr/core/TestSolrConfigHandler.java | 12 +- .../apache/solr/search/TestFastLRUCache.java | 594 --------------- .../org/apache/solr/search/TestLFUCache.java | 673 ----------------- .../org/apache/solr/search/TestLRUCache.java | 301 -------- .../apache/solr/search/TestSolr4Spatial2.java | 3 + .../apache/solr/search/TestSolrCachePerf.java | 5 +- .../example-DIH/solr/db/conf/solrconfig.xml | 29 +- .../example-DIH/solr/mail/conf/solrconfig.xml | 29 +- .../example-DIH/solr/solr/conf/solrconfig.xml | 29 +- solr/example/files/conf/solrconfig.xml | 29 +- .../configsets/_default/conf/solrconfig.xml | 31 +- .../conf/solrconfig.xml | 33 +- solr/solr-ref-guide/src/learning-to-rank.adoc | 2 +- .../src/query-settings-in-solrconfig.adoc | 37 +- solr/solr-ref-guide/src/spatial-search.adoc | 2 +- 53 files changed, 214 insertions(+), 3902 deletions(-) delete mode 100644 solr/core/src/java/org/apache/solr/search/FastLRUCache.java delete mode 100644 solr/core/src/java/org/apache/solr/search/LFUCache.java delete mode 100644 solr/core/src/java/org/apache/solr/search/LRUCache.java delete mode 100644 solr/core/src/java/org/apache/solr/util/ConcurrentLFUCache.java delete mode 100644 solr/core/src/test/org/apache/solr/search/TestFastLRUCache.java delete mode 100644 solr/core/src/test/org/apache/solr/search/TestLFUCache.java delete mode 100644 solr/core/src/test/org/apache/solr/search/TestLRUCache.java diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index 81462b0cc62..173ae250268 100644 --- a/solr/CHANGES.txt +++ b/solr/CHANGES.txt @@ -72,6 +72,9 @@ Upgrade Notes followed by a space (e.g. {shape=square, color=yellow} rather than {shape=square,color=yellow}) for consistency with other java.util.Map implementations based on AbstractMap (Chris Hennick). +* SOLR-13817: Legacy SolrCache implementations (LRUCache, LFUCache, FastLRUCache) have been removed. + Users have to modify their existing configurations to use CaffeineCache instead. (ab) + Improvements ---------------------- @@ -104,6 +107,9 @@ Upgrade Notes * org.apache.solr.search.grouping.distributed.command.QueryCommand.Builder has new method 'setMainQuery' which is used to set top-level query. build() would fail if called without setting mainQuery +* SOLR-13817: Deprecate legacy SolrCache implementations. Users are encouraged to transition their + configurations to use org.apache.solr.search.CaffeineCache instead. (ab) + New Features --------------------- * SOLR-13821: A Package store to store and load package artifacts (noble, Ishan Chattopadhyaya) diff --git a/solr/contrib/clustering/src/test-files/clustering/solr/collection1/conf/solrconfig.xml b/solr/contrib/clustering/src/test-files/clustering/solr/collection1/conf/solrconfig.xml index 50714a7e74c..abf50f8af22 100644 --- a/solr/contrib/clustering/src/test-files/clustering/solr/collection1/conf/solrconfig.xml +++ b/solr/contrib/clustering/src/test-files/clustering/solr/collection1/conf/solrconfig.xml @@ -77,10 +77,10 @@ unordered sets of *all* documents that match a query. When a new searcher is opened, its caches may be prepopulated or "autowarmed" using data from caches in the old searcher. - autowarmCount is the number of items to prepopulate. For LRUCache, + autowarmCount is the number of items to prepopulate. For CaffeineCache, the autowarmed items will be the most recently accessed items. Parameters: - class - the SolrCache implementation (currently only LRUCache) + class - the SolrCache implementation (currently only CaffeineCache) size - the maximum number of entries in the cache initialSize - the initial capacity (number of entries) of the cache. (seel java.util.HashMap) @@ -88,7 +88,7 @@ and old cache. --> @@ -97,7 +97,7 @@ document ids (DocList) based on a query, a sort, and the range of documents requested. --> @@ -105,7 +105,7 @@ @@ -125,7 +125,7 @@ of solr.search.CacheRegenerator if autowarming is desired. --> @@ -78,7 +78,7 @@ document ids (DocList) based on a query, a sort, and the range of documents requested. --> @@ -86,7 +86,7 @@ @@ -106,7 +106,7 @@ of solr.search.CacheRegenerator if autowarming is desired. --> @@ -78,7 +78,7 @@ document ids (DocList) based on a query, a sort, and the range of documents requested. --> @@ -86,7 +86,7 @@ @@ -106,7 +106,7 @@ of solr.search.CacheRegenerator if autowarming is desired. --> @@ -80,7 +80,7 @@ document ids (DocList) based on a query, a sort, and the range of documents requested. --> @@ -88,7 +88,7 @@ @@ -108,7 +108,7 @@ of solr.search.CacheRegenerator if autowarming is desired. --> @@ -78,7 +78,7 @@ document ids (DocList) based on a query, a sort, and the range of documents requested. --> @@ -86,7 +86,7 @@ @@ -106,7 +106,7 @@ of solr.search.CacheRegenerator if autowarming is desired. --> @@ -98,7 +98,7 @@ @@ -113,7 +113,7 @@ diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-caching.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-caching.xml index c972a9c5467..80884fe46f6 100644 --- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-caching.xml +++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-caching.xml @@ -21,19 +21,19 @@ diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-collapseqparser.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-collapseqparser.xml index 099f2de699f..f5d2dbac99e 100644 --- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-collapseqparser.xml +++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-collapseqparser.xml @@ -83,25 +83,25 @@ that match a particular query. --> @@ -113,7 +113,7 @@ - - + + 50 500 diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-delaying-component.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-delaying-component.xml index c1b1b02ca19..b23ad51c125 100644 --- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-delaying-component.xml +++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-delaying-component.xml @@ -41,19 +41,19 @@ diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-elevate.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-elevate.xml index ae8b4eae942..61b471df47b 100644 --- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-elevate.xml +++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-elevate.xml @@ -56,19 +56,19 @@ that match a particular query. --> diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-managed-schema.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-managed-schema.xml index 84307ffcf53..2c26e5ad66f 100644 --- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-managed-schema.xml +++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-managed-schema.xml @@ -37,21 +37,21 @@ diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-minhash.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-minhash.xml index 3df6f2bc13b..fa118f5c75c 100644 --- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-minhash.xml +++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-minhash.xml @@ -95,25 +95,25 @@ that match a particular query. --> @@ -125,7 +125,7 @@ @@ -112,7 +112,7 @@ @@ -125,7 +125,7 @@ - @@ -433,11 +424,11 @@ Caches results of searches - ordered lists of document ids (DocList) based on a query, a sort, and the range of documents requested. - Additional supported parameter by LRUCache: + Additional supported parameter by CaffeineCache: maxRamMB - the maximum amount of RAM (in MB) that this cache is allowed to occupy --> - @@ -448,14 +439,14 @@ document). Since Lucene internal document ids are transient, this cache will not be autowarmed. --> - - @@ -413,7 +402,7 @@ Caches results of searches - ordered lists of document ids (DocList) based on a query, a sort, and the range of documents requested. --> - @@ -424,14 +413,14 @@ document). Since Lucene internal document ids are transient, this cache will not be autowarmed. --> - - @@ -416,7 +405,7 @@ Caches results of searches - ordered lists of document ids (DocList) based on a query, a sort, and the range of documents requested. --> - @@ -427,14 +416,14 @@ document). Since Lucene internal document ids are transient, this cache will not be autowarmed. --> - - @@ -413,7 +402,7 @@ Caches results of searches - ordered lists of document ids (DocList) based on a query, a sort, and the range of documents requested. --> - @@ -424,14 +413,14 @@ document). Since Lucene internal document ids are transient, this cache will not be autowarmed. --> - - @@ -413,11 +402,11 @@ Caches results of searches - ordered lists of document ids (DocList) based on a query, a sort, and the range of documents requested. - Additional supported parameter by LRUCache: + Additional supported parameter by CaffeineCache: maxRamMB - the maximum amount of RAM (in MB) that this cache is allowed to occupy --> - @@ -428,7 +417,7 @@ document). Since Lucene internal document ids are transient, this cache will not be autowarmed. --> - @@ -440,7 +429,7 @@ even if not configured here. --> - @@ -433,11 +424,11 @@ Caches results of searches - ordered lists of document ids (DocList) based on a query, a sort, and the range of documents requested. - Additional supported parameter by LRUCache: + Additional supported parameter by CaffeineCache: maxRamMB - the maximum amount of RAM (in MB) that this cache is allowed to occupy --> - @@ -448,14 +439,14 @@ document). Since Lucene internal document ids are transient, this cache will not be autowarmed. --> - - @@ -448,11 +437,11 @@ Caches results of searches - ordered lists of document ids (DocList) based on a query, a sort, and the range of documents requested. - Additional supported parameter by LRUCache: + Additional supported parameter by CaffeineCache: maxRamMB - the maximum amount of RAM (in MB) that this cache is allowed to occupy --> - @@ -463,14 +452,14 @@ document). Since Lucene internal document ids are transient, this cache will not be autowarmed. --> -