Skip to content

Conversation

@gerlowskija
Copy link
Contributor

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

Description

Our file store implementation has an internal API used to fetch filestore files from other nodes in the cluster. A specific node in the cluster can be specified as the source to pull from using the "getFrom" query parameter. But nothing actually validates the provided "getFrom" value or ensures it's another node in the cluster.

Solution

This PR checks the value of "getFrom" when provided and ensures it is a known live node.

Tests

Additional scenario added to TestDistribFileStore to exercise the error message.

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 developed this patch against the main branch.
  • I have run ./gradlew check.
  • I have added tests for my changes.
  • I have added documentation for the Reference Guide
  • I have added a changelog entry for my change

Helps add clarity to an internal API, and protects against client code
accidentally fetching files from an unintended Solr cluster, etc.
@gerlowskija gerlowskija changed the title Solr 18014 filestore get from improvements SOLR-18104: Improve filestore "getFrom" validation Dec 5, 2025
@gerlowskija gerlowskija changed the title SOLR-18104: Improve filestore "getFrom" validation SOLR-18014: Improve filestore "getFrom" validation Dec 5, 2025
Copy link
Contributor

@epugh epugh left a comment

Choose a reason for hiding this comment

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

Just a lovely set of code changes!

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