adityamparikh opened a new issue, #223:
URL: https://github.com/apache/solr-mcp/issues/223
### Current state (verified)
`check-health` and `get-collection-stats` are per-collection. Nothing
reports live nodes or per-replica state. No configset listing.
### Motivation
After a managed rolling restart or a scale event, the question is "which
replicas of `films` are down or recovering, and on which node?" That needs
CLUSTERSTATUS. `list-configsets` is needed before `create-collection` when the
user does not know what configsets exist.
### Scope
New package `org.apache.solr.mcp.server.cluster` with `ClusterService`:
| Tool | SolrJ | Hints |
|---|---|---|
| `get-cluster-status` (`collection?`) |
`CollectionAdminRequest.getClusterStatus()` | `readOnlyHint=true`,
`idempotentHint=true` |
| `list-configsets` | `new ConfigSetAdminRequest.List()` |
`readOnlyHint=true`, `idempotentHint=true` |
Plus `@McpResource(uri = "solr://cluster/status")` mirroring
`get-cluster-status`, following the pattern in `CollectionService`.
### Implementation notes
- Return a typed record, not the raw `NamedList`, and lead with the answer:
```json
{"healthy": false,
"issues":
[{"collection":"films","shard":"shard2","replica":"core_node5","node":"…","state":"recovering"}],
"liveNodes": ["…"],
"collections": {"films": {"shard1":
{"leader":"core_node2","replicas":[…]}}}}
```
`issues[]` = every replica whose state is not `active` or whose node is
not in `liveNodes`.
- Tool descriptions must separate the three health-ish tools: `check-health`
= one collection answering queries; `get-collection-stats` = size/doc counts;
`get-cluster-status` = cluster-wide nodes and replica state, use first when
something is wrong.
- Response parsing goes through the existing `JsonResponseParser`; check the
CLUSTERSTATUS JSON shape against the Solr version in `compose.yaml`.
### Acceptance
- [ ] Testcontainers SolrCloud with two nodes: stop one container;
`issues[]` names the affected replicas and node.
- [ ] `list-configsets` returns `_default` on a fresh cluster.
- [ ] README tool and resource tables updated; hint assertions added in the
existing style.
Part of the Kubernetes / Solr Operator integration tracking issue.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]