Re: [PR] SOLR-18317: Treat standalone nodes=all as this node instead of NPEing on ZooKeeper [solr]

2026-10-02 Thread via GitHub


epugh commented on PR #5001:
URL: https://github.com/apache/solr/pull/5001#issuecomment-5957047077

   What if we just fix the Solr Admin UI?Is `nodes=all` a common parameter 
that lots of places ahve that could potentially be fixed through this approach? 
  There is a lot of mock tests and more checks, and I just wonder if we made 
the one place that causes this issue to be a bit smarter on the caller?   
   
   Currently in the Solr Admin UI we have lots of places where we consult to 
decide "am I making this url with a core int he name or a collection in the 
name"...   So understnadin that is there.   I'd rather just reuse that logic 
and then not pass `nodes=all` to a standalone, after all, that just doens't 
make any sense in user-managed (standalone) mode.(gotta love how we use two 
names for the same thing everywhere).
   
   


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



[PR] SOLR-18317: Treat standalone nodes=all as this node instead of NPEing on ZooKeeper [solr]

2026-10-01 Thread via GitHub


nick-boss-tech opened a new pull request, #5001:
URL: https://github.com/apache/solr/pull/5001

   🤖 *AI text below* 🤖 *(posted on behalf of Nick Shanin)*
   
   https://issues.apache.org/jira/browse/SOLR-18317
   
   In standalone (non-ZooKeeper) mode, admin handlers that accept a `nodes` 
parameter (e.g. the logging UI) hit a `NullPointerException` on the missing 
`ZkController` instead of handling the request sensibly.
   
   `RemoteRequestProxy` now centralizes the decision in `shouldProxyTo(...)` / 
`requireZkController(...)`, and `GenericV1RequestProxy` / 
`V2SolrRequestBasedProxy` delegate to it:
   
   - missing or empty `nodes` → handled locally (unchanged);
   - `nodes=all` in standalone mode → treated as this node, no proxying, no NPE;
   - any other explicit node value in standalone mode → still returns `true` 
from `shouldProxy()` so `validateNodeNames` rejects it with a 400 ("requires 
SolrCloud except for the value 'all'").
   
   Also fixed while validating: the lambda overload of `requestWithBaseUrl` 
exists only on `HttpJettySolrClient`, so the `HttpSolrClient` downcast it needs 
was restored (the branch did not compile without it).
   
   Tests: `GenericV1RequestProxyTest` (7) + `V2SolrRequestBasedProxyTest` (7) + 
`LoggingHandlerTest` (3, incl. new `nodes=all`-in-standalone and 
explicit-nodes-400 cases) — green with Error Prone; Spotless clean.
   
   Changelog: `changelog/unreleased/SOLR-18317.yml` (fixed)
   
   ### AI assistance
   
   AI agents assisted with research, implementation, review, and drafting. Nick 
Shanin directed the work and takes responsibility for this contribution.


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