iamsanjay commented on code in PR #2247:
URL: https://github.com/apache/solr/pull/2247#discussion_r1480239150


##########
solr/core/src/java/org/apache/solr/search/CacheConfig.java:
##########
@@ -94,11 +95,8 @@ public static Map<String, CacheConfig> getMultipleConfigs(
   }
 
   public static CacheConfig getConfig(SolrConfig solrConfig, ConfigNode node, 
String xpath) {
-    if (!node.exists() || !"true".equals(node.attributes().get("enabled", 
"true"))) {
-      Map<String, Object> m = 
solrConfig.getOverlay().getEditableSubProperties(xpath);
-      if (m == null) return null;
-      List<String> parts = StrUtils.splitSmart(xpath, '/');
-      return getConfig(solrConfig, parts.get(parts.size() - 1), 
Collections.emptyMap(), xpath);

Review Comment:
   Here, Earlier If the cache is disabled in SolrConfig.xml then If it has 
overlay properties, only those will be used to create the cache object. 
   
   However, I think overlay is only meant to override the old values. As per 
the new changes added, If cache is disabled in the solrConfig.xml and enabled 
via overlay API, and nothing new added in overlay, then It's going to use the 
old attributes from the SolrConfig.XML
   
   ```
   <documentCache
         enabled=false
         size="399"
         initialSize="99"
         autowarmCount="0"/>
   ```
   And after enabling it via overlay API, the documentCache will be initialized 
using `size="399" and initialSize="99"`
   
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to