You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "epugh (via GitHub)" <gi...@apache.org> on 2025/11/30 12:32:59 UTC
[PR] SOLR-15349: Remove solrcore.properties support [solr]
epugh opened a new pull request, #3905:
URL: https://github.com/apache/solr/pull/3905
https://issues.apache.org/jira/browse/SOLR-15349
# Description
According to the JIRA, solrcore.properties has been deprecated, though in looking closer, it appears that mentioning has been hidden/removed, but the code is still there.
# Solution
I have removed the solrcore.properties support from CoreDescriptor. In the process, I see that we still support the concept of a custom properties file for a core, and loading that. Therefore I updated the unit test to exercise that code path.
I am thinking that we should rename `TestSolrCoreProperties.java` to `TestCustomCoreProperties.java` as we no longer have a `solrcore.properties` concept.
Now, if the whole properties for a Core concept is no longer relevant, I'd be happy to remove the whole thing!
I will backport to 9x a deprecation on `CoreDescriptor`. If 10 releases before this gets sorted, then I guess this will be a 11x feature.
# Tests
Updated unit test
--
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: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-15349: Remove solrcore.properties support [solr]
Posted by "epugh (via GitHub)" <gi...@apache.org>.
epugh merged PR #3905:
URL: https://github.com/apache/solr/pull/3905
--
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: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-15349: Remove solrcore.properties support [solr]
Posted by "dsmiley (via GitHub)" <gi...@apache.org>.
dsmiley commented on PR #3905:
URL: https://github.com/apache/solr/pull/3905#issuecomment-3612364201
Great; thanks
--
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: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-15349: Remove solrcore.properties support [solr]
Posted by "epugh (via GitHub)" <gi...@apache.org>.
epugh commented on PR #3905:
URL: https://github.com/apache/solr/pull/3905#issuecomment-3593816184
@dsmiley before I move forward on this (and maybe @janhoy you have an opinoin), the PR as is keeps the custom properties being loaded in for a core... I want to make sure that is a "good thing" ;-)
--
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: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-15349: Remove solrcore.properties support [solr]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #3905:
URL: https://github.com/apache/solr/pull/3905#discussion_r2573633693
##########
solr/core/src/test/org/apache/solr/TestSolrCoreProperties.java:
##########
@@ -61,12 +62,17 @@ public static void beforeTest() throws Exception {
Properties p = new Properties();
p.setProperty("foo.foo1", "f1");
p.setProperty("foo.foo2", "f2");
- try (Writer fos =
- Files.newBufferedWriter(confDir.resolve("solrcore.properties"), StandardCharsets.UTF_8)) {
+ var coreCustomProperties = confDir.resolve("core_custom_properties.properties");
+ try (Writer fos = Files.newBufferedWriter(coreCustomProperties, StandardCharsets.UTF_8)) {
p.store(fos, null);
}
- Files.createFile(collDir.resolve("core.properties"));
+ Properties coreProperties = new Properties();
+ coreProperties.setProperty(CoreDescriptor.CORE_PROPERTIES, coreCustomProperties.toString());
Review Comment:
Using an absolute path (via `toString()`) instead of a relative path is fragile and inconsistent with the documented behavior. According to the javadoc in `CoreDescriptor.loadExtraProperties()`, "File paths are taken as read from the core's instance directory if they are not absolute."
Consider using a relative path instead:
```java
coreProperties.setProperty(CoreDescriptor.CORE_PROPERTIES, "conf/core_custom_properties.properties");
```
This would be more consistent with the expected usage pattern and clearer in intent.
```suggestion
coreProperties.setProperty(CoreDescriptor.CORE_PROPERTIES, "conf/core_custom_properties.properties");
```
--
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: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org