Skip to content
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

Merged
merged 8 commits into from Feb 3, 2021

Conversation

NazerkeBS
Copy link
Contributor

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:

  • I have reviewed the guidelines for How to Contribute and my code conforms to the standards described there to the best of my ability.
  • I have created a Jira issue and added the issue ID to my pull request title.
  • I have given Solr maintainers access to contribute to my PR branch. (optional but recommended)
  • I have developed this patch against the master branch.
  • I have run ./gradlew check.
  • I have added tests for my changes.
  • I have added documentation for the Ref Guide (for Solr changes only).

Copy link
Contributor

@dsmiley dsmiley left a 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) {
Copy link
Contributor

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()}, {
Copy link
Contributor

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?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

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

Copy link
Contributor

@dsmiley dsmiley Jan 27, 2021

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?

Copy link
Contributor

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.

Copy link
Contributor

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

Copy link
Contributor Author

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.

Copy link
Contributor

@dsmiley dsmiley left a 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.

Copy link
Contributor

@dsmiley dsmiley left a 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.

solr/CHANGES.txt Outdated Show resolved Hide resolved
@dsmiley dsmiley merged commit 6509a30 into apache:master Feb 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants