Skip to content

Conversation

epugh
Copy link
Contributor

@epugh epugh commented Aug 23, 2025

Tricky one because I didn't want to change the solr.xml name AS well, so now in solr.xml we have solr.hideStackTrace, but system is solr.responses.stacktrace.enabled.

Why is this in solr.xml?

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

I am going to leave this one for just this one, unless I find other solr.xml that are also system variable equivalents.. Then maybe this grows into a whole "why do we define these in solr.xml and in system variables?" disucssion!

Tricky one because I didn't want to change the solr.xml name AS well, so now in solr.xml we have solr.hideStackTrace, but system is solr.responses.stacktrace.enabled.

Why is this in solr.xml?
@epugh epugh requested a review from dsmiley August 23, 2025 09:47
private List<String> allowUrls = Collections.emptyList();
private boolean hideStackTrace = Boolean.getBoolean("solr.hideStackTrace");
private boolean hideStackTrace =
!(Boolean.parseBoolean(System.getProperty("solr.responses.stacktrace.enabled", "true")));
Copy link
Contributor

Choose a reason for hiding this comment

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

EnvUtils?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure!

solr.enable.stream.body=solr.requests.streaming.body.enabled
solr.delete.unknown.cores=solr.cloud.startup.delete.unknown.cores.enabled
solr.config.set.forbidden.file.types=solr.configset.forbidden.file.types
solr.hide.stack.trace=solr.responses.stacktrace.enabled
Copy link
Contributor

Choose a reason for hiding this comment

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

it'd be neat if there was a way to reflect that we inverted a boolean. Like use an exclamation in the beginning.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not a bad idea.. Maybe if the line starts with a ! then you know while processing that it's an inversion. That would simplify the rule logic in EnvUtils.java.. This is a great idea.

@epugh epugh merged commit dea67fd into apache:main Aug 24, 2025
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants