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

[3.4.2] Improvements for remote JS executor #7403

Conversation

ViacheslavKlimov
Copy link
Contributor

@ViacheslavKlimov ViacheslavKlimov commented Oct 11, 2022

Pull Request description

Now, when submitting a script invoke request to remote JS executor, script body will not be sent, expecting the executor to have it in its scriptMap. In case the script was not in the map , NOT_FOUND_ERROR code will be returned, and RemoteJsInvokeService in turn will send the same invoke request again (to the same partition) but with the needed script body in it.

Also, migrated from using UUID script id for remote executor to a hash of tenant id and script body. This will reduce the amount of compiled scripts with same body, and also the amount of scripts will not depend on the rule engine instance count.

General checklist

  • You have reviewed the guidelines document.
  • PR name contains fix version. For example, "[3.3.4] Hotfix of some UI component" or "[3.4] New Super Feature".
  • The milestone is specified and corresponds to fix version.
  • Description references specific issue.
  • Description contains human-readable scope of changes.
  • Description contains brief notes about what needs to be added to the documentation.
  • No merge conflicts, commented blocks of code, code formatting issues.
  • Changes are backward compatible or upgrade script is provided.
  • Similar PR is opened for PE version to simplify merge. Required for internal contributors only.

Back-End feature checklist

  • Added corresponding unit and/or integration test(s). Provide written explanation in the PR description if you have failed to add tests.
  • If new dependency was added: the dependency tree is checked for conflicts.
  • If new service was added: the service is marked with corresponding @TbCoreComponent, @TbRuleEngineComponent, @TbTransportComponent, etc.
  • If new REST API was added: the RestClient.java was updated, issue for Python REST client is created.

@ashvayka ashvayka merged commit 9d23c91 into thingsboard:master Oct 20, 2022
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