Skip to content

Commit 18b5788

Browse files
committed
SOLR-18103: Remove deprecated solr.xml <metrics><hiddenSysProps></metrics> (#4136)
1 parent 13c788b commit 18b5788

2 files changed

Lines changed: 8 additions & 24 deletions

File tree

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# See https://github.com/apache/solr/blob/main/dev-docs/changelog.adoc
2+
title: Remove deprecated hiddenSysProps setting under "metrics" in solr.xml. It remains a standard top level config setting.
3+
type: removed # added, changed, fixed, deprecated, removed, dependency_update, security, other
4+
authors:
5+
- name: Eric Pugh
6+
links:
7+
- name: SOLR-18103
8+
url: https://issues.apache.org/jira/browse/SOLR-18103

solr/core/src/java/org/apache/solr/core/SolrXmlConfig.java

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,6 @@ public static NodeConfig fromConfig(
165165
configBuilder.setBackupRepositoryPlugins(
166166
getBackupRepositoryPluginInfos(root.get("backup").getAll("repository")));
167167
configBuilder.setClusterPlugins(getClusterPlugins(loader, root));
168-
// <metrics><hiddenSysProps></metrics> will be removed in Solr 10, but until then, use it if a
169-
// <hiddenSysProps> is not provided under <solr>.
170-
// Remove this line in 10.0
171-
configBuilder.setHiddenSysProps(getHiddenSysProps(root.get("metrics")));
172168
configBuilder.setMetricsConfig(getMetricsConfig(root.get("metrics")));
173169
configBuilder.setCachesConfig(getCachesConfig(loader, root.get("caches")));
174170
configBuilder.setDefaultZkHost(defaultZkHost);
@@ -747,26 +743,6 @@ private static Object decodeNullValue(Object o) {
747743
return o;
748744
}
749745

750-
/**
751-
* Deprecated as of 9.3, will be removed in 10.0
752-
*
753-
* @param metrics configNode for the metrics
754-
* @return a comma-separated list of hidden Sys Props
755-
*/
756-
@Deprecated(forRemoval = true, since = "9.3")
757-
private static String getHiddenSysProps(ConfigNode metrics) {
758-
ConfigNode p = metrics.get("hiddenSysProps");
759-
if (!p.exists()) return null;
760-
Set<String> props = new HashSet<>();
761-
p.forEachChild(
762-
it -> {
763-
if (it.name().equals("str") && StrUtils.isNotNullOrEmpty(it.txt()))
764-
props.add(Pattern.quote(it.txt()));
765-
return Boolean.TRUE;
766-
});
767-
return String.join(",", props);
768-
}
769-
770746
private static PluginInfo getPluginInfo(ConfigNode cfg) {
771747
if (cfg == null || !cfg.exists()) return null;
772748
final var pluginInfo = new PluginInfo(cfg, cfg.name(), false, true);

0 commit comments

Comments
 (0)