This is an automated email from the ASF dual-hosted git repository.

epugh pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr.git


The following commit(s) were added to refs/heads/main by this push:
     new 2a1da0ae829 SOLR-17864: Migrate System Properties (#3618)
2a1da0ae829 is described below

commit 2a1da0ae829be8e615e365a4f3b11fa11695b241
Author: Eric Pugh <[email protected]>
AuthorDate: Fri Sep 5 06:29:51 2025 -0400

    SOLR-17864: Migrate System Properties (#3618)
    
    * Migrate disableSolrFieldCacheMBeanEntryList and 
disableSolrFieldCacheMBeanEntryListJmx
    
    * Migrate solr.facet.stream.tiered
    
    * Migrate solr.alwaysOnTraceId
    
    * Migrate createZkChroot
---
 .../core/src/java/org/apache/solr/core/TracerConfigurator.java |  2 +-
 solr/core/src/java/org/apache/solr/core/ZkContainer.java       |  3 ++-
 .../src/java/org/apache/solr/search/SolrFieldCacheBean.java    | 10 ++++++----
 .../test/org/apache/solr/search/TestSolrFieldCacheBean.java    |  8 ++++----
 .../modules/deployment-guide/pages/distributed-tracing.adoc    |  2 +-
 .../modules/query-guide/pages/stream-source-reference.adoc     |  2 +-
 .../org/apache/solr/client/solrj/io/stream/FacetStream.java    |  3 ++-
 .../src/resources/DeprecatedSystemPropertyMappings.properties  |  9 +++++++++
 8 files changed, 26 insertions(+), 13 deletions(-)

diff --git a/solr/core/src/java/org/apache/solr/core/TracerConfigurator.java 
b/solr/core/src/java/org/apache/solr/core/TracerConfigurator.java
index bf4c13f7198..5d386701c6f 100644
--- a/solr/core/src/java/org/apache/solr/core/TracerConfigurator.java
+++ b/solr/core/src/java/org/apache/solr/core/TracerConfigurator.java
@@ -38,7 +38,7 @@ import org.slf4j.LoggerFactory;
 public abstract class TracerConfigurator implements NamedListInitializedPlugin 
{
 
   public static final boolean TRACE_ID_GEN_ENABLED =
-      Boolean.parseBoolean(EnvUtils.getProperty("solr.alwaysOnTraceId", 
"true"));
+      EnvUtils.getPropertyAsBool("solr.tracing.always.on.enabled", true);
 
   private static final String DEFAULT_CLASS_NAME =
       EnvUtils.getProperty(
diff --git a/solr/core/src/java/org/apache/solr/core/ZkContainer.java 
b/solr/core/src/java/org/apache/solr/core/ZkContainer.java
index f6e27ffdaf5..4077255f6a1 100644
--- a/solr/core/src/java/org/apache/solr/core/ZkContainer.java
+++ b/solr/core/src/java/org/apache/solr/core/ZkContainer.java
@@ -33,6 +33,7 @@ import org.apache.solr.common.cloud.ClusterProperties;
 import org.apache.solr.common.cloud.Replica;
 import org.apache.solr.common.cloud.ZkStateReader;
 import org.apache.solr.common.cloud.ZooKeeperException;
+import org.apache.solr.common.util.EnvUtils;
 import org.apache.solr.common.util.ExecutorUtil;
 import org.apache.solr.common.util.SolrNamedThreadFactory;
 import org.apache.solr.common.util.StrUtils;
@@ -120,7 +121,7 @@ public class ZkContainer {
         } else {
           log.info("Zookeeper client={}", zookeeperHost);
         }
-        boolean createRoot = Boolean.getBoolean("createZkChroot");
+        boolean createRoot = 
EnvUtils.getPropertyAsBool("solr.zookeeper.chroot.create", false);
 
         if (!ZkController.checkChrootPath(zookeeperHost, zkRunOnly || 
createRoot)) {
           throw new ZooKeeperException(
diff --git a/solr/core/src/java/org/apache/solr/search/SolrFieldCacheBean.java 
b/solr/core/src/java/org/apache/solr/search/SolrFieldCacheBean.java
index 85be7c8bf3d..8d0755f159d 100644
--- a/solr/core/src/java/org/apache/solr/search/SolrFieldCacheBean.java
+++ b/solr/core/src/java/org/apache/solr/search/SolrFieldCacheBean.java
@@ -16,6 +16,7 @@
  */
 package org.apache.solr.search;
 
+import org.apache.solr.common.util.EnvUtils;
 import org.apache.solr.core.SolrInfoBean;
 import org.apache.solr.metrics.MetricsMap;
 import org.apache.solr.metrics.SolrMetricsContext;
@@ -24,9 +25,10 @@ import org.apache.solr.uninverting.UninvertingReader;
 /** A SolrInfoBean that provides introspection of the Solr FieldCache */
 public class SolrFieldCacheBean implements SolrInfoBean {
 
-  private boolean disableEntryList = 
Boolean.getBoolean("disableSolrFieldCacheMBeanEntryList");
-  private boolean disableJmxEntryList =
-      Boolean.getBoolean("disableSolrFieldCacheMBeanEntryListJmx");
+  private boolean enableEntryList =
+      EnvUtils.getPropertyAsBool("solr.metrics.fieldcache.entries.enabled", 
true);
+  private boolean enableJmxEntryList =
+      
EnvUtils.getPropertyAsBool("solr.metrics.fieldcache.entries.jmx.enabled", true);
 
   private SolrMetricsContext solrMetricsContext;
 
@@ -56,7 +58,7 @@ public class SolrFieldCacheBean implements SolrInfoBean {
     MetricsMap metricsMap =
         new MetricsMap(
             map -> {
-              if (!disableEntryList && !disableJmxEntryList) {
+              if (enableEntryList && enableJmxEntryList) {
                 UninvertingReader.FieldCacheStats fieldCacheStats =
                     UninvertingReader.getUninvertedStats();
                 String[] entries = fieldCacheStats.info;
diff --git 
a/solr/core/src/test/org/apache/solr/search/TestSolrFieldCacheBean.java 
b/solr/core/src/test/org/apache/solr/search/TestSolrFieldCacheBean.java
index 3d99bca59c2..4aeb4da7c36 100644
--- a/solr/core/src/test/org/apache/solr/search/TestSolrFieldCacheBean.java
+++ b/solr/core/src/test/org/apache/solr/search/TestSolrFieldCacheBean.java
@@ -44,22 +44,22 @@ public class TestSolrFieldCacheBean extends SolrTestCaseJ4 {
     assertEntryListIncluded(false);
 
     // Test again with entry list disabled
-    System.setProperty("disableSolrFieldCacheMBeanEntryList", "true");
+    System.setProperty("solr.metrics.fieldcache.entries.enabled", "false");
     try {
       assertEntryListNotIncluded(false);
     } finally {
-      System.clearProperty("disableSolrFieldCacheMBeanEntryList");
+      System.clearProperty("solr.metrics.fieldcache.entries.enabled");
     }
 
     // Test with entry list enabled for jmx
     assertEntryListIncluded(true);
 
     // Test with entry list disabled for jmx
-    System.setProperty("disableSolrFieldCacheMBeanEntryListJmx", "true");
+    System.setProperty("solr.metrics.fieldcache.entries.jmx.enabled", "false");
     try {
       assertEntryListNotIncluded(true);
     } finally {
-      System.clearProperty("disableSolrFieldCacheMBeanEntryListJmx");
+      System.clearProperty("solr.metrics.fieldcache.entries.jmx.enabled");
     }
   }
 
diff --git 
a/solr/solr-ref-guide/modules/deployment-guide/pages/distributed-tracing.adoc 
b/solr/solr-ref-guide/modules/deployment-guide/pages/distributed-tracing.adoc
index 92fe6c894a1..fb4cdb050cc 100644
--- 
a/solr/solr-ref-guide/modules/deployment-guide/pages/distributed-tracing.adoc
+++ 
b/solr/solr-ref-guide/modules/deployment-guide/pages/distributed-tracing.adoc
@@ -32,7 +32,7 @@ Solr includes an always-on trace id generator. This will 
inject trace id headers
 The header name it uses for propagation is `X-Trace-Id`, this can be changed 
by updating the system property `solr.traceIdHeader`.
 
 This plugin will not be enabled if another Tracing mechanism is setup via Solr 
config.
-This plugin can be disabled by setting the `solr.alwaysOnTraceId` system 
property to `false`.
+This plugin can be disabled by setting the `solr.tracing.always.on.enabled` 
system property to `false`.
 
 == Modules and Configuration
 
diff --git 
a/solr/solr-ref-guide/modules/query-guide/pages/stream-source-reference.adoc 
b/solr/solr-ref-guide/modules/query-guide/pages/stream-source-reference.adoc
index 07c79689daa..0f39d3a812b 100644
--- a/solr/solr-ref-guide/modules/query-guide/pages/stream-source-reference.adoc
+++ b/solr/solr-ref-guide/modules/query-guide/pages/stream-source-reference.adoc
@@ -146,7 +146,7 @@ The `per` metric calculates a percentile
 for a numeric column and can be specified multiple times in the same facet 
function.
 * `tiered`: (Default true) Flag governing whether the `facet` stream should 
parallelize JSON Facet requests to multiple Solr collections using a `plist` 
expression; this option only applies if the `collection` is an alias backed by 
multiple collections.
 If `tiered` is enabled, then a `rollup` expression is used internally to 
aggregate the metrics from multiple `facet` expressions into a single result; 
only `count`, `min`, `max`, `sum`, and `avg` metrics are supported.
-Client applications can disable this globally by setting the 
`solr.facet.stream.tiered=false` system property.
+Client applications can disable this globally by setting the 
`solr.streamingexpressions.facet.tiered.enabled=false` system property.
 
 === facet Syntax
 
diff --git 
a/solr/solrj-streaming/src/java/org/apache/solr/client/solrj/io/stream/FacetStream.java
 
b/solr/solrj-streaming/src/java/org/apache/solr/client/solrj/io/stream/FacetStream.java
index 68343b5f0e1..f1bb705820f 100644
--- 
a/solr/solrj-streaming/src/java/org/apache/solr/client/solrj/io/stream/FacetStream.java
+++ 
b/solr/solrj-streaming/src/java/org/apache/solr/client/solrj/io/stream/FacetStream.java
@@ -49,6 +49,7 @@ import org.apache.solr.client.solrj.request.QueryRequest;
 import org.apache.solr.common.params.ModifiableSolrParams;
 import org.apache.solr.common.params.SolrParams;
 import org.apache.solr.common.util.CollectionUtil;
+import org.apache.solr.common.util.EnvUtils;
 import org.apache.solr.common.util.NamedList;
 
 /**
@@ -64,7 +65,7 @@ public class FacetStream extends TupleStream implements 
Expressible, ParallelMet
   // allow client apps to disable the auto-plist via system property if they 
want to turn it off
   // globally
   static final boolean defaultTieredEnabled =
-      Boolean.parseBoolean(System.getProperty("solr.facet.stream.tiered", 
"true"));
+      
EnvUtils.getPropertyAsBool("solr.streamingexpressions.facet.tiered.enabled", 
true);
 
   static final String TIERED_PARAM = "tiered";
 
diff --git 
a/solr/solrj/src/resources/DeprecatedSystemPropertyMappings.properties 
b/solr/solrj/src/resources/DeprecatedSystemPropertyMappings.properties
index 230d75f6582..05fb16c227e 100644
--- a/solr/solrj/src/resources/DeprecatedSystemPropertyMappings.properties
+++ b/solr/solrj/src/resources/DeprecatedSystemPropertyMappings.properties
@@ -24,6 +24,9 @@ solr.filestore.filesize.max=max.file.store.size
 
 solr.logs.dir=solr.log.dir
 
+solr.metrics.fieldcache.entries.enabled=!disable.solr.field.cache.m.bean.entry.list
+solr.metrics.fieldcache.entries.jmx.enabled=!disable.solr.field.cache.m.bean.entry.list.jmx
+
 solr.packages.enabled=enable.packages
 solr.requests.streaming.body.enabled=solr.enable.stream.body
 solr.requests.streaming.remote.enabled=solr.enable.remote.streaming
@@ -38,5 +41,11 @@ solr.security.auth.plugin=authentication.plugin
 
 solr.solrj.cloud.max.stale.retries=cloud.solr.client.max.stale.retries
 
+solr.streamingexpressions.facet.tiered.enabled=solr.facet.stream.tiered
+
+solr.tracing.always.on.enabled=solr.always.on.trace.id
+
 solr.ui.enabled=!solr.admin.ui.disabled
 solr.ui.experimental.enabled=!solr.admin.ui.experimental.disabled
+
+solr.zookeeper.chroot.create=create.zk.chroot

Reply via email to