[
https://issues.apache.org/jira/browse/SOLR-17330?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17856940#comment-17856940
]
Eric Pugh commented on SOLR-17330:
----------------------------------
I went ahead and merged this one, and I added it to Changes only to make sure
to track the change that Pierre did. I like another ticket to get the
EnvUtils, maybe one that does that everywhere in Solr?
> 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
> Assignee: Eric Pugh
> Priority: Trivial
> Time Spent: 10m
> Remaining Estimate: 0h
>
> 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: [email protected]
For additional commands, e-mail: [email protected]