diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index e1af396aefe..150e918f32f 100644 --- a/solr/CHANGES.txt +++ b/solr/CHANGES.txt @@ -81,7 +81,6 @@ Optimizations speedups were up to 2.5x for production of filters, and up to 10x for query evaluation with embedded term range queres that resulted in filter cache hits. (yonik) - Other Changes ---------------------- @@ -107,6 +106,7 @@ Other Changes * SOLR-7441: Improve overall robustness of the Streaming stack: Streaming API, Streaming Expressions, Parallel SQL (Joel Bernstein) +* SOLR-8132: HDFSDirectoryFactory now defaults to using the global block cache. (Mark Miller) ================== 5.4.0 ================== diff --git a/solr/core/src/java/org/apache/solr/core/HdfsDirectoryFactory.java b/solr/core/src/java/org/apache/solr/core/HdfsDirectoryFactory.java index a67338b0a1a..8ba779e71fe 100644 --- a/solr/core/src/java/org/apache/solr/core/HdfsDirectoryFactory.java +++ b/solr/core/src/java/org/apache/solr/core/HdfsDirectoryFactory.java @@ -61,7 +61,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.google.common.annotations.VisibleForTesting; -import com.google.common.base.Preconditions; import com.google.common.cache.CacheBuilder; import com.google.common.cache.RemovalListener; import com.google.common.cache.RemovalNotification; @@ -184,7 +183,7 @@ public class HdfsDirectoryFactory extends CachingDirectoryFactory implements Sol } boolean blockCacheEnabled = getConfig(BLOCKCACHE_ENABLED, true); - boolean blockCacheGlobal = getConfig(BLOCKCACHE_GLOBAL, false); // default to false for back compat + boolean blockCacheGlobal = getConfig(BLOCKCACHE_GLOBAL, true); boolean blockCacheReadEnabled = getConfig(BLOCKCACHE_READ_ENABLED, true); final HdfsDirectory hdfsDir; diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-tlog-with-delayingcomponent.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-tlog-with-delayingcomponent.xml index 6184891c2f5..a9cfed96c95 100644 --- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-tlog-with-delayingcomponent.xml +++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-tlog-with-delayingcomponent.xml @@ -28,7 +28,7 @@ ${solr.hdfs.blockcache.blocksperbank:1024} ${solr.hdfs.home:} ${solr.hdfs.confdir:} - ${solr.hdfs.blockcache.global:false} + ${solr.hdfs.blockcache.global:true} ${solr.data.dir:} diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-tlog.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-tlog.xml index 41a7edea474..37290a95faf 100644 --- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-tlog.xml +++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-tlog.xml @@ -28,7 +28,7 @@ ${solr.hdfs.blockcache.blocksperbank:1024} ${solr.hdfs.home:} ${solr.hdfs.confdir:} - ${solr.hdfs.blockcache.global:false} + ${solr.hdfs.blockcache.global:true} ${solr.data.dir:}