nick-boss-tech commented on PR #5001:
URL: https://github.com/apache/solr/pull/5001#issuecomment-5958632481

   🤖 *AI text below* 🤖 *(posted on behalf of Nick Shanin)*
   
   Thanks, Eric. You were right that the caller was the real problem; my first 
version reached for a shared server-side change that was broader than the bug. 
I reworked it along the lines you suggested (new commit 4ca4725):
   
   - The Admin UI is now the primary fix. `LoggingLevelController.setLevel` 
waits for `isCloudEnabled` to settle (the same `$watch` pattern `paramsets.js` 
uses to decide cores vs collections), sends `nodes: 'all'` only in SolrCloud 
mode, and omits the parameter entirely in standalone mode. The `Logging` 
$resource factory no longer hardcodes `nodes:'all'`.
   - I kept a much narrower server-side guard, because a direct 
`/admin/info/logging?nodes=all` call in standalone mode still NPEd on the 
missing ZooKeeper handle before this PR. The "all means this node" behavior is 
now an opt-in on the proxy base class, enabled only for the broadcast-style 
endpoints (logging and system info on v1, node system info on v2). Explicit 
node names in standalone mode still get a clear 400.
   - On your question about how common `nodes=all` is: inside this proxy 
framework it is only the logging and system-info endpoints on the plural 
`nodes` parameter, plus metrics on the singular `node`. For metrics I 
deliberately did not extend the "all means local" meaning. `node` selects a 
single destination and `all` was never a valid value for it, so in standalone 
mode it now gets a clean 400 ("Parameter 'node' requires SolrCloud") instead of 
the old NPE. That decision is explicit in `MetricsHandler.createMetricProxy` 
and pinned by new tests in `MetricsHandlerTest`.
   
   Tests: the two proxy test classes, `LoggingHandlerTest` (with the original 
standalone regression), and the new metrics tests all pass (27 tests), and 
`:solr:core:check -x test` is green.
   
   Happy to drop the server-side guard entirely if you would rather the API 
stay strict now that the UI no longer sends the parameter in standalone mode.
   


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