Skip to content

Conversation

@igiguere
Copy link
Contributor

@igiguere igiguere commented Jan 26, 2026

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

Jira Ticket

The Excel spreadsheet links to SOLR-16458 for the V1 /solr/admin/info/system and V2 /api/node/system, although the ticket does not mention those URLs.

From the checklist below : "I have created a Jira issue and added the issue ID to my pull request title." - m'well, no. But keeping track of these V2 tickets is probably difficult enough without adding one more.

Sorry about the mix-up in the commit messages. I originally landed on the wrong ticket.

Description

Implementation of a Jersey resource to support getting the system info. This new resource should replace the home-brew "Endpoint" V2 resource.

DRAFT:

  • Should we keep the URL path /node/system as suggested in the Excel spreadsheet? This PR suggests /node/info/system. If we keep the same URL path as the "old" V2, then the home-brew "Endpoint" will be deleted.
  • AdminHandlersProxy does not support V2, so this PR does not test parameter "nodes". Ref: PR SOLR-16738: Refactor special-casing out of AdminHandlersProxy  #3991, mentioned in PR SOLR-17436: Create a v2 equivalent for /admin/metrics #4057
  • I didn't like that the system info returned in the single-node response was not separate from the response header (i.e.: fields "node"(name), "mode", "core_root"... at the same level as "responseHeader").
    -- This PR wrap the system info in "nodeInfo":
    <response>
    <lst name="responseHeader"><!-- ... --></lst>
    <lst name="nodeInfo">
    <str name="node">localhost:8983_solr</str>
    <!-- ... -->
    </lst>
    </response>
    -- Ideally, IMHO, the "node" field should be named "name" (i.e.: the node name), and then the wrapper "nodeInfo" could be just "node"
    -- AdminHandlersProxy wraps all proxied responses into a NamedList where the name is the node name (host:port_solr). This creates a structure with unpredictable (or not easily predictable) keys. If we do adopt a response with the "nodeInfo" wrapper, then, the proxied responses could be added to the list of "nodeInfo"... In a specific implementation of AdminHandlersProxy (ref.SOLR-16738: Refactor special-casing out of AdminHandlersProxy  #3991). This is all a lot of changes, breaking changes for whoever is parsing the response already. Opinions?
  • TODO: Clean-up documentation. Path /admin/info/system is mentionned in 5 pages... And there's SOLR-11918 ?

Solution

Add NodeSystemInfoApi (in solr-api), implemented in GetNodeSystemInfo.

Class NodeSystemInfoProvider contains code to provide the system info, copied from SystemInfoHandler.

Clean-up SystemInfoHandler to use GetNodeSystemInfo.

Tests

Add unit tests for NodeSystemInfoProvider (note that the test class for SystemInfoHandler was actually only testing a method now found in NodeSystemInfoProvider).

Add unit tests for GetNodeSystemInfo.

Functional tests on a local instance (dev-slim, started with the "cloud" example)

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

Isabelle Giguere and others added 7 commits January 15, 2026 10:17
Add NodeSystemIfoApi (notice the lower-case last chars), to (eventually)
replace Endpoint NodeSystemIfoAPI.  Lo warning about deprecation.

Add GetNodeSystemInfo, move the info-gathering logic to a separate class
NodeSystemInfoProvider, adjust SystemInfoHandler.

Known Issue: NodeSystemInfoResponse does not support responses from
multiple nodes.

More testing and clean-up to do.
Fix NodeSystemResponse to contain a map of node name to node info.

Fix responses for Json and XML.

TODO : nodes=all is ignored
forgot those in the previous commit
Fix log calls.  Add unit tests for HTTP call.
Isabelle Giguere and others added 3 commits January 27, 2026 15:31
Remove the Map from NodeSystemInfoResponse: the AdminHandlersProxy wraps
all nodes responses into a map, it should not belong to the response
class.
Replace the Map wrapper by just a single object wrapper: NodeSystemInfo.
It provides some separation between the response header and the actual
node info.
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.

1 participant