Pierre Salagnac created SOLR-17330:
--------------------------------------

             Summary: Default value for 'loadOnStartup' is fuzzy
                 Key: SOLR-17330
                 URL: https://issues.apache.org/jira/browse/SOLR-17330
             Project: Solr
          Issue Type: Bug
      Security Level: Public (Default Security Level. Issues are Public)
    Affects Versions: 9.6
            Reporter: Pierre Salagnac


Each core has property {{loadOnStartup}} to decide if the core is opened at 
start-up or delayed until first access.

When creating a new core and *not* specifying the property in the request, we 
take the default value from {{CoreDescriptor.defaultProperties}} which is 
{{true}}.
{code:java|title= defaultProperties}
  private static final Map<String, String> defaultProperties = Map.of(...., 
CORE_LOADONSTARTUP, "true");
{code}

Then, when we retrieve the value of the property in 
{{CoreDescriptor.isLoadOnStartup()}}, if the property is not the core stored 
properties, default value is {{false}}.
{code:java|title=isLoadOnStartup()}
    String tmp = coreProperties.getProperty(CORE_LOADONSTARTUP, "false");
{code}


Impact is low since all cores are created with value {{"true"}} when not 
explicitly created, using value from the default properties. This just makes 
the code confusing to read.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to