You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "dsmiley (via GitHub)" <gi...@apache.org> on 2026/10/07 10:52:27 UTC
Re: [PR] SOLR-18520 | Package Uninstall should work in absence of clusterprops.json file [solr]
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