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

refactor(nodetool): only add libs when necessary #11787

Merged

Conversation

zmstone
Copy link
Member

@zmstone zmstone commented Oct 18, 2023

Fixes EMQX-11191

Summary

The nodetool command is started in a temp remsh node which mostly issues RPC to the running EMQX node.
For example, ctl, ping and status
However, hocon and check_license_key commands are executed locally (meaning there is no need for a running EMQX node in order to execute the command), so it needs to load all the apps before executing the command.

Prior to this fix, the loading of the emqx apps is unconditional, the apps are loaded even if it's just a plain RPC call.
The fix is to only load apps for hocon and check_license_key.

PR Checklist

Please convert it to a draft if any of the following conditions are not met. Reviewers may skip over until all the items are checked:

  • Added tests for the changes
  • Added property-based tests for code which performs user input validation
  • Changed lines covered in coverage report
  • Change log has been added to changes/(ce|ee)/(feat|perf|fix)-<PR-id>.en.md files
  • For internal contributor: there is a jira ticket to track this change
  • Created PR to emqx-docs if documentation update is required, or link to a follow-up jira ticket
  • Schema changes are backward compatible

Checklist for CI (.github/workflows) changes

  • If changed package build workflow, pass this action (manual trigger)
  • Change log has been added to changes/ dir for user-facing artifacts update

@zmstone zmstone requested a review from a team as a code owner October 18, 2023 11:58
@zmstone zmstone force-pushed the 1018-refactor-improve-nodetool-performance branch from 8b594d5 to ad09ca9 Compare October 18, 2023 12:08
@zmstone zmstone merged commit f985f14 into emqx:master Oct 18, 2023
141 checks passed
@zmstone zmstone deleted the 1018-refactor-improve-nodetool-performance branch October 18, 2023 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants