epugh opened a new pull request, #5178:
URL: https://github.com/apache/solr/pull/5178

   ## Summary
   
   - Solr forwards a v2 request to the node that actually hosts the target 
collection using the short `/c/{collection}/...` path alias (see 
`HttpSolrCall#sendRemoteProxy`), but `Constants.INDEX_PATH_PREFIX`'s JAX-RS 
`@Path` regex only recognized `cores` or `collections`, not `c`. Any JAX-RS 
resource built on this prefix therefore 404'd with `Cannot find API for the 
path` whenever a request had to be proxied cross-node.
   - Widened the regex to accept `c` as an alias for `collections`.
   - This was discovered while migrating `GET /config/requestHandler` to JAX-RS 
(SOLR-16396): `PackageToolTest` uses a 2-node cluster and intermittently hit 
this exact 404 whenever its HTTP client landed on the node that didn't host the 
test collection's replica. Confirmed the bug is general (not specific to that 
migration) by reproducing it against an already-merged, unrelated endpoint 
(`GET /config/overlay`).
   
   ## Test plan
   
   - [x] Added 
`GetConfigSolrCloudTest.testGetOverlayFromCollectionViaNonHostingNode`, which 
bumps the test cluster to 2 nodes and deliberately sends a request to the node 
that does *not* host the collection's replica, forcing an internal proxy. 
Verified it fails with `Cannot find API for the path: /config/overlay` before 
the fix, and passes after.
   - [x] Full `GetConfigSolrCloudTest` suite passes.
   - [x] `org.apache.solr.handler.admin.api.*`, 
`org.apache.solr.handler.admin.*`, `org.apache.solr.api.*`, 
`org.apache.solr.jersey.*` (436 tests) pass.
   - [x] `org.apache.solr.cloud.api.collections.*`, 
`org.apache.solr.handler.*V2*`, `org.apache.solr.servlet.*` pass.
   - [x] `spotlessApply` — no formatting changes needed.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   
   https://claude.ai/code/session_01RzzUgiebQ8ZhhgE2E7ZZU5


-- 
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]

Reply via email to