SOLR-18055 Use solr.ssl.enabled property for url scheme detection#4272
SOLR-18055 Use solr.ssl.enabled property for url scheme detection#4272VishnuPriyaChandraSekar wants to merge 4 commits intoapache:mainfrom
Conversation
dsmiley
left a comment
There was a problem hiding this comment.
Thanks.
Remember to ./gradle writeChangelog too
| new RequestReplicaListTransformerGenerator(); | ||
|
|
||
| // URL scheme to be used in distributed search. | ||
| static final String INIT_URL_SCHEME = "urlScheme"; |
There was a problem hiding this comment.
Curious; was urlScheme arg documented in the ref guide or present in a published solr.xml that people use? If so we'll want to keep it.
There was a problem hiding this comment.
Looks like urlScheme is an optional field in solr.xml [1]. In order to provide backward compatibility, I think the precedence to lookup the urlScheme should be 1) solr.ssl.enabled 2) urlScheme from solr.xml 3) default (null).
[1] https://solr.apache.org/guide/solr/latest/configuration-guide/configuring-solr-xml.html
There was a problem hiding this comment.
I agree. Thanks for looking into it.
| @@ -1,8 +1,15 @@ | |||
| # See https://github.com/apache/solr/blob/main/dev-docs/changelog.adoc | |||
| title: Improved CloudSolrClient's urlScheme detection by using the scheme of provided Solr URLs, or looking at "solr.ssl.enabled". | |||
| title: Improved url scheme detection in client API and core components | |||
There was a problem hiding this comment.
IMO this has become much more vague to a reader of the changelog who is anyone other than you and me. The "title" label is misleading -- add more sentences.
There was a problem hiding this comment.
How about this "Standardize urlScheme detection with precedence for "solr.ssl.enabled" ?
There was a problem hiding this comment.
I don't want to lose the original title's information concerning CloudSolrClient. Suggested total title:
Improved CloudSolrClient's http/https (SSL) detection by using the scheme of provided Solr URLs, or looking at the "solr.ssl.enabled" system property. Likewise improved Solr itself to consider this property as an alternative to the urlScheme cluster property.
…bled over solr.xml and cluster property - Improved ZkStateReader's urlScheme detection by giving higher precedence to "solr.ssl.enabled" over cluster property - Improved HttpShardHandlerFactory's urlScheme detection by giving higher precedence to "solr.ssl.enabled" over explicit configuration (ie., solr.xml) - Deprecated usage of the cluster property for detecting urlScheme in ZkController, ReplicaMutator, SliceMutator, and SystemInfoProvider; these now rely on ClusterStateProvider#getUrlScheme
a5ec761 to
507ee79
Compare
|
Please don't force-push as it resets the PR review state. I updated the ref guide in several areas. I also saw that SOLR_SSL_ENABLED wouldn't be converted to a corresponding sys-prop -- so I removed the line that was blockingn that. I think this is ready to merge. |
|
Thanks for updating the doc :) Should I resolve the conflict and publish a new revision ? |
|
Thanks; that'd be helpful. Then I'll merge. |
https://issues.apache.org/jira/browse/SOLR-18055
Description
Currently, the client is compelled to provide cluster property in order to indicate the url scheme. This is annoying. In this PR, the url scheme is detected using the "solr.ssl.enabled" system property instead of cluster property.
Solution
Tests
- SolrTestCaseJ4.java
- TestMiniSolrCloudClusterSSL.java
Checklist
Please review the following and check all that apply:
mainbranch../gradlew check.