Repository navigation
Conversation
…am to "route" Brings this v2-only query param in line with the plain-noun convention used elsewhere in v2 (e.g. ADDREPLICA's v2 variant already made this same rename). This endpoint has no v1 equivalent sharing the annotation -- v1 LIST never passes a route value, and v1 CLUSTERSTATUS is a fully separate implementation that reads req.getParams() directly -- so the change is v2-only. Updates the two ref guide spots that documented the old name. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018RwsEje8u9apx3SRzissZm
|
Automated PR readiness judgements (LLM-generated; may be wrong; not updated on later pushes).
|
ListCollectionsDetailedTest previously had no coverage at all for route-based shard narrowing (under either the old "_route_" name or the new "route" one). testRouteFilterNarrowsToOneShard verifies the new param name actually narrows a 2-shard collection down to one shard, and that the old name is now silently unbound (ignored, same as passing no filter) rather than quietly still working. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018RwsEje8u9apx3SRzissZm
|
Hi Eric, To take the commit: On Linux, ListCollectionsDetailedTest passed 8/8, and tidy passed. AI-generated. |
dsmiley
left a comment
There was a problem hiding this comment.
This parameter is named this way for consistency with the /select to target the right shards. There's probably a constant for this param. Unless V2 has a different approach for that, it should be named the same.
Humm... in other places in v2 we renamed |
Oh? Can you provide link(s) I'm not attached to the underscores; I just want to ensure you are aware that this isn't a quirk specific to this handler. |
https://issues.apache.org/jira/browse/SOLR-18553
Surveyed v2 (JAX-RS) APIs for query/path/body param names with underscores. Found one genuine, unjustified inconsistency:
ListCollectionsApi'sGET /api/collections?detailed=trueaccepted_route_as a query param, left over from mirroring the v1 wire format even though this specific param has no v1 equivalent to stay compatible with.Other
v2 API response fields with underscores (node_name,base_url,force_set_state,recovery_failed,solr_home,core_root,environment_label,environment_color) were checked individually and are intentional — they mirror either literal ZooKeeperstate.jsonproperty names (Replica.java'sNODE_NAME/BASE_URL/FORCE_SET_STATE` constants) or pre-existing v1 wire formats that predate their JAX-RS migration, so those are out of scope here.This rename is v2-only:
LISTcallsListCollections.listCollections(null, null, null, null, null)— the route param is always null, never passed through.CLUSTERSTATUSis a fully separate implementation (new ClusterStatus(zkStateReader, req.getParams())) that never goes throughListCollectionsApi.Also updates the two ref guide spots that documented the old
_route_name for this endpoint.Test plan
:solr:api:compileJava/:solr:core:compileJava/:solr:core:compileTestJavaall cleanListCollectionsDetailedTest(7/7),ListCollectionsDetailedStandaloneTest(1/1) pass_route_param name for this endpoint🤖 Generated with Claude Code
https://claude.ai/code/session_018RwsEje8u9apx3SRzissZm