Skip to content

SOLR-18163: Remove v2-disabling sysprop#4233

Merged
gerlowskija merged 4 commits intoapache:mainfrom
gerlowskija:SOLR-18163-remove-v2-disabling-sysprop
Apr 6, 2026
Merged

SOLR-18163: Remove v2-disabling sysprop#4233
gerlowskija merged 4 commits intoapache:mainfrom
gerlowskija:SOLR-18163-remove-v2-disabling-sysprop

Conversation

@gerlowskija
Copy link
Copy Markdown
Contributor

@gerlowskija gerlowskija commented Mar 21, 2026

https://issues.apache.org/jira/browse/SOLR-18163

Description

Solr has long supported an experimental sysprop solr.api.v2.enabled that can be used to disable the v2 API if set to false. This has been a nice safety-valve for users, but it prevents us from doing any dog-fooding of the v2 APIs since it makes it possible for the APIs to not be available at all.

The v2 APIs are maturing and would really benefit from this additional testing and feedback.

Solution

This commit removes the experimental system property and all references to v2 "optionality" in the codebase.

Tests

Modifications to a BATS test meant to test our deprecation sysprop warnings.

Checklist

Please review the following and check all that apply:

  • I have reviewed the guidelines for How to Contribute and my code conforms to the standards described there to the best of my ability.
  • I have created a Jira issue and added the issue ID to my pull request title.
  • I have given Solr maintainers access to contribute to my PR branch. (optional but recommended, not available for branches on forks living under an organisation)
  • 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
  • I have added a changelog entry for my change

Solr has long supported an experimental sysprop `solr.api.v2.enabled`
that can be used to disable the v2 API if set to false.  This has been a
nice safety-valve for users, but it prevents us from doing any
dog-fooding of the v2 APIs since it makes it possible for the APIs to
not be available at all.

The v2 APIs are maturing and would really benefit from this additional
testing and feedback.  For this reason, this commit removes the
experimental system property and all references to v2 "optionality" in
the codebase.
@github-actions github-actions bot added documentation Improvements or additions to documentation jetty-server client:solrj tests labels Mar 21, 2026
@gerlowskija
Copy link
Copy Markdown
Contributor Author

gerlowskija commented Mar 21, 2026

Still TODO here:

  • changelog entry
  • Upgrade Notes entry, so folks can see that this sysprop has gone away

This PR is for 'main' only. But when we backport this to branch_10x, we should also put a check on startup that can log a message if the (now defunct) system property is specified, so that users can notice that this former config option is no longer actually doing anything for them.

Copy link
Copy Markdown
Contributor

@epugh epugh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One idea... Do we need a way of flagging no longer used system properties/settings in a global way? Similar to the DeprecatedSystemPropertyMappings.properties that would loudly warn, but not break things?

I could see this being added to such a file...

@gerlowskija gerlowskija marked this pull request as ready for review March 22, 2026 14:34
@gerlowskija
Copy link
Copy Markdown
Contributor Author

Do we need a way of flagging no longer used system properties/settings in a global way?

I'm not going to bite that off as a part of this ticket, but it does seem like it'd be nice, generally.

@gerlowskija gerlowskija merged commit 722e1e8 into apache:main Apr 6, 2026
5 of 8 checks passed
@gerlowskija gerlowskija deleted the SOLR-18163-remove-v2-disabling-sysprop branch April 6, 2026 19:05
gerlowskija added a commit that referenced this pull request Apr 6, 2026
This will allow Solr and other tooling to start relying on the v2 API.
@gerlowskija
Copy link
Copy Markdown
Contributor Author

Actually, my warning-log in branch_10x ended up looking pretty general purpose. Essentially, EnvUtils now has a list of removed properties and the 'init' in that class will check to see if any of those "removed props" are currently set. If so, a warning is logged.

If we like that general approach, we can bring it forward to 'main'. Right now that bit of code is only on branch_10x, which feels a little weird.

Here's the commit, for reference: 121f8ba

@epugh
Copy link
Copy Markdown
Contributor

epugh commented Apr 7, 2026

Actually, my warning-log in branch_10x ended up looking pretty general purpose. Essentially, EnvUtils now has a list of removed properties and the 'init' in that class will check to see if any of those "removed props" are currently set. If so, a warning is logged.

If we like that general approach, we can bring it forward to 'main'. Right now that bit of code is only on branch_10x, which feels a little weird.

Here's the commit, for reference: 121f8ba

I was hoping you used EnvUtils and I think this is a great way of handling more generically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

client:solrj documentation Improvements or additions to documentation jetty-server tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants