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

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

commit 121f8ba25f380672bcb902c931415383fea55c46
Author: Jason Gerlowski <[email protected]>
AuthorDate: Mon Apr 6 15:21:12 2026 -0400

    SOLR-18163: Log warning if solr.api.v2.enabled used
---
 .../src/java/org/apache/solr/common/util/EnvUtils.java     | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/solr/solrj/src/java/org/apache/solr/common/util/EnvUtils.java 
b/solr/solrj/src/java/org/apache/solr/common/util/EnvUtils.java
index d557f726b97..44d48398817 100644
--- a/solr/solrj/src/java/org/apache/solr/common/util/EnvUtils.java
+++ b/solr/solrj/src/java/org/apache/solr/common/util/EnvUtils.java
@@ -28,6 +28,7 @@ import java.util.Locale;
 import java.util.Map;
 import java.util.Objects;
 import java.util.Properties;
+import java.util.Set;
 import java.util.SortedMap;
 import java.util.TreeMap;
 import java.util.concurrent.ConcurrentHashMap;
@@ -50,6 +51,10 @@ public class EnvUtils {
   /** Maps deprecated sys prop keys to current sys prop keys with 
special/custom mappings */
   private static final Map<String, String> DEPRECATED_MAPPINGS = new 
HashMap<>();
 
+  /** Properties which are no longer supported; used to warn users of 
out-of-date configuration */
+  private static final Set<String> REMOVED_PROPERTIES =
+      Set.of("disable.v2.api", "solr.api.v2.enabled");
+
   private static final Map<String, String> camelCaseToDotsMap = new 
ConcurrentHashMap<>();
 
   static {
@@ -242,6 +247,15 @@ public class EnvUtils {
         }
       }
     }
+
+    // Log a warning on any "removed" system properties
+    for (String removedPropName : REMOVED_PROPERTIES) {
+      if (getProperty(removedPropName) != null) {
+        log.warn(
+            "No-longer-supported system property [{}] detected; please review 
usage and remove.",
+            removedPropName);
+      }
+    }
   }
 
   protected static String envNameToSyspropName(String envName) {

Reply via email to