Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SOLR-16781: Disable <lib/> by default on 9.x #2894

Open
wants to merge 1 commit into
base: branch_9x
Choose a base branch
from

Conversation

gerlowskija
Copy link
Contributor

@gerlowskija gerlowskija commented Dec 2, 2024

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

Description

<lib/> usage will now log a warning by default for future 9.x releases. Wary users can re-enabled the feature by specifying a sysprop: solr.config.lib.enabled=true.

This PR is a companion to #2875, which makes more aggressive changes (removing <lib> altogether) on the 'main' branch. As such, this PR is only intended for branch_9x, and #2875 is only intended for 'main'.

Tests

Still need a test to validate that <lib> tags are ignored if the feature is not enabled.

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 run ./gradlew check.
  • I have added tests for my changes.
  • I have added documentation for the Reference Guide

`<lib/>` usage will now log a warning by default for future 9.x
releases.  Wary users can re-enabled the feature by specifying a
sysprop: `solr.config.lib.enabled=true`.

This commit is intended only for branch_9x (i.e. NOT main)
@@ -620,10 +620,15 @@ protected Map<String, Object> startSolr(
if (!isWindows && cwdPath.length() > 1 && solrHome.startsWith(cwdPath))
solrHome = solrHome.substring(cwdPath.length() + 1);

final var syspropArg =
Copy link
Contributor

Choose a reason for hiding this comment

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

If you are adding this, should the lib directive be removed from the example configSet?

@@ -70,6 +72,7 @@ public static void beforeClass() {
Paths.get(".").toAbsolutePath().toString().contains(" "));
// to be true
System.setProperty("solr.directoryFactory", "solr.NRTCachingDirectoryFactory");
System.setProperty(LIB_ENABLED_SYSPROP, "true");
Copy link
Contributor

Choose a reason for hiding this comment

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

If we remove the lib directives in the example ConfigSet, these should be able to be removed, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants