New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SOLR-15011: /admin/logging handler is configured logs to all nodes #2230
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could use a test. See AdminHandlersProxyTest where the other users of this class test this functionality.
@@ -63,6 +65,9 @@ public void inform(SolrCore core) { | |||
if (watcher == null) { | |||
watcher = core.getCoreContainer().getLogging(); | |||
} | |||
if (cc == null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this actually happen (how?). Otherwise, let's not and furthermore declare cc as final.
@@ -58,7 +58,7 @@ solrAdminServices.factory('System', | |||
}]) | |||
.factory('Logging', | |||
['$resource', function($resource) { | |||
return $resource('admin/info/logging', {'wt':'json', '_':Date.now()}, { | |||
return $resource('admin/info/logging', {'wt':'json', 'nodes': 'all', '_':Date.now()}, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm very unfamiliar with the admin UI code structure. Can you explain why nodes=all needed to be set in two places?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dsmiley, I set nodes=all to only one place which is in services.js file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay; I see you improved that from an earlier commit.
@janhoy maybe you could take a look at this please. nodes=all
is intended only for when setLevel is submitted, not for all logging handler interactions. Do you think this is done correctly here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think nodes=all should be added only to the setLevel
call. Should be easy to check in browser debugger that it sends correct request.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I verified this is a problem now! Thanks for the tip Jan; I forgot how easy it is to verify :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank Jan and David! Just updated the PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Real close now. Just some minor stuff.
solr/core/src/test/org/apache/solr/handler/admin/AdminHandlersProxyTest.java
Outdated
Show resolved
Hide resolved
solr/core/src/test/org/apache/solr/handler/admin/AdminHandlersProxyTest.java
Show resolved
Hide resolved
solr/core/src/test/org/apache/solr/handler/admin/AdminHandlersProxyTest.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM; I'll merge this tomorrow. Please confirm with me that "gw check" passes.
Description
Please provide a short description of the changes you're making with this pull request.
Solution
Please provide a short description of the approach taken to implement your solution.
Tests
Please describe the tests you've developed or run to confirm this patch implements the feature or solves the problem.
Checklist
Please review the following and check all that apply:
master
branch../gradlew check
.