Skip to content

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

New test in TestConfigWithLibDisabled

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)
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?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's already gone, afaict. @epugh removed it (unrelated to this change) in a recent PR here

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch, fixed!

@gerlowskija gerlowskija merged commit f492e24 into apache:branch_9x Dec 4, 2024
2 of 3 checks passed
@gerlowskija gerlowskija deleted the SOLR-16781-turn-lib-loading-off-by-default branch December 4, 2024 15:22
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