-
Notifications
You must be signed in to change notification settings - Fork 5k
[DSIP-61][Master] Refactor thread pool and state event orchestration in master #16327
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
[DSIP-61][Master] Refactor thread pool and state event orchestration in master #16327
Conversation
d29aba5 to
d6052b8
Compare
| String[] processInstanceIdArray = processInstanceIds.split(Constants.COMMA); | ||
| List<String> errorMessage = new ArrayList<>(); | ||
| for (String strProcessInstanceId : processInstanceIdArray) { | ||
| int processInstanceId = Integer.parseInt(strProcessInstanceId); |
Check notice
Code scanning / CodeQL
Missing catch of NumberFormatException
| int processInstanceId = Integer.parseInt(strProcessInstanceId); | ||
| try { | ||
| execService.controlWorkflowInstance(loginUser, processInstanceId, executeType); | ||
| log.info("Success do action {} on workflowInstance: {}", executeType, processInstanceId); |
Check failure
Code scanning / CodeQL
Log Injection
| } catch (Exception e) { | ||
| errorMessage.add("Failed do action " + executeType + " on workflowInstance: " + processInstanceId | ||
| + "reason: " + e.getMessage()); | ||
| log.error("Failed do action {} on workflowInstance: {}, error: {}", executeType, processInstanceId, e); |
Check failure
Code scanning / CodeQL
Log Injection
|
d6052b8 to
465806d
Compare
465806d to
4adedb5
Compare
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.
CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
4adedb5 to
0b40177
Compare
f5a524f to
c816086
Compare
41a627e to
a101f89
Compare
8999a0d to
2118c1f
Compare
c143676 to
8f6286a
Compare
...hinscheduler/server/master/engine/task/lifecycle/handler/TaskStartLifecycleEventHandler.java
Outdated
Show resolved
Hide resolved
...er-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/WorkflowEngine.java
Outdated
Show resolved
Hide resolved
...er-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/WorkflowEngine.java
Outdated
Show resolved
Hide resolved
8f6286a to
a3eed5b
Compare
...uler-master/src/main/java/org/apache/dolphinscheduler/server/master/config/MasterConfig.java
Show resolved
Hide resolved
a3eed5b to
c320f08
Compare
SbloodyS
left a comment
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. That's really a huge job. 👍🏻
caishunfeng
left a comment
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.
Incomplete review
...org/apache/dolphinscheduler/api/executor/workflow/PauseWorkflowInstanceExecutorDelegate.java
Outdated
Show resolved
Hide resolved
...dolphinscheduler/api/executor/workflow/RecoverSuspendedWorkflowInstanceExecutorDelegate.java
Show resolved
Hide resolved
.../java/org/apache/dolphinscheduler/api/executor/workflow/TriggerWorkflowExecutorDelegate.java
Show resolved
Hide resolved
.../java/org/apache/dolphinscheduler/api/executor/workflow/TriggerWorkflowExecutorDelegate.java
Show resolved
Hide resolved
...n/java/org/apache/dolphinscheduler/api/executor/workflow/WorkflowInstanceControlRequest.java
Outdated
Show resolved
Hide resolved
...rc/main/java/org/apache/dolphinscheduler/extract/master/transportor/ITaskExecutionEvent.java
Outdated
Show resolved
Hide resolved
| package org.apache.dolphinscheduler.extract.master.transportor; | ||
|
|
||
| public interface ITaskInstanceExecutionEvent { | ||
| public interface ITaskExecutionEvent { |
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.
Suggest to add event source, which can help troubleshoot.
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.
Yes, it is needed, e.g. distinguish the event from the task executor or user operation. I add todo here.
...aster/src/main/java/org/apache/dolphinscheduler/server/master/cluster/MasterSlotManager.java
Outdated
Show resolved
Hide resolved
...ter/src/main/java/org/apache/dolphinscheduler/server/master/engine/TaskGroupCoordinator.java
Show resolved
Hide resolved
...er-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/WorkflowEngine.java
Show resolved
Hide resolved
...c/main/java/org/apache/dolphinscheduler/server/master/engine/WorkflowEventBusFireWorker.java
Show resolved
Hide resolved
...aster/src/main/java/org/apache/dolphinscheduler/server/master/engine/WorkflowRepository.java
Outdated
Show resolved
Hide resolved
...pache/dolphinscheduler/server/master/engine/command/handler/ReRunWorkflowCommandHandler.java
Outdated
Show resolved
Hide resolved
.../dolphinscheduler/server/master/engine/command/handler/RecoverFailureTaskCommandHandler.java
Show resolved
Hide resolved
...ain/java/org/apache/dolphinscheduler/server/master/engine/graph/AbstractSuccessorParser.java
Outdated
Show resolved
Hide resolved
b5a7d6f to
23872cf
Compare
...c/main/java/org/apache/dolphinscheduler/server/master/engine/graph/WorkflowGraphFactory.java
Show resolved
Hide resolved
| GLOBAL_MASTER_FAILOVER, | ||
| MASTER_FAILOVER, |
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.
It's better to add some comments for the difference.
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.
Done
|
|
||
| @Slf4j | ||
| @Component | ||
| public class PhysicalTaskExecutorClientDelegator implements ITaskExecutorClientDelegator { |
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.
Is the PhysicalTask means The tasks which execute on worker?
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.
Yes
.../apache/dolphinscheduler/server/master/engine/task/statemachine/AbstractTaskStateAction.java
Outdated
Show resolved
Hide resolved
...n/java/org/apache/dolphinscheduler/server/master/runner/TaskExecutionRunnableRepository.java
Outdated
Show resolved
Hide resolved
...r/src/test/java/org/apache/dolphinscheduler/server/master/AbstractMasterIntegrationTest.java
Show resolved
Hide resolved
5f5fe56 to
109d07e
Compare
|
caishunfeng
left a comment
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 overall.
SbloodyS
left a comment
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.
+1




Purpose of the pull request
close #16423
Brief change log
Verify this pull request
This pull request is code cleanup without any test coverage.
(or)
This pull request is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:
(or)
Pull Request Notice
Pull Request Notice
If your pull request contain incompatible change, you should also add it to
docs/docs/en/guide/upgrede/incompatible.md