You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "jaykay12 (via GitHub)" <gi...@apache.org> on 2026/10/07 05:56:23 UTC
[PR] SOLR-18520 | Package Uninstall works in absence of clusterprops.json file [solr]
jaykay12 opened a new pull request, #5052:
URL: https://github.com/apache/solr/pull/5052
https://issues.apache.org/jira/browse/SOLR-18520
While working on this: https://github.com/apache/solr/pull/5047 & testing the Uninstall command, i found this issue which seems like a bug to me.
# Description
Package Uninstall works in absence of clusterprops.json file
# Solution
TBA
# Tests
Please describe the tests you've developed or run to confirm this patch implements the feature or solves the problem.
# Checklist
Please review the following and check all that apply:
- [x] I have reviewed the guidelines for [How to Contribute](https://github.com/apache/solr/blob/main/CONTRIBUTING.md) and my code conforms to the standards described there to the best of my ability.
- [x] I have created a Jira issue and added the issue ID to my pull request title.
- [x] I have given Solr maintainers [access](https://help.github.com/en/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork) to contribute to my PR branch. (optional but recommended, not available for branches on forks living under an organisation)
- [x] I have developed this patch against the `main` branch.
- [ ] I have run `./gradlew check`.
- [ ] I have added tests for my changes.
- [ ] I have added documentation for the [Reference Guide](https://github.com/apache/solr/tree/main/solr/solr-ref-guide)
- [ ] I have added a [changelog entry](https://github.com/apache/solr/blob/main/dev-docs/changelog.adoc) for my change
--
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-18520 | Package Uninstall should work in absence of clusterprops.json file [solr]
Posted by "jaykay12 (via GitHub)" <gi...@apache.org>.
jaykay12 commented on code in PR #5052:
URL: https://github.com/apache/solr/pull/5052#discussion_r4213763944
##########
solr/core/src/java/org/apache/solr/packagemanager/PackageManager.java:
##########
@@ -278,18 +279,20 @@ public Map<String, SolrPackageInstance> getPackagesDeployedAsClusterLevelPlugins
Map<String, String> packageVersions = new HashMap<>();
// map of package name to multiple values of pluginMeta(Map<String, String>)
Map<String, Set<PluginMeta>> packagePlugins = new HashMap<>();
- Object pluginsValue;
+ Object pluginsValue = null;
try {
NamedList<Object> response =
solrClient.request(
new GenericV2SolrRequest(SolrRequest.METHOD.GET, PackageUtils.CLUSTERPROPS_PATH));
Integer statusCode = (Integer) response._get(List.of("responseHeader", "status"), null);
- if (statusCode == null || statusCode == ErrorCode.NOT_FOUND.code) {
- // Cluster props doesn't exist, that means there are no cluster level plugins installed.
- pluginsValue = null;
- } else {
+ if (statusCode != null && statusCode != ErrorCode.NOT_FOUND.code) {
+ // Cluster props exists, that means there are cluster level plugins installed.
pluginsValue = response.get(ContainerPluginsApi.PLUGIN);
}
+ } catch (RemoteSolrException ex) {
+ if (log.isDebugEnabled()) {
Review Comment:
removed
--
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-18520 | Package Uninstall should work in absence of clusterprops.json file [solr]
Posted by "dsmiley (via GitHub)" <gi...@apache.org>.
dsmiley commented on code in PR #5052:
URL: https://github.com/apache/solr/pull/5052#discussion_r4205986227
##########
solr/core/src/java/org/apache/solr/packagemanager/PackageManager.java:
##########
@@ -278,18 +279,20 @@ public Map<String, SolrPackageInstance> getPackagesDeployedAsClusterLevelPlugins
Map<String, String> packageVersions = new HashMap<>();
// map of package name to multiple values of pluginMeta(Map<String, String>)
Map<String, Set<PluginMeta>> packagePlugins = new HashMap<>();
- Object pluginsValue;
+ Object pluginsValue = null;
try {
NamedList<Object> response =
solrClient.request(
new GenericV2SolrRequest(SolrRequest.METHOD.GET, PackageUtils.CLUSTERPROPS_PATH));
Integer statusCode = (Integer) response._get(List.of("responseHeader", "status"), null);
- if (statusCode == null || statusCode == ErrorCode.NOT_FOUND.code) {
- // Cluster props doesn't exist, that means there are no cluster level plugins installed.
- pluginsValue = null;
- } else {
+ if (statusCode != null && statusCode != ErrorCode.NOT_FOUND.code) {
+ // Cluster props exists, that means there are cluster level plugins installed.
pluginsValue = response.get(ContainerPluginsApi.PLUGIN);
}
+ } catch (RemoteSolrException ex) {
+ if (log.isDebugEnabled()) {
Review Comment:
no need for the condition
--
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-18520 | Package Uninstall should work in absence of clusterprops.json file [solr]
Posted by "dsmiley (via GitHub)" <gi...@apache.org>.
dsmiley merged PR #5052:
URL: https://github.com/apache/solr/pull/5052
--
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