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 dispatch task execute #3995

Merged

Conversation

KomachiSion
Copy link
Collaborator

Please do not create a Pull Request without creating an issue first.

What is the purpose of the change

Refactor dispatch task execute, abstract an execute task engine to common-module, so that it can be used only only in distro.

Brief changelog

  • Refactor dispatch task execute

Verifying this change

Follow this checklist to help us incorporate your contribution quickly and easily:

  • Make sure there is a Github issue filed for the change (usually before you start working on it). Trivial changes like typos do not require a Github issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
  • Format the pull request title like [ISSUE #123] Fix UnknownException when host config not exist. Each commit in the pull request should have a meaningful subject line and body.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Write necessary unit-test to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add integration-test in test module.
  • Run mvn -B clean package apache-rat:check findbugs:findbugs -Dmaven.test.skip=true to make sure basic checks pass. Run mvn clean install -DskipITs to make sure unit-test pass. Run mvn clean test-compile failsafe:integration-test to make sure integration-test pass.

*/
public class NacosExecuteTaskExecuteEngine extends AbstractNacosTaskExecuteEngine<AbstractExecuteTask> {

private final TaskExecuteWorker[] executeWorkers;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can it be dynamically changed or defined by the user

}
}

private int findWorkerCount() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

If I remember correctly, there's a special way to do this

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

How to do this?

Copy link
Collaborator

Choose a reason for hiding this comment

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

com.alibaba.nacos.common.utils.ThreadUtils#getSuitableThreadCount

@chuntaojun chuntaojun merged commit d78ebbb into alibaba:develop Oct 16, 2020
zilongTong pushed a commit to zilongTong/nacos that referenced this pull request Oct 19, 2020
* Refactor nacos task execute engine

* Refactor nacos task execute engine

* For checkstyle

* For checkstyle

* Use ThreadUtils to reduce duplicate codes

* Set custom logger for TaskExecuteWorker

* Set custom logger for TaskExecuteWorker
WesleyOne pushed a commit to WesleyOne/nacos that referenced this pull request Oct 20, 2020
* Refactor nacos task execute engine

* Refactor nacos task execute engine

* For checkstyle

* For checkstyle

* Use ThreadUtils to reduce duplicate codes

* Set custom logger for TaskExecuteWorker

* Set custom logger for TaskExecuteWorker
loveincode added a commit to Framework-Source-Code/nacos that referenced this pull request Oct 21, 2020
* 'develop' of github.com:alibaba/nacos: (678 commits)
  Fix integration test error
  Fix unit test error in ci
  For checkStyle
  Modify the startup script custom configuration first default configuration (alibaba#4021)
  Revert "Naming module Raft protocol migration"
  [ISSUE alibaba#3904] feature - operate instance's metadata alonely (alibaba#3912)
  For alibaba#3710#, Fix special characters cannot be used in Metadata (alibaba#4019)
  [ISSUE-alibaba#3855] Provided a feature to view version comparisons in the configDetails page (alibaba#3988)
  Refactor dispatch task execute (alibaba#3995)
  Revert "for alibaba#3621 (alibaba#3668)" (alibaba#3999)
  Naming module Raft protocol migration (alibaba#3989)
  refactor: code refactor
  [ISSUE alibaba#3576] [Enhancement] Adding the destroy lifecycle method on NamingMaintainService (alibaba#3985)
  Fix issue 2866 (alibaba#3984)
  For alibaba#3384, Fix member extend info do not update error. (alibaba#3982)
  Fix#3973 (alibaba#3974)
  Move remove listener logic to ServiceManager
  Move remove listener logic to ServiceManager
  1.fix unit test can't pass (alibaba#3956)
  [ISSUE alibaba#3909] add domain's judgement (alibaba#3913)
  ...
@KomachiSion KomachiSion deleted the develop-refactor-dispatch-task-execute branch November 4, 2020 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants