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

7000 mpconfig solr #8825

Merged
merged 12 commits into from
Dec 21, 2022
Merged

7000 mpconfig solr #8825

merged 12 commits into from
Dec 21, 2022

Conversation

poikilotherm
Copy link
Contributor

@poikilotherm poikilotherm commented Jun 30, 2022

What this PR does / why we need it:
For unknown reasons, the Solr endpoint has been made configurable via a Database Setting only. This is very cumbersome for testing and container usage. Providing simple defaults via MPCONFIG takes lots of this load away. It also properly decouples creating the connection to Solr from the Database connection.

This PR is fully backward compatible with the old behaviour - anyone already having the database setting will let that setting take precedence!

This PR also very much enhances the configuration of the Solr connection, as it allows for the first time to choose transport protocol, core name and/or path, which makes it much more compatible with Solr installations that differ from our classic installations. (It does, however, not yet add support for SolrCloud).

Relates to #7000
Closes #3212

Which issue(s) this PR closes:
None.

Special notes for your reviewer:

  • Please give advice if the installer should be changed to not use the database setting anymore.
  • Please give advice if a release note update should be included.

Suggestions on how to test this:
Play around with the settings described in the added docs and watch it work. Or take a look at the nice test examples, also using the new shiny @JvmSetting test extension!

Does this PR introduce a user interface change? If mockups are available, please link/include them here:
Not really.

Is there a release notes update needed for this change?:
Maybe? Dunno. Please leave comment.

Additional documentation:
Included.

@poikilotherm poikilotherm added Component: Code Infrastructure formerly "Feature: Code Infrastructure" Feature: Installation Guide User Role: Sysadmin Installs, upgrades, and configures the system, connects via ssh Component: Containers Anything related to cloudy Dataverse, shipped in containers. Feature: Indexing labels Jun 30, 2022
@coveralls
Copy link

coveralls commented Jul 19, 2022

Coverage Status

Coverage increased (+0.03%) to 20.015% when pulling 41c56ed on poikilotherm:7000-mpconfig-solr into e6c033b on IQSS:develop.

…#7000

By refactoring SystemConfig.getSolrHostColonPort, the Solr endpoint
is not just configurable via a database setting, but also by all
mechanisms of MicroProfile Config.

- The database setting still has priority over the other mechanisms.
- It's completely backward compatible, no config change necessary.
- Tests have been added to ensure the behaviour
- Default ("localhost:8983") for no setting given is now also done via MPCONFIG
- Default for container usage ("solr:8983") possible via MPCONFIG profile "ct"
When using Dataverse with a non-default Solr, HTTPS, custom core name
or similar, it's necessary to have a configurable URL for the Solr
endpoint. This becomes now possible via MicroProfile Config, defaulting
to the old variant.
Describe the new options to set the Solr endpoint, crosslinking
the old way and adding hints about MPCONFIG profiles.
@pdurbin pdurbin added the Size: 3 A percentage of a sprint. 2.1 hours. label Dec 2, 2022
@mreekie
Copy link

mreekie commented Dec 14, 2022

added to sprint Dec 15, 2022

Copy link
Member

@pdurbin pdurbin left a comment

Choose a reason for hiding this comment

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

Just some quick comments.

As we are now using JvmSettings everywhere as an abstraction above
MPCONFIG, no need to import on our own.
@pdurbin pdurbin self-assigned this Dec 20, 2022
Copy link
Member

@pdurbin pdurbin left a comment

Choose a reason for hiding this comment

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

I didn't test this but the API tests are passing and the code changes make sense. Approved.

@pdurbin pdurbin removed their assignment Dec 20, 2022
@pdurbin
Copy link
Member

pdurbin commented Dec 20, 2022

@poikilotherm more merge conflicts, as expected since other MPCONFIG PRs have been merged. Can you please resolved them?

@kcondon kcondon self-assigned this Dec 21, 2022
@kcondon
Copy link
Contributor

kcondon commented Dec 21, 2022

Ready to merge except for the merge conflicts.

@poikilotherm
Copy link
Contributor Author

All set! 😄

@kcondon kcondon merged commit 18372cd into IQSS:develop Dec 21, 2022
@poikilotherm poikilotherm deleted the 7000-mpconfig-solr branch December 21, 2022 21:25
@pdurbin pdurbin added this to the 5.13 milestone Dec 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Code Infrastructure formerly "Feature: Code Infrastructure" Component: Containers Anything related to cloudy Dataverse, shipped in containers. Feature: Indexing Feature: Installation Guide Size: 3 A percentage of a sprint. 2.1 hours. User Role: Sysadmin Installs, upgrades, and configures the system, connects via ssh
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

Support multi-core Solr instances
5 participants