Apache Lucene open-source search software
SOLR-8132: HDFSDirectoryFactory now defaults to using the global block cache.
Mark Robert Miller20a8df7a5dc7
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txtindex e1af396aefe..150e918f32f 100644--- a/solr/CHANGES.txt+++ b/solr/CHANGES.txt@@ -81,7 +81,6 @@ Optimizationsspeedups were up to 2.5x for production of filters, and up to 10x for query evaluation withembedded 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.javaindex 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.xmlindex 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 @@<int name="solr.hdfs.blockcache.blocksperbank">${solr.hdfs.blockcache.blocksperbank:1024}</int><str name="solr.hdfs.home">${solr.hdfs.home:}</str><str name="solr.hdfs.confdir">${solr.hdfs.confdir:}</str>- <str name="solr.hdfs.blockcache.global">${solr.hdfs.blockcache.global:false}</str>+ <str name="solr.hdfs.blockcache.global">${solr.hdfs.blockcache.global:true}</str></directoryFactory><dataDir>${solr.data.dir:}</dataDir>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.xmlindex 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 @@<int name="solr.hdfs.blockcache.blocksperbank">${solr.hdfs.blockcache.blocksperbank:1024}</int><str name="solr.hdfs.home">${solr.hdfs.home:}</str><str name="solr.hdfs.confdir">${solr.hdfs.confdir:}</str>- <str name="solr.hdfs.blockcache.global">${solr.hdfs.blockcache.global:false}</str>+ <str name="solr.hdfs.blockcache.global">${solr.hdfs.blockcache.global:true}</str></directoryFactory><dataDir>${solr.data.dir:}</dataDir>