status
stringclasses
1 value
repo_name
stringclasses
31 values
repo_url
stringclasses
31 values
issue_id
int64
1
104k
title
stringlengths
4
233
body
stringlengths
0
186k
issue_url
stringlengths
38
56
pull_url
stringlengths
37
54
before_fix_sha
stringlengths
40
40
after_fix_sha
stringlengths
40
40
report_datetime
timestamp[us, tz=UTC]
language
stringclasses
5 values
commit_datetime
timestamp[us, tz=UTC]
updated_file
stringlengths
7
188
chunk_content
stringlengths
1
1.03M
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,861
[BUG-BE][Complete Date] Complement numbers will run in a loop under the serial strategy
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Complement numbers will run in a loop under the serial strategy ### What you expected to happen Complement numbers will run in a loop under the serial strategy ### How to reproduce After creating the workflow, select the complement mode and execute it. ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10861
https://github.com/apache/dolphinscheduler/pull/10862
057a9f6b241bae28ea5ec6d8e1e082b64f6410f3
b5653ea7f2d4d14ba92c45e429c2191099450b0f
2022-07-09T06:50:39Z
java
2022-07-09T08:41:51Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java
* The ASF lcenses ths fle to You under the Apache Lcense, Verson 2.0 * (the "Lcense"); you may not use ths fle except n complance wth * the Lcense. You may obtan a copy of the Lcense at * * http://www.apache.org/lcenses/LICENSE-2.0 * * Unless requred by applcable law or agreed to n wrtng, software * dstrbuted under the Lcense s dstrbuted on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, ether express or mpled. * See the Lcense for the specfc language governng permssons and * lmtatons under the Lcense. */ package org.apache.dolphnscheduler.server.master.runner; mport statc org.apache.dolphnscheduler.common.Constants.CMDPARAM_COMPLEMENT_DATA_END_DATE; mport statc org.apache.dolphnscheduler.common.Constants.CMDPARAM_COMPLEMENT_DATA_SCHEDULE_DATE_LIST; mport statc org.apache.dolphnscheduler.common.Constants.CMDPARAM_COMPLEMENT_DATA_START_DATE; mport statc org.apache.dolphnscheduler.common.Constants.CMD_PARAM_RECOVERY_START_NODE_STRING; mport statc org.apache.dolphnscheduler.common.Constants.CMD_PARAM_RECOVER_PROCESS_ID_STRING; mport statc org.apache.dolphnscheduler.common.Constants.CMD_PARAM_START_NODES; mport statc org.apache.dolphnscheduler.common.Constants.COMMA; mport statc org.apache.dolphnscheduler.common.Constants.DEFAULT_WORKER_GROUP; mport statc org.apache.dolphnscheduler.common.Constants.YYYY_MM_DD_HH_MM_SS; mport statc org.apache.dolphnscheduler.plugn.task.ap.TaskConstants.TASK_TYPE_BLOCKING; mport statc org.apache.dolphnscheduler.plugn.task.ap.enums.DataType.VARCHAR; mport statc org.apache.dolphnscheduler.plugn.task.ap.enums.Drect.IN; mport org.apache.dolphnscheduler.common.Constants; mport org.apache.dolphnscheduler.common.enums.CommandType; mport org.apache.dolphnscheduler.common.enums.FalureStrategy; mport org.apache.dolphnscheduler.common.enums.Flag; mport org.apache.dolphnscheduler.common.enums.Prorty;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,861
[BUG-BE][Complete Date] Complement numbers will run in a loop under the serial strategy
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Complement numbers will run in a loop under the serial strategy ### What you expected to happen Complement numbers will run in a loop under the serial strategy ### How to reproduce After creating the workflow, select the complement mode and execute it. ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10861
https://github.com/apache/dolphinscheduler/pull/10862
057a9f6b241bae28ea5ec6d8e1e082b64f6410f3
b5653ea7f2d4d14ba92c45e429c2191099450b0f
2022-07-09T06:50:39Z
java
2022-07-09T08:41:51Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java
mport org.apache.dolphnscheduler.common.enums.StateEventType; mport org.apache.dolphnscheduler.common.enums.TaskDependType; mport org.apache.dolphnscheduler.common.enums.TaskGroupQueueStatus; mport org.apache.dolphnscheduler.common.graph.DAG; mport org.apache.dolphnscheduler.common.model.TaskNode; mport org.apache.dolphnscheduler.common.model.TaskNodeRelaton; mport org.apache.dolphnscheduler.common.process.ProcessDag; mport org.apache.dolphnscheduler.common.thread.ThreadUtls; mport org.apache.dolphnscheduler.common.utls.DateUtls; mport org.apache.dolphnscheduler.common.utls.JSONUtls; mport org.apache.dolphnscheduler.common.utls.LoggerUtls; mport org.apache.dolphnscheduler.common.utls.NetUtls; mport org.apache.dolphnscheduler.dao.entty.Command; mport org.apache.dolphnscheduler.dao.entty.Envronment; mport org.apache.dolphnscheduler.dao.entty.ProcessDefnton; mport org.apache.dolphnscheduler.dao.entty.ProcessInstance; mport org.apache.dolphnscheduler.dao.entty.ProcessTaskRelaton; mport org.apache.dolphnscheduler.dao.entty.ProjectUser; mport org.apache.dolphnscheduler.dao.entty.Schedule; mport org.apache.dolphnscheduler.dao.entty.TaskDefntonLog; mport org.apache.dolphnscheduler.dao.entty.TaskGroupQueue; mport org.apache.dolphnscheduler.dao.entty.TaskInstance; mport org.apache.dolphnscheduler.dao.utls.DagHelper; mport org.apache.dolphnscheduler.plugn.task.ap.enums.DependResult; mport org.apache.dolphnscheduler.plugn.task.ap.enums.Drect; mport org.apache.dolphnscheduler.plugn.task.ap.enums.ExecutonStatus; mport org.apache.dolphnscheduler.plugn.task.ap.model.Property; mport org.apache.dolphnscheduler.remote.command.HostUpdateCommand; mport org.apache.dolphnscheduler.remote.utls.Host; mport org.apache.dolphnscheduler.server.master.confg.MasterConfg;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,861
[BUG-BE][Complete Date] Complement numbers will run in a loop under the serial strategy
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Complement numbers will run in a loop under the serial strategy ### What you expected to happen Complement numbers will run in a loop under the serial strategy ### How to reproduce After creating the workflow, select the complement mode and execute it. ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10861
https://github.com/apache/dolphinscheduler/pull/10862
057a9f6b241bae28ea5ec6d8e1e082b64f6410f3
b5653ea7f2d4d14ba92c45e429c2191099450b0f
2022-07-09T06:50:39Z
java
2022-07-09T08:41:51Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java
mport org.apache.dolphnscheduler.server.master.dspatch.executor.NettyExecutorManager; mport org.apache.dolphnscheduler.server.master.event.StateEvent; mport org.apache.dolphnscheduler.server.master.event.StateEventHandleError; mport org.apache.dolphnscheduler.server.master.event.StateEventHandleExcepton; mport org.apache.dolphnscheduler.server.master.event.StateEventHandler; mport org.apache.dolphnscheduler.server.master.event.StateEventHandlerManager; mport org.apache.dolphnscheduler.server.master.metrcs.TaskMetrcs; mport org.apache.dolphnscheduler.server.master.runner.task.ITaskProcessor; mport org.apache.dolphnscheduler.server.master.runner.task.TaskActon; mport org.apache.dolphnscheduler.server.master.runner.task.TaskProcessorFactory; mport org.apache.dolphnscheduler.servce.alert.ProcessAlertManager; mport org.apache.dolphnscheduler.servce.cron.CronUtls; mport org.apache.dolphnscheduler.servce.exceptons.CronParseExcepton; mport org.apache.dolphnscheduler.servce.expand.CurngParamsServce; mport org.apache.dolphnscheduler.servce.process.ProcessServce; mport org.apache.dolphnscheduler.servce.queue.PeerTaskInstancePrortyQueue; mport org.apache.commons.collectons.CollectonUtls; mport org.apache.commons.lang3.ArrayUtls; mport org.apache.commons.lang3.StrngUtls; mport org.apache.commons.lang3.math.NumberUtls; mport java.utl.ArrayLst; mport java.utl.Arrays; mport java.utl.Collecton; mport java.utl.Collectons; mport java.utl.Date; mport java.utl.HashMap; mport java.utl.HashSet; mport java.utl.Iterator; mport java.utl.Lst; mport java.utl.Map;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,861
[BUG-BE][Complete Date] Complement numbers will run in a loop under the serial strategy
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Complement numbers will run in a loop under the serial strategy ### What you expected to happen Complement numbers will run in a loop under the serial strategy ### How to reproduce After creating the workflow, select the complement mode and execute it. ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10861
https://github.com/apache/dolphinscheduler/pull/10862
057a9f6b241bae28ea5ec6d8e1e082b64f6410f3
b5653ea7f2d4d14ba92c45e429c2191099450b0f
2022-07-09T06:50:39Z
java
2022-07-09T08:41:51Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java
mport java.utl.Objects; mport java.utl.Optonal; mport java.utl.Set; mport java.utl.concurrent.Callable; mport java.utl.concurrent.ConcurrentHashMap; mport java.utl.concurrent.ConcurrentLnkedQueue; mport java.utl.concurrent.atomc.AtomcBoolean; mport java.utl.stream.Collectors; mport org.slf4j.Logger; mport org.slf4j.LoggerFactory; mport org.sprngframework.beans.BeanUtls; mport com.google.common.collect.Lsts; mport lombok.NonNull; /** * Workflow execute task, used to execute a workflow nstance. */ publc class WorkflowExecuteRunnable mplements Callable<WorkflowSubmtStatue> { /** * logger of WorkflowExecuteThread */ prvate statc fnal Logger logger = LoggerFactory.getLogger(WorkflowExecuteRunnable.class); /** * process servce */ prvate fnal ProcessServce processServce; /** * alert manager */ prvate fnal ProcessAlertManager processAlertManager; /**
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,861
[BUG-BE][Complete Date] Complement numbers will run in a loop under the serial strategy
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Complement numbers will run in a loop under the serial strategy ### What you expected to happen Complement numbers will run in a loop under the serial strategy ### How to reproduce After creating the workflow, select the complement mode and execute it. ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10861
https://github.com/apache/dolphinscheduler/pull/10862
057a9f6b241bae28ea5ec6d8e1e082b64f6410f3
b5653ea7f2d4d14ba92c45e429c2191099450b0f
2022-07-09T06:50:39Z
java
2022-07-09T08:41:51Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java
* netty executor manager */ prvate fnal NettyExecutorManager nettyExecutorManager; /** * process nstance */ prvate fnal ProcessInstance processInstance; /** * process defnton */ prvate ProcessDefnton processDefnton; /** * the object of DAG */ prvate DAG<Strng, TaskNode, TaskNodeRelaton> dag; /** * unque key of workflow */ prvate Strng key; /** * start flag, true: start nodes submt completely */ prvate volatle boolean sStart = false; /** * submt falure nodes */ prvate boolean taskFaledSubmt = false; /** * task nstance hash map, taskId as key */
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,861
[BUG-BE][Complete Date] Complement numbers will run in a loop under the serial strategy
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Complement numbers will run in a loop under the serial strategy ### What you expected to happen Complement numbers will run in a loop under the serial strategy ### How to reproduce After creating the workflow, select the complement mode and execute it. ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10861
https://github.com/apache/dolphinscheduler/pull/10862
057a9f6b241bae28ea5ec6d8e1e082b64f6410f3
b5653ea7f2d4d14ba92c45e429c2191099450b0f
2022-07-09T06:50:39Z
java
2022-07-09T08:41:51Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java
prvate fnal Map<Integer, TaskInstance> taskInstanceMap = new ConcurrentHashMap<>(); /** * runnng taskProcessor, taskCode as key, taskProcessor as value * only on taskProcessor per taskCode */ prvate fnal Map<Long, ITaskProcessor> actveTaskProcessorMaps = new ConcurrentHashMap<>(); /** * vald task map, taskCode as key, taskId as value * n a DAG, only one taskInstance per taskCode s vald */ prvate fnal Map<Long, Integer> valdTaskMap = new ConcurrentHashMap<>(); /** * error task map, taskCode as key, taskInstanceId as value * n a DAG, only one taskInstance per taskCode s vald */ prvate fnal Map<Long, Integer> errorTaskMap = new ConcurrentHashMap<>(); /** * complete task map, taskCode as key, taskInstanceId as value * n a DAG, only one taskInstance per taskCode s vald */ prvate fnal Map<Long, Integer> completeTaskMap = new ConcurrentHashMap<>(); /** * depend faled task map, taskCode as key, taskId as value */ prvate fnal Map<Long, Integer> dependFaledTaskMap = new ConcurrentHashMap<>(); /** * forbdden task map, code as key */ prvate fnal Map<Long, TaskNode> forbddenTaskMap = new ConcurrentHashMap<>(); /**
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,861
[BUG-BE][Complete Date] Complement numbers will run in a loop under the serial strategy
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Complement numbers will run in a loop under the serial strategy ### What you expected to happen Complement numbers will run in a loop under the serial strategy ### How to reproduce After creating the workflow, select the complement mode and execute it. ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10861
https://github.com/apache/dolphinscheduler/pull/10862
057a9f6b241bae28ea5ec6d8e1e082b64f6410f3
b5653ea7f2d4d14ba92c45e429c2191099450b0f
2022-07-09T06:50:39Z
java
2022-07-09T08:41:51Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java
* skp task map, code as key */ prvate fnal Map<Strng, TaskNode> skpTaskNodeMap = new ConcurrentHashMap<>(); /** * complement date lst */ prvate Lst<Date> complementLstDate = Lsts.newLnkedLst(); /** * state event queue */ prvate fnal ConcurrentLnkedQueue<StateEvent> stateEvents = new ConcurrentLnkedQueue<>(); /** * ready to submt task queue */ prvate fnal PeerTaskInstancePrortyQueue readyToSubmtTaskQueue = new PeerTaskInstancePrortyQueue(); /** * wat to retry taskInstance map, taskCode as key, taskInstance as value * before retry, the taskInstance d s 0 */ prvate fnal Map<Long, TaskInstance> watToRetryTaskInstanceMap = new ConcurrentHashMap<>(); /** * state wheel execute thread */ prvate fnal StateWheelExecuteThread stateWheelExecuteThread; /** * curng global params servce */ prvate fnal CurngParamsServce curngParamsServce; prvate fnal Strng masterAddress; /**
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,861
[BUG-BE][Complete Date] Complement numbers will run in a loop under the serial strategy
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Complement numbers will run in a loop under the serial strategy ### What you expected to happen Complement numbers will run in a loop under the serial strategy ### How to reproduce After creating the workflow, select the complement mode and execute it. ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10861
https://github.com/apache/dolphinscheduler/pull/10862
057a9f6b241bae28ea5ec6d8e1e082b64f6410f3
b5653ea7f2d4d14ba92c45e429c2191099450b0f
2022-07-09T06:50:39Z
java
2022-07-09T08:41:51Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java
* @param processInstance processInstance * @param processServce processServce * @param nettyExecutorManager nettyExecutorManager * @param processAlertManager processAlertManager * @param masterConfg masterConfg * @param stateWheelExecuteThread stateWheelExecuteThread */ publc WorkflowExecuteRunnable( @NonNull ProcessInstance processInstance, @NonNull ProcessServce processServce, @NonNull NettyExecutorManager nettyExecutorManager, @NonNull ProcessAlertManager processAlertManager, @NonNull MasterConfg masterConfg, @NonNull StateWheelExecuteThread stateWheelExecuteThread, @NonNull CurngParamsServce curngParamsServce) { ths.processServce = processServce; ths.processInstance = processInstance; ths.nettyExecutorManager = nettyExecutorManager; ths.processAlertManager = processAlertManager; ths.stateWheelExecuteThread = stateWheelExecuteThread; ths.curngParamsServce = curngParamsServce; ths.masterAddress = NetUtls.getAddr(masterConfg.getLstenPort()); TaskMetrcs.regsterTaskPrepared(readyToSubmtTaskQueue::sze); } /** * the process start nodes are submtted completely. */ publc boolean sStart() { return ths.sStart; }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,861
[BUG-BE][Complete Date] Complement numbers will run in a loop under the serial strategy
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Complement numbers will run in a loop under the serial strategy ### What you expected to happen Complement numbers will run in a loop under the serial strategy ### How to reproduce After creating the workflow, select the complement mode and execute it. ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10861
https://github.com/apache/dolphinscheduler/pull/10862
057a9f6b241bae28ea5ec6d8e1e082b64f6410f3
b5653ea7f2d4d14ba92c45e429c2191099450b0f
2022-07-09T06:50:39Z
java
2022-07-09T08:41:51Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java
/** * handle event */ publc vod handleEvents() { f (!sStart) { return; } StateEvent stateEvent = null; whle (!ths.stateEvents.sEmpty()) { try { stateEvent = ths.stateEvents.peek(); LoggerUtls.setWorkflowAndTaskInstanceIDMDC(stateEvent.getProcessInstanceId(), stateEvent.getTaskInstanceId()); checkProcessInstance(stateEvent); StateEventHandler stateEventHandler = StateEventHandlerManager.getStateEventHandler(stateEvent.getType()) .orElseThrow(() -> new StateEventHandleError("Cannot fnd handler for the gven state event")); logger.nfo("Begn to handle state event, {}", stateEvent); f (stateEventHandler.handleStateEvent(ths, stateEvent)) { ths.stateEvents.remove(stateEvent); } } catch (StateEventHandleError stateEventHandleError) { logger.error("State event handle error, wll remove ths event: {}", stateEvent, stateEventHandleError); ths.stateEvents.remove(stateEvent); ThreadUtls.sleep(Constants.SLEEP_TIME_MILLIS); } catch (StateEventHandleExcepton stateEventHandleExcepton) { logger.error("State event handle error, wll retry ths event: {}", stateEvent,
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,861
[BUG-BE][Complete Date] Complement numbers will run in a loop under the serial strategy
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Complement numbers will run in a loop under the serial strategy ### What you expected to happen Complement numbers will run in a loop under the serial strategy ### How to reproduce After creating the workflow, select the complement mode and execute it. ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10861
https://github.com/apache/dolphinscheduler/pull/10862
057a9f6b241bae28ea5ec6d8e1e082b64f6410f3
b5653ea7f2d4d14ba92c45e429c2191099450b0f
2022-07-09T06:50:39Z
java
2022-07-09T08:41:51Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java
stateEventHandleExcepton); ThreadUtls.sleep(Constants.SLEEP_TIME_MILLIS); } catch (Excepton e) { logger.error("State event handle error, get a unknown excepton, wll retry ths event: {}", stateEvent, e); ThreadUtls.sleep(Constants.SLEEP_TIME_MILLIS); } fnally { LoggerUtls.removeWorkflowAndTaskInstanceIdMDC(); } } } publc Strng getKey() { f (StrngUtls.sNotEmpty(key) || ths.processDefnton == null) { return key; } key = Strng.format("%d_%d_%d", ths.processDefnton.getCode(), ths.processDefnton.getVerson(), ths.processInstance.getId()); return key; } publc boolean addStateEvent(StateEvent stateEvent) { f (processInstance.getId() != stateEvent.getProcessInstanceId()) { logger.nfo("state event would be abounded :{}", stateEvent); return false; } ths.stateEvents.add(stateEvent); return true;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,861
[BUG-BE][Complete Date] Complement numbers will run in a loop under the serial strategy
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Complement numbers will run in a loop under the serial strategy ### What you expected to happen Complement numbers will run in a loop under the serial strategy ### How to reproduce After creating the workflow, select the complement mode and execute it. ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10861
https://github.com/apache/dolphinscheduler/pull/10862
057a9f6b241bae28ea5ec6d8e1e082b64f6410f3
b5653ea7f2d4d14ba92c45e429c2191099450b0f
2022-07-09T06:50:39Z
java
2022-07-09T08:41:51Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java
} publc nt eventSze() { return ths.stateEvents.sze(); } publc ProcessInstance getProcessInstance() { return ths.processInstance; } publc boolean checkForceStartAndWakeUp(StateEvent stateEvent) { TaskGroupQueue taskGroupQueue = ths.processServce.loadTaskGroupQueue(stateEvent.getTaskInstanceId()); f (taskGroupQueue.getForceStart() == Flag.YES.getCode()) { TaskInstance taskInstance = ths.processServce.fndTaskInstanceById(stateEvent.getTaskInstanceId()); ITaskProcessor taskProcessor = actveTaskProcessorMaps.get(taskInstance.getTaskCode()); taskProcessor.acton(TaskActon.DISPATCH); ths.processServce.updateTaskGroupQueueStatus(taskGroupQueue.getTaskId(), TaskGroupQueueStatus.ACQUIRE_SUCCESS.getCode()); return true; } f (taskGroupQueue.getInQueue() == Flag.YES.getCode()) { boolean acqureTaskGroup = processServce.acqureTaskGroupAgan(taskGroupQueue); f (acqureTaskGroup) { TaskInstance taskInstance = ths.processServce.fndTaskInstanceById(stateEvent.getTaskInstanceId()); ITaskProcessor taskProcessor = actveTaskProcessorMaps.get(taskInstance.getTaskCode()); taskProcessor.acton(TaskActon.DISPATCH); return true; } } return false; } publc vod processTmeout() { ProjectUser projectUser = processServce.queryProjectWthUserByProcessInstanceId(processInstance.getId());
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,861
[BUG-BE][Complete Date] Complement numbers will run in a loop under the serial strategy
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Complement numbers will run in a loop under the serial strategy ### What you expected to happen Complement numbers will run in a loop under the serial strategy ### How to reproduce After creating the workflow, select the complement mode and execute it. ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10861
https://github.com/apache/dolphinscheduler/pull/10862
057a9f6b241bae28ea5ec6d8e1e082b64f6410f3
b5653ea7f2d4d14ba92c45e429c2191099450b0f
2022-07-09T06:50:39Z
java
2022-07-09T08:41:51Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java
ths.processAlertManager.sendProcessTmeoutAlert(ths.processInstance, projectUser); } publc vod taskTmeout(TaskInstance taskInstance) { ProjectUser projectUser = processServce.queryProjectWthUserByProcessInstanceId(processInstance.getId()); processAlertManager.sendTaskTmeoutAlert(processInstance, taskInstance, projectUser); } publc vod taskFnshed(TaskInstance taskInstance) throws StateEventHandleExcepton { logger.nfo("TaskInstance fnshed task code:{} state:{} ", taskInstance.getTaskCode(), taskInstance.getState()); actveTaskProcessorMaps.remove(taskInstance.getTaskCode()); stateWheelExecuteThread.removeTask4TmeoutCheck(processInstance, taskInstance); stateWheelExecuteThread.removeTask4RetryCheck(processInstance, taskInstance); stateWheelExecuteThread.removeTask4StateCheck(processInstance, taskInstance); f (taskInstance.getState().typeIsSuccess()) { completeTaskMap.put(taskInstance.getTaskCode(), taskInstance.getId()); processInstance.setVarPool(taskInstance.getVarPool()); processServce.saveProcessInstance(processInstance); f (!processInstance.sBlocked()) { submtPostNode(Long.toStrng(taskInstance.getTaskCode())); } } else f (taskInstance.taskCanRetry() && processInstance.getState() != ExecutonStatus.READY_STOP) { logger.nfo("Retry taskInstance taskInstance state: {}", taskInstance.getState()); retryTaskInstance(taskInstance); } else f (taskInstance.getState().typeIsFalure()) { completeTaskMap.put(taskInstance.getTaskCode(), taskInstance.getId()); f (processInstance.getFalureStrategy() == FalureStrategy.CONTINUE
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,861
[BUG-BE][Complete Date] Complement numbers will run in a loop under the serial strategy
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Complement numbers will run in a loop under the serial strategy ### What you expected to happen Complement numbers will run in a loop under the serial strategy ### How to reproduce After creating the workflow, select the complement mode and execute it. ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10861
https://github.com/apache/dolphinscheduler/pull/10862
057a9f6b241bae28ea5ec6d8e1e082b64f6410f3
b5653ea7f2d4d14ba92c45e429c2191099450b0f
2022-07-09T06:50:39Z
java
2022-07-09T08:41:51Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java
&& DagHelper.haveAllNodeAfterNode(Long.toStrng(taskInstance.getTaskCode()), dag)) { submtPostNode(Long.toStrng(taskInstance.getTaskCode())); } else { errorTaskMap.put(taskInstance.getTaskCode(), taskInstance.getId()); f (processInstance.getFalureStrategy() == FalureStrategy.END) { kllAllTasks(); } } } else f (taskInstance.getState().typeIsFnshed()) { completeTaskMap.put(taskInstance.getTaskCode(), taskInstance.getId()); } ths.updateProcessInstanceState(); } /** * release task group * * @param taskInstance */ publc vod releaseTaskGroup(TaskInstance taskInstance) { f (taskInstance.getTaskGroupId() > 0) { TaskInstance nextTaskInstance = ths.processServce.releaseTaskGroup(taskInstance); f (nextTaskInstance != null) { f (nextTaskInstance.getProcessInstanceId() == taskInstance.getProcessInstanceId()) { StateEvent nextEvent = new StateEvent(); nextEvent.setProcessInstanceId(ths.processInstance.getId()); nextEvent.setTaskInstanceId(nextTaskInstance.getId()); nextEvent.setType(StateEventType.WAIT_TASK_GROUP); ths.stateEvents.add(nextEvent); } else {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,861
[BUG-BE][Complete Date] Complement numbers will run in a loop under the serial strategy
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Complement numbers will run in a loop under the serial strategy ### What you expected to happen Complement numbers will run in a loop under the serial strategy ### How to reproduce After creating the workflow, select the complement mode and execute it. ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10861
https://github.com/apache/dolphinscheduler/pull/10862
057a9f6b241bae28ea5ec6d8e1e082b64f6410f3
b5653ea7f2d4d14ba92c45e429c2191099450b0f
2022-07-09T06:50:39Z
java
2022-07-09T08:41:51Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java
ProcessInstance processInstance = ths.processServce.fndProcessInstanceById(nextTaskInstance.getProcessInstanceId()); ths.processServce.sendStartTask2Master(processInstance, nextTaskInstance.getId(), org.apache.dolphnscheduler.remote.command.CommandType.TASK_WAKEUP_EVENT_REQUEST); } } } } /** * crate new task nstance to retry, dfferent objects from the orgnal * * @param taskInstance */ prvate vod retryTaskInstance(TaskInstance taskInstance) throws StateEventHandleExcepton { f (!taskInstance.taskCanRetry()) { return; } TaskInstance newTaskInstance = cloneRetryTaskInstance(taskInstance); f (newTaskInstance == null) { logger.error("retry fal, new taskInstance s null, task code:{}, task d:{}", taskInstance.getTaskCode(), taskInstance.getId()); return; } watToRetryTaskInstanceMap.put(newTaskInstance.getTaskCode(), newTaskInstance); f (!taskInstance.retryTaskIntervalOverTme()) { logger.nfo("falure task wll be submtted: process d: {}, task nstance code: {} state:{} retry tmes:{} / {}, nterval:{}", processInstance.getId(), newTaskInstance.getTaskCode(), newTaskInstance.getState(), newTaskInstance.getRetryTmes(), newTaskInstance.getMaxRetryTmes(), newTaskInstance.getRetryInterval()); stateWheelExecuteThread.addTask4TmeoutCheck(processInstance, newTaskInstance); stateWheelExecuteThread.addTask4RetryCheck(processInstance, newTaskInstance); } else { addTaskToStandByLst(newTaskInstance);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,861
[BUG-BE][Complete Date] Complement numbers will run in a loop under the serial strategy
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Complement numbers will run in a loop under the serial strategy ### What you expected to happen Complement numbers will run in a loop under the serial strategy ### How to reproduce After creating the workflow, select the complement mode and execute it. ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10861
https://github.com/apache/dolphinscheduler/pull/10862
057a9f6b241bae28ea5ec6d8e1e082b64f6410f3
b5653ea7f2d4d14ba92c45e429c2191099450b0f
2022-07-09T06:50:39Z
java
2022-07-09T08:41:51Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java
submtStandByTask(); watToRetryTaskInstanceMap.remove(newTaskInstance.getTaskCode()); } } /** * update process nstance */ publc vod refreshProcessInstance(nt processInstanceId) { logger.nfo("process nstance update: {}", processInstanceId); ProcessInstance newProcessInstance = processServce.fndProcessInstanceById(processInstanceId); BeanUtls.copyPropertes(newProcessInstance, processInstance); processDefnton = processServce.fndProcessDefnton(processInstance.getProcessDefntonCode(), processInstance.getProcessDefntonVerson()); processInstance.setProcessDefnton(processDefnton); } /** * update task nstance */ publc vod refreshTaskInstance(nt taskInstanceId) { logger.nfo("task nstance update: {} ", taskInstanceId); TaskInstance taskInstance = processServce.fndTaskInstanceById(taskInstanceId); f (taskInstance == null) { logger.error("can not fnd task nstance, d:{}", taskInstanceId); return; } processServce.packageTaskInstance(taskInstance, processInstance); taskInstanceMap.put(taskInstance.getId(), taskInstance); valdTaskMap.remove(taskInstance.getTaskCode()); f (Flag.YES == taskInstance.getFlag()) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,861
[BUG-BE][Complete Date] Complement numbers will run in a loop under the serial strategy
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Complement numbers will run in a loop under the serial strategy ### What you expected to happen Complement numbers will run in a loop under the serial strategy ### How to reproduce After creating the workflow, select the complement mode and execute it. ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10861
https://github.com/apache/dolphinscheduler/pull/10862
057a9f6b241bae28ea5ec6d8e1e082b64f6410f3
b5653ea7f2d4d14ba92c45e429c2191099450b0f
2022-07-09T06:50:39Z
java
2022-07-09T08:41:51Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java
valdTaskMap.put(taskInstance.getTaskCode(), taskInstance.getId()); } } /** * check process nstance by state event */ publc vod checkProcessInstance(StateEvent stateEvent) throws StateEventHandleError { f (ths.processInstance.getId() != stateEvent.getProcessInstanceId()) { throw new StateEventHandleError("The event doesn't contans process nstance d"); } } /** * check f task nstance exst by state event */ publc vod checkTaskInstanceByStateEvent(StateEvent stateEvent) throws StateEventHandleError { f (stateEvent.getTaskInstanceId() == 0) { throw new StateEventHandleError("The taskInstanceId s 0"); } f (!taskInstanceMap.contansKey(stateEvent.getTaskInstanceId())) { throw new StateEventHandleError("Cannot fnd the taskInstance from taskInstanceMap"); } } /** * check f task nstance exst by d */ publc boolean checkTaskInstanceById(nt taskInstanceId) { f (taskInstanceMap.sEmpty()) { return false; } return taskInstanceMap.contansKey(taskInstanceId);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,861
[BUG-BE][Complete Date] Complement numbers will run in a loop under the serial strategy
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Complement numbers will run in a loop under the serial strategy ### What you expected to happen Complement numbers will run in a loop under the serial strategy ### How to reproduce After creating the workflow, select the complement mode and execute it. ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10861
https://github.com/apache/dolphinscheduler/pull/10862
057a9f6b241bae28ea5ec6d8e1e082b64f6410f3
b5653ea7f2d4d14ba92c45e429c2191099450b0f
2022-07-09T06:50:39Z
java
2022-07-09T08:41:51Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java
} /** * get task nstance from memory */ publc Optonal<TaskInstance> getTaskInstance(nt taskInstanceId) { f (taskInstanceMap.contansKey(taskInstanceId)) { return Optonal.ofNullable(taskInstanceMap.get(taskInstanceId)); } return Optonal.empty(); } publc Optonal<TaskInstance> getTaskInstance(long taskCode) { f (taskInstanceMap.sEmpty()) { return Optonal.empty(); } for (TaskInstance taskInstance : taskInstanceMap.values()) { f (taskInstance.getTaskCode() == taskCode) { return Optonal.of(taskInstance); } } return Optonal.empty(); } publc Optonal<TaskInstance> getActveTaskInstanceByTaskCode(long taskCode) { f (actveTaskProcessorMaps.contansKey(taskCode)) { return Optonal.ofNullable(actveTaskProcessorMaps.get(taskCode).taskInstance()); } return Optonal.empty(); } publc Optonal<TaskInstance> getRetryTaskInstanceByTaskCode(long taskCode) { f (watToRetryTaskInstanceMap.contansKey(taskCode)) { return Optonal.ofNullable(watToRetryTaskInstanceMap.get(taskCode));
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,861
[BUG-BE][Complete Date] Complement numbers will run in a loop under the serial strategy
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Complement numbers will run in a loop under the serial strategy ### What you expected to happen Complement numbers will run in a loop under the serial strategy ### How to reproduce After creating the workflow, select the complement mode and execute it. ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10861
https://github.com/apache/dolphinscheduler/pull/10862
057a9f6b241bae28ea5ec6d8e1e082b64f6410f3
b5653ea7f2d4d14ba92c45e429c2191099450b0f
2022-07-09T06:50:39Z
java
2022-07-09T08:41:51Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java
} return Optonal.empty(); } publc vod processBlock() { ProjectUser projectUser = processServce.queryProjectWthUserByProcessInstanceId(processInstance.getId()); processAlertManager.sendProcessBlockngAlert(processInstance, projectUser); logger.nfo("processInstance {} block alert send successful!", processInstance.getId()); } publc boolean processComplementData() { f (!needComplementProcess()) { return false; } f (processInstance.getState() == ExecutonStatus.READY_STOP) { return false; } Date scheduleDate = processInstance.getScheduleTme(); f (scheduleDate == null) { scheduleDate = complementLstDate.get(0); } else f (processInstance.getState().typeIsFnshed()) { endProcess(); f (complementLstDate.sEmpty()) { logger.nfo("process complement end. process d:{}", processInstance.getId()); return true; } nt ndex = complementLstDate.ndexOf(scheduleDate); f (ndex >= complementLstDate.sze() - 1 || !processInstance.getState().typeIsSuccess()) { logger.nfo("process complement end. process d:{}", processInstance.getId()); return true; }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,861
[BUG-BE][Complete Date] Complement numbers will run in a loop under the serial strategy
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Complement numbers will run in a loop under the serial strategy ### What you expected to happen Complement numbers will run in a loop under the serial strategy ### How to reproduce After creating the workflow, select the complement mode and execute it. ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10861
https://github.com/apache/dolphinscheduler/pull/10862
057a9f6b241bae28ea5ec6d8e1e082b64f6410f3
b5653ea7f2d4d14ba92c45e429c2191099450b0f
2022-07-09T06:50:39Z
java
2022-07-09T08:41:51Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java
logger.nfo("process complement contnue. process d:{}, schedule tme:{} complementLstDate:{}", processInstance.getId(), processInstance.getScheduleTme(), complementLstDate); scheduleDate = complementLstDate.get(ndex + 1); } nt create = ths.createComplementDataCommand(scheduleDate); f (create > 0) { logger.nfo("create complement data command successfully."); } return true; } prvate nt createComplementDataCommand(Date scheduleDate) { Command command = new Command(); command.setScheduleTme(scheduleDate); command.setCommandType(CommandType.COMPLEMENT_DATA); command.setProcessDefntonCode(processInstance.getProcessDefntonCode()); Map<Strng, Strng> cmdParam = JSONUtls.toMap(processInstance.getCommandParam()); f (cmdParam.contansKey(Constants.CMD_PARAM_RECOVERY_START_NODE_STRING)) { cmdParam.remove(Constants.CMD_PARAM_RECOVERY_START_NODE_STRING); } f (cmdParam.contansKey(CMDPARAM_COMPLEMENT_DATA_SCHEDULE_DATE_LIST)) { cmdParam.replace(CMDPARAM_COMPLEMENT_DATA_SCHEDULE_DATE_LIST, cmdParam.get(CMDPARAM_COMPLEMENT_DATA_SCHEDULE_DATE_LIST) .substrng(cmdParam.get(CMDPARAM_COMPLEMENT_DATA_SCHEDULE_DATE_LIST).ndexOf(COMMA) + 1)); } f (cmdParam.contansKey(CMDPARAM_COMPLEMENT_DATA_START_DATE)) { cmdParam.replace(CMDPARAM_COMPLEMENT_DATA_START_DATE, DateUtls.format(scheduleDate, YYYY_MM_DD_HH_MM_SS, null)); } command.setCommandParam(JSONUtls.toJsonStrng(cmdParam)); command.setTaskDependType(processInstance.getTaskDependType()); command.setFalureStrategy(processInstance.getFalureStrategy());
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,861
[BUG-BE][Complete Date] Complement numbers will run in a loop under the serial strategy
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Complement numbers will run in a loop under the serial strategy ### What you expected to happen Complement numbers will run in a loop under the serial strategy ### How to reproduce After creating the workflow, select the complement mode and execute it. ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10861
https://github.com/apache/dolphinscheduler/pull/10862
057a9f6b241bae28ea5ec6d8e1e082b64f6410f3
b5653ea7f2d4d14ba92c45e429c2191099450b0f
2022-07-09T06:50:39Z
java
2022-07-09T08:41:51Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java
command.setWarnngType(processInstance.getWarnngType()); command.setWarnngGroupId(processInstance.getWarnngGroupId()); command.setStartTme(new Date()); command.setExecutorId(processInstance.getExecutorId()); command.setUpdateTme(new Date()); command.setProcessInstanceProrty(processInstance.getProcessInstanceProrty()); command.setWorkerGroup(processInstance.getWorkerGroup()); command.setEnvronmentCode(processInstance.getEnvronmentCode()); command.setDryRun(processInstance.getDryRun()); command.setProcessInstanceId(0); command.setProcessDefntonVerson(processInstance.getProcessDefntonVerson()); return processServce.createCommand(command); } prvate boolean needComplementProcess() { f (processInstance.sComplementData() && Flag.NO == processInstance.getIsSubProcess()) { return true; } return false; } /** * ProcessInstance start entrypont. */ @Overrde publc WorkflowSubmtStatue call() { f (ths.taskInstanceMap.sze() > 0 || sStart) { logger.warn("The workflow has already been started"); return WorkflowSubmtStatue.DUPLICATED_SUBMITTED; } try { LoggerUtls.setWorkflowInstanceIdMDC(processInstance.getId());
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,861
[BUG-BE][Complete Date] Complement numbers will run in a loop under the serial strategy
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Complement numbers will run in a loop under the serial strategy ### What you expected to happen Complement numbers will run in a loop under the serial strategy ### How to reproduce After creating the workflow, select the complement mode and execute it. ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10861
https://github.com/apache/dolphinscheduler/pull/10862
057a9f6b241bae28ea5ec6d8e1e082b64f6410f3
b5653ea7f2d4d14ba92c45e429c2191099450b0f
2022-07-09T06:50:39Z
java
2022-07-09T08:41:51Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java
buldFlowDag(); ntTaskQueue(); submtPostNode(null); sStart = true; return WorkflowSubmtStatue.SUCCESS; } catch (Excepton e) { logger.error("Start workflow error", e); return WorkflowSubmtStatue.FAILED; } fnally { LoggerUtls.removeWorkflowInstanceIdMDC(); } } /** * process end handle */ publc vod endProcess() { ths.stateEvents.clear(); f (processDefnton.getExecutonType().typeIsSeralWat() || processDefnton.getExecutonType().typeIsSeralProrty()) { checkSeralProcess(processDefnton); } f (processInstance.getState().typeIsWatngThread()) { processServce.createRecoveryWatngThreadCommand(null, processInstance); } f (processAlertManager.sNeedToSendWarnng(processInstance)) { ProjectUser projectUser = processServce.queryProjectWthUserByProcessInstanceId(processInstance.getId()); processAlertManager.sendAlertProcessInstance(processInstance, getValdTaskLst(), projectUser); } f (checkTaskQueue()) { processServce.releaseAllTaskGroup(processInstance.getId());
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,861
[BUG-BE][Complete Date] Complement numbers will run in a loop under the serial strategy
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Complement numbers will run in a loop under the serial strategy ### What you expected to happen Complement numbers will run in a loop under the serial strategy ### How to reproduce After creating the workflow, select the complement mode and execute it. ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10861
https://github.com/apache/dolphinscheduler/pull/10862
057a9f6b241bae28ea5ec6d8e1e082b64f6410f3
b5653ea7f2d4d14ba92c45e429c2191099450b0f
2022-07-09T06:50:39Z
java
2022-07-09T08:41:51Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java
} } publc vod checkSeralProcess(ProcessDefnton processDefnton) { nt nextInstanceId = processInstance.getNextProcessInstanceId(); f (nextInstanceId == 0) { ProcessInstance nextProcessInstance = ths.processServce.loadNextProcess4Seral(processInstance.getProcessDefnton().getCode(), ExecutonStatus.SERIAL_WAIT.getCode(), processInstance.getId()); f (nextProcessInstance == null) { return; } ProcessInstance nextReadyStopProcessInstance = ths.processServce.loadNextProcess4Seral(processInstance.getProcessDefnton().getCode(), ExecutonStatus.READY_STOP.getCode(), processInstance.getId()); f (processDefnton.getExecutonType().typeIsSeralProrty() && nextReadyStopProcessInstance != null) { return; } nextInstanceId = nextProcessInstance.getId(); } ProcessInstance nextProcessInstance = ths.processServce.fndProcessInstanceById(nextInstanceId); f (nextProcessInstance.getState().typeIsFnshed() || nextProcessInstance.getState().typeIsRunnng()) { return; } Map<Strng, Object> cmdParam = new HashMap<>(); cmdParam.put(CMD_PARAM_RECOVER_PROCESS_ID_STRING, nextInstanceId); Command command = new Command(); command.setCommandType(CommandType.RECOVER_SERIAL_WAIT); command.setProcessInstanceId(nextProcessInstance.getId()); command.setProcessDefntonCode(processDefnton.getCode()); command.setProcessDefntonVerson(processDefnton.getVerson()); command.setCommandParam(JSONUtls.toJsonStrng(cmdParam)); processServce.createCommand(command);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,861
[BUG-BE][Complete Date] Complement numbers will run in a loop under the serial strategy
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Complement numbers will run in a loop under the serial strategy ### What you expected to happen Complement numbers will run in a loop under the serial strategy ### How to reproduce After creating the workflow, select the complement mode and execute it. ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10861
https://github.com/apache/dolphinscheduler/pull/10862
057a9f6b241bae28ea5ec6d8e1e082b64f6410f3
b5653ea7f2d4d14ba92c45e429c2191099450b0f
2022-07-09T06:50:39Z
java
2022-07-09T08:41:51Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java
} /** * Generate process dag * * @throws Excepton excepton */ prvate vod buldFlowDag() throws Excepton { f (ths.dag != null) { return; } processDefnton = processServce.fndProcessDefnton(processInstance.getProcessDefntonCode(), processInstance.getProcessDefntonVerson()); processInstance.setProcessDefnton(processDefnton); Lst<TaskInstance> recoverNodeLst = getRecoverTaskInstanceLst(processInstance.getCommandParam()); Lst<ProcessTaskRelaton> processTaskRelatons = processServce.fndRelatonByCode(processDefnton.getCode(), processDefnton.getVerson()); Lst<TaskDefntonLog> taskDefntonLogs = processServce.getTaskDefneLogLstByRelaton(processTaskRelatons); Lst<TaskNode> taskNodeLst = processServce.transformTask(processTaskRelatons, taskDefntonLogs); forbddenTaskMap.clear(); taskNodeLst.forEach(taskNode -> { f (taskNode.sForbdden()) { forbddenTaskMap.put(taskNode.getCode(), taskNode); } }); Lst<Strng> recoveryNodeCodeLst = getRecoveryNodeCodeLst(recoverNodeLst); Lst<Strng> startNodeNameLst = parseStartNodeName(processInstance.getCommandParam()); ProcessDag processDag = generateFlowDag(taskNodeLst, startNodeNameLst, recoveryNodeCodeLst, processInstance.getTaskDependType()); f (processDag == null) { logger.error("processDag s null"); return; }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,861
[BUG-BE][Complete Date] Complement numbers will run in a loop under the serial strategy
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Complement numbers will run in a loop under the serial strategy ### What you expected to happen Complement numbers will run in a loop under the serial strategy ### How to reproduce After creating the workflow, select the complement mode and execute it. ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10861
https://github.com/apache/dolphinscheduler/pull/10862
057a9f6b241bae28ea5ec6d8e1e082b64f6410f3
b5653ea7f2d4d14ba92c45e429c2191099450b0f
2022-07-09T06:50:39Z
java
2022-07-09T08:41:51Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java
dag = DagHelper.buldDagGraph(processDag); logger.nfo("Buld dag success, dag: {}", dag); } /** * nt task queue */ prvate vod ntTaskQueue() throws StateEventHandleExcepton, CronParseExcepton { taskFaledSubmt = false; actveTaskProcessorMaps.clear(); dependFaledTaskMap.clear(); completeTaskMap.clear(); errorTaskMap.clear(); f (!sNewProcessInstance()) { logger.nfo("The workflowInstance s not a newly runnng nstance, runtmes: {}, recover flag: {}", processInstance.getRunTmes(), processInstance.getRecovery()); Lst<TaskInstance> valdTaskInstanceLst = processServce.fndValdTaskLstByProcessId(processInstance.getId()); for (TaskInstance task : valdTaskInstanceLst) { try { LoggerUtls.setWorkflowAndTaskInstanceIDMDC(task.getProcessInstanceId(), task.getId()); logger.nfo( "Check the taskInstance from a exst workflowInstance, exstTaskInstanceCode: {}, taskInstanceStatus: {}", task.getTaskCode(), task.getState()); f (valdTaskMap.contansKey(task.getTaskCode())) { nt oldTaskInstanceId = valdTaskMap.get(task.getTaskCode()); TaskInstance oldTaskInstance = taskInstanceMap.get(oldTaskInstanceId); f (!oldTaskInstance.getState().typeIsFnshed() && task.getState().typeIsFnshed()) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,861
[BUG-BE][Complete Date] Complement numbers will run in a loop under the serial strategy
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Complement numbers will run in a loop under the serial strategy ### What you expected to happen Complement numbers will run in a loop under the serial strategy ### How to reproduce After creating the workflow, select the complement mode and execute it. ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10861
https://github.com/apache/dolphinscheduler/pull/10862
057a9f6b241bae28ea5ec6d8e1e082b64f6410f3
b5653ea7f2d4d14ba92c45e429c2191099450b0f
2022-07-09T06:50:39Z
java
2022-07-09T08:41:51Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java
task.setFlag(Flag.NO); processServce.updateTaskInstance(task); contnue; } logger.warn("have same taskCode taskInstance when nt task queue, taskCode:{}", task.getTaskCode()); } valdTaskMap.put(task.getTaskCode(), task.getId()); taskInstanceMap.put(task.getId(), task); f (task.sTaskComplete()) { completeTaskMap.put(task.getTaskCode(), task.getId()); contnue; } f (task.sCondtonsTask() || DagHelper.haveCondtonsAfterNode(Long.toStrng(task.getTaskCode()), dag)) { contnue; } f (task.taskCanRetry()) { f (task.getState() == ExecutonStatus.NEED_FAULT_TOLERANCE) { TaskInstance tolerantTaskInstance = cloneTolerantTaskInstance(task); addTaskToStandByLst(tolerantTaskInstance); } else { retryTaskInstance(task); } contnue; } f (task.getState().typeIsFalure()) { errorTaskMap.put(task.getTaskCode(), task.getId()); }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,861
[BUG-BE][Complete Date] Complement numbers will run in a loop under the serial strategy
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Complement numbers will run in a loop under the serial strategy ### What you expected to happen Complement numbers will run in a loop under the serial strategy ### How to reproduce After creating the workflow, select the complement mode and execute it. ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10861
https://github.com/apache/dolphinscheduler/pull/10862
057a9f6b241bae28ea5ec6d8e1e082b64f6410f3
b5653ea7f2d4d14ba92c45e429c2191099450b0f
2022-07-09T06:50:39Z
java
2022-07-09T08:41:51Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java
} fnally { LoggerUtls.removeWorkflowAndTaskInstanceIdMDC(); } } } else { logger.nfo("The current workflowInstance s a newly runnng workflowInstance"); } f (processInstance.sComplementData() && complementLstDate.sEmpty()) { Map<Strng, Strng> cmdParam = JSONUtls.toMap(processInstance.getCommandParam()); f (cmdParam != null) { setGlobalParamIfCommanded(processDefnton, cmdParam); Date start = null; Date end = null; f (cmdParam.contansKey(CMDPARAM_COMPLEMENT_DATA_START_DATE) && cmdParam.contansKey(CMDPARAM_COMPLEMENT_DATA_END_DATE)) { start = DateUtls.strngToDate(cmdParam.get(CMDPARAM_COMPLEMENT_DATA_START_DATE)); end = DateUtls.strngToDate(cmdParam.get(CMDPARAM_COMPLEMENT_DATA_END_DATE)); } Lst<Schedule> schedules = processServce.queryReleaseSchedulerLstByProcessDefntonCode(processInstance.getProcessDefntonCode()); f (complementLstDate.sEmpty() && needComplementProcess()) { f (start != null && end != null) { complementLstDate = CronUtls.getSelfFreDateLst(start, end, schedules); } f (cmdParam.contansKey(CMDPARAM_COMPLEMENT_DATA_SCHEDULE_DATE_LIST)) { complementLstDate = CronUtls.getSelfScheduleDateLst(cmdParam); } logger.nfo(" process defnton code:{} complement data: {}", processInstance.getProcessDefntonCode(), complementLstDate); f (!complementLstDate.sEmpty() && Flag.NO == processInstance.getIsSubProcess()) { processInstance.setScheduleTme(complementLstDate.get(0)); Strng globalParams = curngParamsServce.curngGlobalParams(processInstance.getId(),
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,861
[BUG-BE][Complete Date] Complement numbers will run in a loop under the serial strategy
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Complement numbers will run in a loop under the serial strategy ### What you expected to happen Complement numbers will run in a loop under the serial strategy ### How to reproduce After creating the workflow, select the complement mode and execute it. ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10861
https://github.com/apache/dolphinscheduler/pull/10862
057a9f6b241bae28ea5ec6d8e1e082b64f6410f3
b5653ea7f2d4d14ba92c45e429c2191099450b0f
2022-07-09T06:50:39Z
java
2022-07-09T08:41:51Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java
processDefnton.getGlobalParamMap(), processDefnton.getGlobalParamLst(), CommandType.COMPLEMENT_DATA, processInstance.getScheduleTme(), cmdParam.get(Constants.SCHEDULE_TIMEZONE)); processInstance.setGlobalParams(globalParams); processServce.updateProcessInstance(processInstance); } } } } logger.nfo("Intalze task queue, dependFaledTaskMap: {}, completeTaskMap: {}, errorTaskMap: {}", dependFaledTaskMap, completeTaskMap, errorTaskMap); } /** * submt task to execute * * @param taskInstance task nstance * @return TaskInstance */ prvate Optonal<TaskInstance> submtTaskExec(TaskInstance taskInstance) { try { processServce.packageTaskInstance(taskInstance, processInstance); ITaskProcessor taskProcessor = TaskProcessorFactory.getTaskProcessor(taskInstance.getTaskType()); taskProcessor.nt(taskInstance, processInstance); f (taskInstance.getState() == ExecutonStatus.RUNNING_EXECUTION && taskProcessor.getType().equalsIgnoreCase(Constants.COMMON_TASK_TYPE)) { notfyProcessHostUpdate(taskInstance);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,861
[BUG-BE][Complete Date] Complement numbers will run in a loop under the serial strategy
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Complement numbers will run in a loop under the serial strategy ### What you expected to happen Complement numbers will run in a loop under the serial strategy ### How to reproduce After creating the workflow, select the complement mode and execute it. ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10861
https://github.com/apache/dolphinscheduler/pull/10862
057a9f6b241bae28ea5ec6d8e1e082b64f6410f3
b5653ea7f2d4d14ba92c45e429c2191099450b0f
2022-07-09T06:50:39Z
java
2022-07-09T08:41:51Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java
} boolean submt = taskProcessor.acton(TaskActon.SUBMIT); f (!submt) { logger.error("process d:{} name:{} submt standby task d:{} name:{} faled!", processInstance.getId(), processInstance.getName(), taskInstance.getId(), taskInstance.getName()); return Optonal.empty(); } f (valdTaskMap.contansKey(taskInstance.getTaskCode())) { nt oldTaskInstanceId = valdTaskMap.get(taskInstance.getTaskCode()); f (taskInstance.getId() != oldTaskInstanceId) { TaskInstance oldTaskInstance = taskInstanceMap.get(oldTaskInstanceId); oldTaskInstance.setFlag(Flag.NO); processServce.updateTaskInstance(oldTaskInstance); valdTaskMap.remove(taskInstance.getTaskCode()); actveTaskProcessorMaps.remove(taskInstance.getTaskCode()); } } valdTaskMap.put(taskInstance.getTaskCode(), taskInstance.getId()); taskInstanceMap.put(taskInstance.getId(), taskInstance); actveTaskProcessorMaps.put(taskInstance.getTaskCode(), taskProcessor); boolean dspatchSuccess = taskProcessor.acton(TaskActon.DISPATCH); f (!dspatchSuccess) { logger.error("process d:{} name:{} dspatch standby task d:{} name:{} faled!", processInstance.getId(), processInstance.getName(), taskInstance.getId(), taskInstance.getName()); return Optonal.empty(); } taskProcessor.acton(TaskActon.RUN);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,861
[BUG-BE][Complete Date] Complement numbers will run in a loop under the serial strategy
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Complement numbers will run in a loop under the serial strategy ### What you expected to happen Complement numbers will run in a loop under the serial strategy ### How to reproduce After creating the workflow, select the complement mode and execute it. ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10861
https://github.com/apache/dolphinscheduler/pull/10862
057a9f6b241bae28ea5ec6d8e1e082b64f6410f3
b5653ea7f2d4d14ba92c45e429c2191099450b0f
2022-07-09T06:50:39Z
java
2022-07-09T08:41:51Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java
stateWheelExecuteThread.addTask4TmeoutCheck(processInstance, taskInstance); stateWheelExecuteThread.addTask4StateCheck(processInstance, taskInstance); f (taskProcessor.taskInstance().getState().typeIsFnshed()) { f (processInstance.sBlocked()) { StateEvent processBlockEvent = new StateEvent(); processBlockEvent.setProcessInstanceId(ths.processInstance.getId()); processBlockEvent.setTaskInstanceId(taskInstance.getId()); processBlockEvent.setExecutonStatus(taskProcessor.taskInstance().getState()); processBlockEvent.setType(StateEventType.PROCESS_BLOCKED); ths.stateEvents.add(processBlockEvent); } StateEvent taskStateChangeEvent = new StateEvent(); taskStateChangeEvent.setProcessInstanceId(ths.processInstance.getId()); taskStateChangeEvent.setTaskInstanceId(taskInstance.getId()); taskStateChangeEvent.setExecutonStatus(taskProcessor.taskInstance().getState()); taskStateChangeEvent.setType(StateEventType.TASK_STATE_CHANGE); ths.stateEvents.add(taskStateChangeEvent); } return Optonal.of(taskInstance); } catch (Excepton e) { logger.error("submt standby task error", e); return Optonal.empty(); } } prvate vod notfyProcessHostUpdate(TaskInstance taskInstance) { f (StrngUtls.sEmpty(taskInstance.getHost())) { return; } try { HostUpdateCommand hostUpdateCommand = new HostUpdateCommand();
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,861
[BUG-BE][Complete Date] Complement numbers will run in a loop under the serial strategy
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Complement numbers will run in a loop under the serial strategy ### What you expected to happen Complement numbers will run in a loop under the serial strategy ### How to reproduce After creating the workflow, select the complement mode and execute it. ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10861
https://github.com/apache/dolphinscheduler/pull/10862
057a9f6b241bae28ea5ec6d8e1e082b64f6410f3
b5653ea7f2d4d14ba92c45e429c2191099450b0f
2022-07-09T06:50:39Z
java
2022-07-09T08:41:51Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java
hostUpdateCommand.setProcessHost(masterAddress); hostUpdateCommand.setTaskInstanceId(taskInstance.getId()); Host host = new Host(taskInstance.getHost()); nettyExecutorManager.doExecute(host, hostUpdateCommand.convert2Command()); } catch (Excepton e) { logger.error("notfy process host update", e); } } /** * fnd task nstance n db. * n case submt more than one same name task n the same tme. * * @param taskCode task code * @param taskVerson task verson * @return TaskInstance */ prvate TaskInstance fndTaskIfExsts(Long taskCode, nt taskVerson) { Lst<TaskInstance> valdTaskInstanceLst = getValdTaskLst(); for (TaskInstance taskInstance : valdTaskInstanceLst) { f (taskInstance.getTaskCode() == taskCode && taskInstance.getTaskDefntonVerson() == taskVerson) { return taskInstance; } } return null; } /** * encapsulaton task, ths method wll only create a new task nstance, the return task nstance wll not contan d. * * @param processInstance process nstance
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,861
[BUG-BE][Complete Date] Complement numbers will run in a loop under the serial strategy
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Complement numbers will run in a loop under the serial strategy ### What you expected to happen Complement numbers will run in a loop under the serial strategy ### How to reproduce After creating the workflow, select the complement mode and execute it. ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10861
https://github.com/apache/dolphinscheduler/pull/10862
057a9f6b241bae28ea5ec6d8e1e082b64f6410f3
b5653ea7f2d4d14ba92c45e429c2191099450b0f
2022-07-09T06:50:39Z
java
2022-07-09T08:41:51Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java
* @param taskNode taskNode * @return TaskInstance */ prvate TaskInstance createTaskInstance(ProcessInstance processInstance, TaskNode taskNode) { TaskInstance taskInstance = fndTaskIfExsts(taskNode.getCode(), taskNode.getVerson()); f (taskInstance != null) { return taskInstance; } return newTaskInstance(processInstance, taskNode); } /** * clone a new taskInstance for retry and reset some logc felds * * @return */ publc TaskInstance cloneRetryTaskInstance(TaskInstance taskInstance) { TaskNode taskNode = dag.getNode(Long.toStrng(taskInstance.getTaskCode())); f (taskNode == null) { logger.error("taskNode s null, code:{}", taskInstance.getTaskCode()); return null; } TaskInstance newTaskInstance = newTaskInstance(processInstance, taskNode); newTaskInstance.setTaskDefne(taskInstance.getTaskDefne()); newTaskInstance.setProcessDefne(taskInstance.getProcessDefne()); newTaskInstance.setProcessInstance(processInstance); newTaskInstance.setRetryTmes(taskInstance.getRetryTmes() + 1); newTaskInstance.setState(taskInstance.getState()); newTaskInstance.setEndTme(taskInstance.getEndTme()); return newTaskInstance;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,861
[BUG-BE][Complete Date] Complement numbers will run in a loop under the serial strategy
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Complement numbers will run in a loop under the serial strategy ### What you expected to happen Complement numbers will run in a loop under the serial strategy ### How to reproduce After creating the workflow, select the complement mode and execute it. ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10861
https://github.com/apache/dolphinscheduler/pull/10862
057a9f6b241bae28ea5ec6d8e1e082b64f6410f3
b5653ea7f2d4d14ba92c45e429c2191099450b0f
2022-07-09T06:50:39Z
java
2022-07-09T08:41:51Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java
} /** * clone a new taskInstance for tolerant and reset some logc felds * * @return */ publc TaskInstance cloneTolerantTaskInstance(TaskInstance taskInstance) { TaskNode taskNode = dag.getNode(Long.toStrng(taskInstance.getTaskCode())); f (taskNode == null) { logger.error("taskNode s null, code:{}", taskInstance.getTaskCode()); return null; } TaskInstance newTaskInstance = newTaskInstance(processInstance, taskNode); newTaskInstance.setTaskDefne(taskInstance.getTaskDefne()); newTaskInstance.setProcessDefne(taskInstance.getProcessDefne()); newTaskInstance.setProcessInstance(processInstance); newTaskInstance.setRetryTmes(taskInstance.getRetryTmes()); newTaskInstance.setState(taskInstance.getState()); return newTaskInstance; } /** * new a taskInstance * * @param processInstance * @param taskNode * @return */ publc TaskInstance newTaskInstance(ProcessInstance processInstance, TaskNode taskNode) { TaskInstance taskInstance = new TaskInstance(); taskInstance.setTaskCode(taskNode.getCode());
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,861
[BUG-BE][Complete Date] Complement numbers will run in a loop under the serial strategy
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Complement numbers will run in a loop under the serial strategy ### What you expected to happen Complement numbers will run in a loop under the serial strategy ### How to reproduce After creating the workflow, select the complement mode and execute it. ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10861
https://github.com/apache/dolphinscheduler/pull/10862
057a9f6b241bae28ea5ec6d8e1e082b64f6410f3
b5653ea7f2d4d14ba92c45e429c2191099450b0f
2022-07-09T06:50:39Z
java
2022-07-09T08:41:51Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java
taskInstance.setTaskDefntonVerson(taskNode.getVerson()); taskInstance.setName(taskNode.getName()); taskInstance.setState(ExecutonStatus.SUBMITTED_SUCCESS); taskInstance.setProcessInstanceId(processInstance.getId()); taskInstance.setTaskType(taskNode.getType().toUpperCase()); taskInstance.setAlertFlag(Flag.NO); taskInstance.setStartTme(null); taskInstance.setFlag(Flag.YES); taskInstance.setDryRun(processInstance.getDryRun()); taskInstance.setRetryTmes(0); taskInstance.setMaxRetryTmes(taskNode.getMaxRetryTmes()); taskInstance.setRetryInterval(taskNode.getRetryInterval()); taskInstance.setTaskParams(taskNode.getTaskParams()); taskInstance.setTaskGroupId(taskNode.getTaskGroupId()); taskInstance.setTaskGroupProrty(taskNode.getTaskGroupProrty()); taskInstance.setCpuQuota(taskNode.getCpuQuota());
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,861
[BUG-BE][Complete Date] Complement numbers will run in a loop under the serial strategy
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Complement numbers will run in a loop under the serial strategy ### What you expected to happen Complement numbers will run in a loop under the serial strategy ### How to reproduce After creating the workflow, select the complement mode and execute it. ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10861
https://github.com/apache/dolphinscheduler/pull/10862
057a9f6b241bae28ea5ec6d8e1e082b64f6410f3
b5653ea7f2d4d14ba92c45e429c2191099450b0f
2022-07-09T06:50:39Z
java
2022-07-09T08:41:51Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java
taskInstance.setMemoryMax(taskNode.getMemoryMax()); f (taskNode.getTaskInstanceProrty() == null) { taskInstance.setTaskInstanceProrty(Prorty.MEDIUM); } else { taskInstance.setTaskInstanceProrty(taskNode.getTaskInstanceProrty()); } Strng processWorkerGroup = processInstance.getWorkerGroup(); processWorkerGroup = StrngUtls.sBlank(processWorkerGroup) ? DEFAULT_WORKER_GROUP : processWorkerGroup; Strng taskWorkerGroup = StrngUtls.sBlank(taskNode.getWorkerGroup()) ? processWorkerGroup : taskNode.getWorkerGroup(); Long processEnvronmentCode = Objects.sNull(processInstance.getEnvronmentCode()) ? -1 : processInstance.getEnvronmentCode(); Long taskEnvronmentCode = Objects.sNull(taskNode.getEnvronmentCode()) ? processEnvronmentCode : taskNode.getEnvronmentCode(); f (!processWorkerGroup.equals(DEFAULT_WORKER_GROUP) && taskWorkerGroup.equals(DEFAULT_WORKER_GROUP)) { taskInstance.setWorkerGroup(processWorkerGroup); taskInstance.setEnvronmentCode(processEnvronmentCode); } else { taskInstance.setWorkerGroup(taskWorkerGroup); taskInstance.setEnvronmentCode(taskEnvronmentCode); } f (!taskInstance.getEnvronmentCode().equals(-1L)) { Envronment envronment = processServce.fndEnvronmentByCode(taskInstance.getEnvronmentCode()); f (Objects.nonNull(envronment) && StrngUtls.sNotEmpty(envronment.getConfg())) { taskInstance.setEnvronmentConfg(envronment.getConfg()); } } taskInstance.setDelayTme(taskNode.getDelayTme()); return taskInstance; } publc vod getPreVarPool(TaskInstance taskInstance, Set<Strng> preTask) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,861
[BUG-BE][Complete Date] Complement numbers will run in a loop under the serial strategy
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Complement numbers will run in a loop under the serial strategy ### What you expected to happen Complement numbers will run in a loop under the serial strategy ### How to reproduce After creating the workflow, select the complement mode and execute it. ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10861
https://github.com/apache/dolphinscheduler/pull/10862
057a9f6b241bae28ea5ec6d8e1e082b64f6410f3
b5653ea7f2d4d14ba92c45e429c2191099450b0f
2022-07-09T06:50:39Z
java
2022-07-09T08:41:51Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java
Map<Strng, Property> allProperty = new HashMap<>(); Map<Strng, TaskInstance> allTaskInstance = new HashMap<>(); f (CollectonUtls.sNotEmpty(preTask)) { for (Strng preTaskCode : preTask) { Integer taskId = completeTaskMap.get(Long.parseLong(preTaskCode)); f (taskId == null) { contnue; } TaskInstance preTaskInstance = taskInstanceMap.get(taskId); f (preTaskInstance == null) { contnue; } Strng preVarPool = preTaskInstance.getVarPool(); f (StrngUtls.sNotEmpty(preVarPool)) { Lst<Property> propertes = JSONUtls.toLst(preVarPool, Property.class); for (Property nfo : propertes) { setVarPoolValue(allProperty, allTaskInstance, preTaskInstance, nfo); } } } f (allProperty.sze() > 0) { taskInstance.setVarPool(JSONUtls.toJsonStrng(allProperty.values())); } } else { f (StrngUtls.sNotEmpty(processInstance.getVarPool())) { taskInstance.setVarPool(processInstance.getVarPool()); } } } publc Collecton<TaskInstance> getAllTaskInstances() {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,861
[BUG-BE][Complete Date] Complement numbers will run in a loop under the serial strategy
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Complement numbers will run in a loop under the serial strategy ### What you expected to happen Complement numbers will run in a loop under the serial strategy ### How to reproduce After creating the workflow, select the complement mode and execute it. ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10861
https://github.com/apache/dolphinscheduler/pull/10862
057a9f6b241bae28ea5ec6d8e1e082b64f6410f3
b5653ea7f2d4d14ba92c45e429c2191099450b0f
2022-07-09T06:50:39Z
java
2022-07-09T08:41:51Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java
return taskInstanceMap.values(); } prvate vod setVarPoolValue(Map<Strng, Property> allProperty, Map<Strng, TaskInstance> allTaskInstance, TaskInstance preTaskInstance, Property thsProperty) { thsProperty.setDrect(Drect.IN); Strng proName = thsProperty.getProp(); f (allProperty.contansKey(proName)) { Property otherPro = allProperty.get(proName); f (StrngUtls.sEmpty(thsProperty.getValue())) { allProperty.put(proName, otherPro); } else f (StrngUtls.sNotEmpty(otherPro.getValue())) { TaskInstance otherTask = allTaskInstance.get(proName); f (otherTask.getEndTme().getTme() > preTaskInstance.getEndTme().getTme()) { allProperty.put(proName, thsProperty); allTaskInstance.put(proName, preTaskInstance); } else { allProperty.put(proName, otherPro); } } else { allProperty.put(proName, thsProperty); allTaskInstance.put(proName, preTaskInstance); } } else { allProperty.put(proName, thsProperty); allTaskInstance.put(proName, preTaskInstance);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,861
[BUG-BE][Complete Date] Complement numbers will run in a loop under the serial strategy
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Complement numbers will run in a loop under the serial strategy ### What you expected to happen Complement numbers will run in a loop under the serial strategy ### How to reproduce After creating the workflow, select the complement mode and execute it. ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10861
https://github.com/apache/dolphinscheduler/pull/10862
057a9f6b241bae28ea5ec6d8e1e082b64f6410f3
b5653ea7f2d4d14ba92c45e429c2191099450b0f
2022-07-09T06:50:39Z
java
2022-07-09T08:41:51Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java
} } /** * get complete task nstance map, taskCode as key */ prvate Map<Strng, TaskInstance> getCompleteTaskInstanceMap() { Map<Strng, TaskInstance> completeTaskInstanceMap = new HashMap<>(); for (Integer taskInstanceId : completeTaskMap.values()) { TaskInstance taskInstance = taskInstanceMap.get(taskInstanceId); completeTaskInstanceMap.put(Long.toStrng(taskInstance.getTaskCode()), taskInstance); } return completeTaskInstanceMap; } /** * get vald task lst */ prvate Lst<TaskInstance> getValdTaskLst() { Lst<TaskInstance> valdTaskInstanceLst = new ArrayLst<>(); for (Integer taskInstanceId : valdTaskMap.values()) { valdTaskInstanceLst.add(taskInstanceMap.get(taskInstanceId)); } return valdTaskInstanceLst; } prvate vod submtPostNode(Strng parentNodeCode) throws StateEventHandleExcepton { Set<Strng> submtTaskNodeLst = DagHelper.parsePostNodes(parentNodeCode, skpTaskNodeMap, dag, getCompleteTaskInstanceMap()); Lst<TaskInstance> taskInstances = new ArrayLst<>(); for (Strng taskNode : submtTaskNodeLst) { TaskNode taskNodeObject = dag.getNode(taskNode); Optonal<TaskInstance> exstTaskInstanceOptonal = getTaskInstance(taskNodeObject.getCode());
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,861
[BUG-BE][Complete Date] Complement numbers will run in a loop under the serial strategy
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Complement numbers will run in a loop under the serial strategy ### What you expected to happen Complement numbers will run in a loop under the serial strategy ### How to reproduce After creating the workflow, select the complement mode and execute it. ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10861
https://github.com/apache/dolphinscheduler/pull/10862
057a9f6b241bae28ea5ec6d8e1e082b64f6410f3
b5653ea7f2d4d14ba92c45e429c2191099450b0f
2022-07-09T06:50:39Z
java
2022-07-09T08:41:51Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java
f (exstTaskInstanceOptonal.sPresent()) { taskInstances.add(exstTaskInstanceOptonal.get()); contnue; } TaskInstance task = createTaskInstance(processInstance, taskNodeObject); taskInstances.add(task); } f (StrngUtls.sNotEmpty(parentNodeCode) && dag.getEndNode().contans(parentNodeCode)) { TaskInstance endTaskInstance = taskInstanceMap.get(completeTaskMap.get(NumberUtls.toLong(parentNodeCode))); Strng taskInstanceVarPool = endTaskInstance.getVarPool(); f (StrngUtls.sNotEmpty(taskInstanceVarPool)) { Set<Property> taskPropertes = new HashSet<>(JSONUtls.toLst(taskInstanceVarPool, Property.class)); Strng processInstanceVarPool = processInstance.getVarPool(); f (StrngUtls.sNotEmpty(processInstanceVarPool)) { Set<Property> propertes = new HashSet<>(JSONUtls.toLst(processInstanceVarPool, Property.class)); propertes.addAll(taskPropertes); processInstance.setVarPool(JSONUtls.toJsonStrng(propertes)); } else { processInstance.setVarPool(JSONUtls.toJsonStrng(taskPropertes)); } } } for (TaskInstance task : taskInstances) { f (readyToSubmtTaskQueue.contans(task)) { logger.warn("Task s already at submt queue, taskInstanceId: {}", task.getId()); contnue; } f (task.getId() > 0 && completeTaskMap.contansKey(task.getTaskCode())) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,861
[BUG-BE][Complete Date] Complement numbers will run in a loop under the serial strategy
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Complement numbers will run in a loop under the serial strategy ### What you expected to happen Complement numbers will run in a loop under the serial strategy ### How to reproduce After creating the workflow, select the complement mode and execute it. ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10861
https://github.com/apache/dolphinscheduler/pull/10862
057a9f6b241bae28ea5ec6d8e1e082b64f6410f3
b5653ea7f2d4d14ba92c45e429c2191099450b0f
2022-07-09T06:50:39Z
java
2022-07-09T08:41:51Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java
logger.nfo("task {} has already run success", task.getName()); contnue; } f (task.getState().typeIsPause() || task.getState().typeIsCancel()) { logger.nfo("task {} stopped, the state s {}", task.getName(), task.getState()); contnue; } addTaskToStandByLst(task); } submtStandByTask(); updateProcessInstanceState(); } /** * determne whether the dependences of the task node are complete * * @return DependResult */ prvate DependResult sTaskDepsComplete(Strng taskCode) { Collecton<Strng> startNodes = dag.getBegnNode(); f (startNodes.contans(taskCode)) { return DependResult.SUCCESS; } TaskNode taskNode = dag.getNode(taskCode); Lst<Strng> ndrectDepCodeLst = new ArrayLst<>(); setIndrectDepLst(taskCode, ndrectDepCodeLst); for (Strng depsNode : ndrectDepCodeLst) { f (dag.contansNode(depsNode) && !skpTaskNodeMap.contansKey(depsNode)) { Long despNodeTaskCode = Long.parseLong(depsNode);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,861
[BUG-BE][Complete Date] Complement numbers will run in a loop under the serial strategy
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Complement numbers will run in a loop under the serial strategy ### What you expected to happen Complement numbers will run in a loop under the serial strategy ### How to reproduce After creating the workflow, select the complement mode and execute it. ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10861
https://github.com/apache/dolphinscheduler/pull/10862
057a9f6b241bae28ea5ec6d8e1e082b64f6410f3
b5653ea7f2d4d14ba92c45e429c2191099450b0f
2022-07-09T06:50:39Z
java
2022-07-09T08:41:51Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java
f (!completeTaskMap.contansKey(despNodeTaskCode)) { return DependResult.WAITING; } Integer depsTaskId = completeTaskMap.get(despNodeTaskCode); ExecutonStatus depTaskState = taskInstanceMap.get(depsTaskId).getState(); f (depTaskState.typeIsPause() || depTaskState.typeIsCancel()) { return DependResult.NON_EXEC; } f (taskNode.sBlockngTask()) { contnue; } f (taskNode.sCondtonsTask()) { contnue; } f (!dependTaskSuccess(depsNode, taskCode)) { return DependResult.FAILED; } } } logger.nfo("taskCode: {} completeDependTaskLst: {}", taskCode, Arrays.toStrng(completeTaskMap.keySet().toArray())); return DependResult.SUCCESS; } /** * Ths functon s specally used to handle the dependency stuaton where the parent node s a prohbted node. * When the parent node s a forbdden node, the dependency relatonshp should contnue to be traced * * @param taskCode taskCode * @param ndrectDepCodeLst All ndrectly dependent nodes
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,861
[BUG-BE][Complete Date] Complement numbers will run in a loop under the serial strategy
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Complement numbers will run in a loop under the serial strategy ### What you expected to happen Complement numbers will run in a loop under the serial strategy ### How to reproduce After creating the workflow, select the complement mode and execute it. ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10861
https://github.com/apache/dolphinscheduler/pull/10862
057a9f6b241bae28ea5ec6d8e1e082b64f6410f3
b5653ea7f2d4d14ba92c45e429c2191099450b0f
2022-07-09T06:50:39Z
java
2022-07-09T08:41:51Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java
*/ prvate vod setIndrectDepLst(Strng taskCode, Lst<Strng> ndrectDepCodeLst) { TaskNode taskNode = dag.getNode(taskCode); Lst<Strng> depCodeLst = taskNode.getDepLst(); for (Strng depsNode : depCodeLst) { f (forbddenTaskMap.contansKey(Long.parseLong(depsNode))) { setIndrectDepLst(depsNode, ndrectDepCodeLst); } else { ndrectDepCodeLst.add(depsNode); } } } /** * depend node s completed, but here need check the condton task branch s the next node */ prvate boolean dependTaskSuccess(Strng dependNodeName, Strng nextNodeName) { f (dag.getNode(dependNodeName).sCondtonsTask()) { Lst<Strng> nextTaskLst = DagHelper.parseCondtonTask(dependNodeName, skpTaskNodeMap, dag, getCompleteTaskInstanceMap()); f (!nextTaskLst.contans(nextNodeName)) { return false; } } else { long taskCode = Long.parseLong(dependNodeName); Integer taskInstanceId = completeTaskMap.get(taskCode); ExecutonStatus depTaskState = taskInstanceMap.get(taskInstanceId).getState(); f (depTaskState.typeIsFalure()) { return false; } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,861
[BUG-BE][Complete Date] Complement numbers will run in a loop under the serial strategy
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Complement numbers will run in a loop under the serial strategy ### What you expected to happen Complement numbers will run in a loop under the serial strategy ### How to reproduce After creating the workflow, select the complement mode and execute it. ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10861
https://github.com/apache/dolphinscheduler/pull/10862
057a9f6b241bae28ea5ec6d8e1e082b64f6410f3
b5653ea7f2d4d14ba92c45e429c2191099450b0f
2022-07-09T06:50:39Z
java
2022-07-09T08:41:51Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java
return true; } /** * query task nstance by complete state * * @param state state * @return task nstance lst */ prvate Lst<TaskInstance> getCompleteTaskByState(ExecutonStatus state) { Lst<TaskInstance> resultLst = new ArrayLst<>(); for (Integer taskInstanceId : completeTaskMap.values()) { TaskInstance taskInstance = taskInstanceMap.get(taskInstanceId); f (taskInstance != null && taskInstance.getState() == state) { resultLst.add(taskInstance); } } return resultLst; } /** * where there are ongong tasks * * @param state state * @return ExecutonStatus */ prvate ExecutonStatus runnngState(ExecutonStatus state) { f (state == ExecutonStatus.READY_STOP || state == ExecutonStatus.READY_PAUSE || state == ExecutonStatus.WAITING_THREAD || state == ExecutonStatus.READY_BLOCK || state == ExecutonStatus.DELAY_EXECUTION) { return state; } else {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,861
[BUG-BE][Complete Date] Complement numbers will run in a loop under the serial strategy
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Complement numbers will run in a loop under the serial strategy ### What you expected to happen Complement numbers will run in a loop under the serial strategy ### How to reproduce After creating the workflow, select the complement mode and execute it. ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10861
https://github.com/apache/dolphinscheduler/pull/10862
057a9f6b241bae28ea5ec6d8e1e082b64f6410f3
b5653ea7f2d4d14ba92c45e429c2191099450b0f
2022-07-09T06:50:39Z
java
2022-07-09T08:41:51Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java
return ExecutonStatus.RUNNING_EXECUTION; } } /** * exsts falure task,contans submt falure、dependency falure,execute falure(retry after) * * @return Boolean whether has faled task */ prvate boolean hasFaledTask() { f (ths.taskFaledSubmt) { return true; } f (ths.errorTaskMap.sze() > 0) { return true; } return ths.dependFaledTaskMap.sze() > 0; } /** * process nstance falure * * @return Boolean whether process nstance faled */ prvate boolean processFaled() { f (hasFaledTask()) { f (processInstance.getFalureStrategy() == FalureStrategy.END) { return true; } f (processInstance.getFalureStrategy() == FalureStrategy.CONTINUE) { return readyToSubmtTaskQueue.sze() == 0 && actveTaskProcessorMaps.sze() == 0 && watToRetryTaskInstanceMap.sze() == 0; }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,861
[BUG-BE][Complete Date] Complement numbers will run in a loop under the serial strategy
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Complement numbers will run in a loop under the serial strategy ### What you expected to happen Complement numbers will run in a loop under the serial strategy ### How to reproduce After creating the workflow, select the complement mode and execute it. ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10861
https://github.com/apache/dolphinscheduler/pull/10862
057a9f6b241bae28ea5ec6d8e1e082b64f6410f3
b5653ea7f2d4d14ba92c45e429c2191099450b0f
2022-07-09T06:50:39Z
java
2022-07-09T08:41:51Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java
} return false; } /** * whether task for watng thread * * @return Boolean whether has watng thread task */ prvate boolean hasWatngThreadTask() { Lst<TaskInstance> watngLst = getCompleteTaskByState(ExecutonStatus.WAITING_THREAD); return CollectonUtls.sNotEmpty(watngLst); } /** * prepare for pause * 1,faled retry task n the preparaton queue , returns to falure drectly * 2,exsts pause task,complement not completed, pendng submsson of tasks, return to suspenson * 3,success * * @return ExecutonStatus */ prvate ExecutonStatus processReadyPause() { f (hasRetryTaskInStandBy()) { return ExecutonStatus.FAILURE; } Lst<TaskInstance> pauseLst = getCompleteTaskByState(ExecutonStatus.PAUSE); f (CollectonUtls.sNotEmpty(pauseLst) || processInstance.sBlocked() || !sComplementEnd() || readyToSubmtTaskQueue.sze() > 0) { return ExecutonStatus.PAUSE; } else { return ExecutonStatus.SUCCESS; }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,861
[BUG-BE][Complete Date] Complement numbers will run in a loop under the serial strategy
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Complement numbers will run in a loop under the serial strategy ### What you expected to happen Complement numbers will run in a loop under the serial strategy ### How to reproduce After creating the workflow, select the complement mode and execute it. ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10861
https://github.com/apache/dolphinscheduler/pull/10862
057a9f6b241bae28ea5ec6d8e1e082b64f6410f3
b5653ea7f2d4d14ba92c45e429c2191099450b0f
2022-07-09T06:50:39Z
java
2022-07-09T08:41:51Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java
} /** * prepare for block * f process has tasks stll runnng, pause them * f readyToSubmtTaskQueue s not empty, kll them * else return block status drectly * * @return ExecutonStatus */ prvate ExecutonStatus processReadyBlock() { f (actveTaskProcessorMaps.sze() > 0) { for (ITaskProcessor taskProcessor : actveTaskProcessorMaps.values()) { f (!TASK_TYPE_BLOCKING.equals(taskProcessor.getType())) { taskProcessor.acton(TaskActon.PAUSE); } } } f (readyToSubmtTaskQueue.sze() > 0) { for (Iterator<TaskInstance> ter = readyToSubmtTaskQueue.terator(); ter.hasNext(); ) { ter.next().setState(ExecutonStatus.KILL); } } return ExecutonStatus.BLOCK; } /** * generate the latest process nstance status by the tasks state * * @return process nstance executon status */ prvate ExecutonStatus getProcessInstanceState(ProcessInstance nstance) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,861
[BUG-BE][Complete Date] Complement numbers will run in a loop under the serial strategy
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Complement numbers will run in a loop under the serial strategy ### What you expected to happen Complement numbers will run in a loop under the serial strategy ### How to reproduce After creating the workflow, select the complement mode and execute it. ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10861
https://github.com/apache/dolphinscheduler/pull/10862
057a9f6b241bae28ea5ec6d8e1e082b64f6410f3
b5653ea7f2d4d14ba92c45e429c2191099450b0f
2022-07-09T06:50:39Z
java
2022-07-09T08:41:51Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java
ExecutonStatus state = nstance.getState(); f (actveTaskProcessorMaps.sze() > 0 || hasRetryTaskInStandBy()) { // actve return runnngState(state); } // block f (state == ExecutonStatus.READY_BLOCK) { return processReadyBlock(); } // watng thread f (hasWatngThreadTask()) { return ExecutonStatus.WAITING_THREAD; } // pause f (state == ExecutonStatus.READY_PAUSE) { return processReadyPause(); } // stop f (state == ExecutonStatus.READY_STOP) { Lst<TaskInstance> stopLst = getCompleteTaskByState(ExecutonStatus.STOP); Lst<TaskInstance> kllLst = getCompleteTaskByState(ExecutonStatus.KILL); Lst<TaskInstance> falLst = getCompleteTaskByState(ExecutonStatus.FAILURE); f (CollectonUtls.sNotEmpty(stopLst) || CollectonUtls.sNotEmpty(kllLst) || CollectonUtls.sNotEmpty(falLst) || !sComplementEnd()) { return ExecutonStatus.STOP; } else { return ExecutonStatus.SUCCESS; } } // process falure f (processFaled()) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,861
[BUG-BE][Complete Date] Complement numbers will run in a loop under the serial strategy
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Complement numbers will run in a loop under the serial strategy ### What you expected to happen Complement numbers will run in a loop under the serial strategy ### How to reproduce After creating the workflow, select the complement mode and execute it. ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10861
https://github.com/apache/dolphinscheduler/pull/10862
057a9f6b241bae28ea5ec6d8e1e082b64f6410f3
b5653ea7f2d4d14ba92c45e429c2191099450b0f
2022-07-09T06:50:39Z
java
2022-07-09T08:41:51Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java
return ExecutonStatus.FAILURE; } // success f (state == ExecutonStatus.RUNNING_EXECUTION) { Lst<TaskInstance> kllTasks = getCompleteTaskByState(ExecutonStatus.KILL); f (readyToSubmtTaskQueue.sze() > 0 || watToRetryTaskInstanceMap.sze() > 0) { //tasks cu return ExecutonStatus.RUNNING_EXECUTION; } else f (CollectonUtls.sNotEmpty(kllTasks)) { // tasks m return ExecutonStatus.FAILURE; } else { // f the return ExecutonStatus.SUCCESS; } } return state; } /** * whether complement end * * @return Boolean whether s complement end */ prvate boolean sComplementEnd() { f (!processInstance.sComplementData()) { return true; } Map<Strng, Strng> cmdParam = JSONUtls.toMap(processInstance.getCommandParam()); Date endTme = DateUtls.strngToDate(cmdParam.get(CMDPARAM_COMPLEMENT_DATA_END_DATE)); return processInstance.getScheduleTme().equals(endTme);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,861
[BUG-BE][Complete Date] Complement numbers will run in a loop under the serial strategy
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Complement numbers will run in a loop under the serial strategy ### What you expected to happen Complement numbers will run in a loop under the serial strategy ### How to reproduce After creating the workflow, select the complement mode and execute it. ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10861
https://github.com/apache/dolphinscheduler/pull/10862
057a9f6b241bae28ea5ec6d8e1e082b64f6410f3
b5653ea7f2d4d14ba92c45e429c2191099450b0f
2022-07-09T06:50:39Z
java
2022-07-09T08:41:51Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java
} /** * updateProcessInstance process nstance state * after each batch of tasks s executed, of the process nstance s updated */ prvate vod updateProcessInstanceState() throws StateEventHandleExcepton { ExecutonStatus state = getProcessInstanceState(processInstance); f (processInstance.getState() != state) { updateWorkflowInstanceStatesToDB(state); StateEvent stateEvent = new StateEvent(); stateEvent.setExecutonStatus(processInstance.getState()); stateEvent.setProcessInstanceId(ths.processInstance.getId()); stateEvent.setType(StateEventType.PROCESS_STATE_CHANGE); // ths.pr // replace ths.stateEvents.add(stateEvent); } } /** * stateEvent's executon status as process nstance state */ publc vod updateProcessInstanceState(StateEvent stateEvent) throws StateEventHandleExcepton { ExecutonStatus state = stateEvent.getExecutonStatus(); updateWorkflowInstanceStatesToDB(state); } prvate vod updateWorkflowInstanceStatesToDB(ExecutonStatus newStates) throws StateEventHandleExcepton { ExecutonStatus orgnStates = processInstance.getState(); f (orgnStates != newStates) { logger.nfo("work flow process nstance [d: {}, name:{}], state change from {} to {}, cmd type: {}", processInstance.getId(),
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,861
[BUG-BE][Complete Date] Complement numbers will run in a loop under the serial strategy
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Complement numbers will run in a loop under the serial strategy ### What you expected to happen Complement numbers will run in a loop under the serial strategy ### How to reproduce After creating the workflow, select the complement mode and execute it. ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10861
https://github.com/apache/dolphinscheduler/pull/10862
057a9f6b241bae28ea5ec6d8e1e082b64f6410f3
b5653ea7f2d4d14ba92c45e429c2191099450b0f
2022-07-09T06:50:39Z
java
2022-07-09T08:41:51Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java
processInstance.getName(), orgnStates, newStates, processInstance.getCommandType()); processInstance.setState(newStates); f (newStates.typeIsFnshed()) { processInstance.setEndTme(new Date()); } try { processServce.updateProcessInstance(processInstance); } catch (Excepton ex) { // recover processInstance.setState(orgnStates); processInstance.setEndTme(null); throw new StateEventHandleExcepton("Update process nstance status to DB error", ex); } } } /** * get task dependency result * * @param taskInstance task nstance * @return DependResult */ prvate DependResult getDependResultForTask(TaskInstance taskInstance) { return sTaskDepsComplete(Long.toStrng(taskInstance.getTaskCode())); } /** * add task to standby lst *
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,861
[BUG-BE][Complete Date] Complement numbers will run in a loop under the serial strategy
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Complement numbers will run in a loop under the serial strategy ### What you expected to happen Complement numbers will run in a loop under the serial strategy ### How to reproduce After creating the workflow, select the complement mode and execute it. ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10861
https://github.com/apache/dolphinscheduler/pull/10862
057a9f6b241bae28ea5ec6d8e1e082b64f6410f3
b5653ea7f2d4d14ba92c45e429c2191099450b0f
2022-07-09T06:50:39Z
java
2022-07-09T08:41:51Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java
* @param taskInstance task nstance */ publc vod addTaskToStandByLst(TaskInstance taskInstance) { f (readyToSubmtTaskQueue.contans(taskInstance)) { logger.warn("task was found n ready submt queue, task code:{}", taskInstance.getTaskCode()); return; } logger.nfo("add task to stand by lst, task name:{}, task d:{}, task code:{}", taskInstance.getName(), taskInstance.getId(), taskInstance.getTaskCode()); TaskMetrcs.ncTaskSubmt(); readyToSubmtTaskQueue.put(taskInstance); } /** * remove task from stand by lst * * @param taskInstance task nstance */ prvate vod removeTaskFromStandbyLst(TaskInstance taskInstance) { readyToSubmtTaskQueue.remove(taskInstance); } /** * has retry task n standby * * @return Boolean whether has retry task n standby */ prvate boolean hasRetryTaskInStandBy() { for (Iterator<TaskInstance> ter = readyToSubmtTaskQueue.terator(); ter.hasNext(); ) { f (ter.next().getState().typeIsFalure()) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,861
[BUG-BE][Complete Date] Complement numbers will run in a loop under the serial strategy
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Complement numbers will run in a loop under the serial strategy ### What you expected to happen Complement numbers will run in a loop under the serial strategy ### How to reproduce After creating the workflow, select the complement mode and execute it. ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10861
https://github.com/apache/dolphinscheduler/pull/10862
057a9f6b241bae28ea5ec6d8e1e082b64f6410f3
b5653ea7f2d4d14ba92c45e429c2191099450b0f
2022-07-09T06:50:39Z
java
2022-07-09T08:41:51Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java
return true; } } return false; } /** * close the on gong tasks */ publc vod kllAllTasks() { logger.nfo("kll called on process nstance d: {}, num: {}", processInstance.getId(), actveTaskProcessorMaps.sze()); f (readyToSubmtTaskQueue.sze() > 0) { readyToSubmtTaskQueue.clear(); } for (long taskCode : actveTaskProcessorMaps.keySet()) { ITaskProcessor taskProcessor = actveTaskProcessorMaps.get(taskCode); Integer taskInstanceId = valdTaskMap.get(taskCode); f (taskInstanceId == null || taskInstanceId.equals(0)) { contnue; } TaskInstance taskInstance = processServce.fndTaskInstanceById(taskInstanceId); f (taskInstance == null || taskInstance.getState().typeIsFnshed()) { contnue; } taskProcessor.acton(TaskActon.STOP); f (taskProcessor.taskInstance().getState().typeIsFnshed()) { StateEvent stateEvent = new StateEvent(); stateEvent.setType(StateEventType.TASK_STATE_CHANGE); stateEvent.setProcessInstanceId(ths.processInstance.getId());
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,861
[BUG-BE][Complete Date] Complement numbers will run in a loop under the serial strategy
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Complement numbers will run in a loop under the serial strategy ### What you expected to happen Complement numbers will run in a loop under the serial strategy ### How to reproduce After creating the workflow, select the complement mode and execute it. ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10861
https://github.com/apache/dolphinscheduler/pull/10862
057a9f6b241bae28ea5ec6d8e1e082b64f6410f3
b5653ea7f2d4d14ba92c45e429c2191099450b0f
2022-07-09T06:50:39Z
java
2022-07-09T08:41:51Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java
stateEvent.setTaskInstanceId(taskInstance.getId()); stateEvent.setExecutonStatus(taskProcessor.taskInstance().getState()); ths.addStateEvent(stateEvent); } } } publc boolean workFlowFnsh() { return ths.processInstance.getState().typeIsFnshed(); } /** * handlng the lst of tasks to be submtted */ publc vod submtStandByTask() throws StateEventHandleExcepton { nt length = readyToSubmtTaskQueue.sze(); for (nt = 0; < length; ++) { TaskInstance task = readyToSubmtTaskQueue.peek(); f (task == null) { contnue; } // stop ta f (task.taskCanRetry()) { TaskInstance retryTask = processServce.fndTaskInstanceById(task.getId()); f (retryTask != null && retryTask.getState().equals(ExecutonStatus.FORCED_SUCCESS)) { task.setState(retryTask.getState()); logger.nfo("task: {} has been forced success, put t nto complete task lst and stop retryng", task.getName()); removeTaskFromStandbyLst(task); completeTaskMap.put(task.getTaskCode(), task.getId()); taskInstanceMap.put(task.getId(), task); submtPostNode(Long.toStrng(task.getTaskCode())); contnue;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,861
[BUG-BE][Complete Date] Complement numbers will run in a loop under the serial strategy
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Complement numbers will run in a loop under the serial strategy ### What you expected to happen Complement numbers will run in a loop under the serial strategy ### How to reproduce After creating the workflow, select the complement mode and execute it. ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10861
https://github.com/apache/dolphinscheduler/pull/10862
057a9f6b241bae28ea5ec6d8e1e082b64f6410f3
b5653ea7f2d4d14ba92c45e429c2191099450b0f
2022-07-09T06:50:39Z
java
2022-07-09T08:41:51Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java
} } //nt var f (task.sFrstRun()) { //get pre Set<Strng> preTask = dag.getPrevousNodes(Long.toStrng(task.getTaskCode())); getPreVarPool(task, preTask); } DependResult dependResult = getDependResultForTask(task); f (DependResult.SUCCESS == dependResult) { Optonal<TaskInstance> taskInstanceOptonal = submtTaskExec(task); f (!taskInstanceOptonal.sPresent()) { ths.taskFaledSubmt = true; // Remove removeTaskFromStandbyLst(task); completeTaskMap.put(task.getTaskCode(), task.getId()); errorTaskMap.put(task.getTaskCode(), task.getId()); logger.error("Task submtted faled, processInstanceId: {}, taskInstanceId: {}", task.getProcessInstanceId(), task.getId()); } else { removeTaskFromStandbyLst(task); } } else f (DependResult.FAILED == dependResult) { // f the dependFaledTaskMap.put(task.getTaskCode(), task.getId()); removeTaskFromStandbyLst(task); logger.nfo("Task dependent result s faled, taskInstanceId:{} depend result : {}", task.getId(), dependResult); } else f (DependResult.NON_EXEC == dependResult) { // for som removeTaskFromStandbyLst(task); logger.nfo("Remove task due to depend result not executed, taskInstanceId:{} depend result : {}", task.getId(), dependResult);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,861
[BUG-BE][Complete Date] Complement numbers will run in a loop under the serial strategy
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Complement numbers will run in a loop under the serial strategy ### What you expected to happen Complement numbers will run in a loop under the serial strategy ### How to reproduce After creating the workflow, select the complement mode and execute it. ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10861
https://github.com/apache/dolphinscheduler/pull/10862
057a9f6b241bae28ea5ec6d8e1e082b64f6410f3
b5653ea7f2d4d14ba92c45e429c2191099450b0f
2022-07-09T06:50:39Z
java
2022-07-09T08:41:51Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java
} } } /** * Get start task nstance lst from recover * * @param cmdParam command param * @return task nstance lst */ protected Lst<TaskInstance> getRecoverTaskInstanceLst(Strng cmdParam) { Map<Strng, Strng> paramMap = JSONUtls.toMap(cmdParam); // todo: Can we use a better way to set the recover taskInstanceId lst? rather then use the cmdParam f (paramMap != null && paramMap.contansKey(CMD_PARAM_RECOVERY_START_NODE_STRING)) { Strng[] dLst = paramMap.get(CMD_PARAM_RECOVERY_START_NODE_STRING).splt(Constants.COMMA); f (ArrayUtls.sNotEmpty(dLst)) { Lst<Integer> taskInstanceIds = Arrays.stream(dLst).map(Integer::valueOf).collect(Collectors.toLst()); return processServce.fndTaskInstanceByIdLst(taskInstanceIds); } } return Collectons.emptyLst(); } /** * parse "StartNodeNameLst" from cmd param * * @param cmdParam command param * @return start node name lst */ prvate Lst<Strng> parseStartNodeName(Strng cmdParam) { Lst<Strng> startNodeNameLst = new ArrayLst<>(); Map<Strng, Strng> paramMap = JSONUtls.toMap(cmdParam);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,861
[BUG-BE][Complete Date] Complement numbers will run in a loop under the serial strategy
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Complement numbers will run in a loop under the serial strategy ### What you expected to happen Complement numbers will run in a loop under the serial strategy ### How to reproduce After creating the workflow, select the complement mode and execute it. ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10861
https://github.com/apache/dolphinscheduler/pull/10862
057a9f6b241bae28ea5ec6d8e1e082b64f6410f3
b5653ea7f2d4d14ba92c45e429c2191099450b0f
2022-07-09T06:50:39Z
java
2022-07-09T08:41:51Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java
f (paramMap == null) { return startNodeNameLst; } f (paramMap.contansKey(CMD_PARAM_START_NODES)) { startNodeNameLst = Arrays.asLst(paramMap.get(CMD_PARAM_START_NODES).splt(Constants.COMMA)); } return startNodeNameLst; } /** * generate start node code lst from parsng command param; * f "StartNodeIdLst" exsts n command param, return StartNodeIdLst * * @return recovery node code lst */ prvate Lst<Strng> getRecoveryNodeCodeLst(Lst<TaskInstance> recoverNodeLst) { Lst<Strng> recoveryNodeCodeLst = new ArrayLst<>(); f (CollectonUtls.sNotEmpty(recoverNodeLst)) { for (TaskInstance task : recoverNodeLst) { recoveryNodeCodeLst.add(Long.toStrng(task.getTaskCode())); } } return recoveryNodeCodeLst; } /** * generate flow dag * * @param totalTaskNodeLst total task node lst * @param startNodeNameLst start node name lst * @param recoveryNodeCodeLst recovery node code lst * @param depNodeType depend node type
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,861
[BUG-BE][Complete Date] Complement numbers will run in a loop under the serial strategy
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Complement numbers will run in a loop under the serial strategy ### What you expected to happen Complement numbers will run in a loop under the serial strategy ### How to reproduce After creating the workflow, select the complement mode and execute it. ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10861
https://github.com/apache/dolphinscheduler/pull/10862
057a9f6b241bae28ea5ec6d8e1e082b64f6410f3
b5653ea7f2d4d14ba92c45e429c2191099450b0f
2022-07-09T06:50:39Z
java
2022-07-09T08:41:51Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java
* @return ProcessDag process dag * @throws Excepton excepton */ publc ProcessDag generateFlowDag(Lst<TaskNode> totalTaskNodeLst, Lst<Strng> startNodeNameLst, Lst<Strng> recoveryNodeCodeLst, TaskDependType depNodeType) throws Excepton { return DagHelper.generateFlowDag(totalTaskNodeLst, startNodeNameLst, recoveryNodeCodeLst, depNodeType); } /** * check task queue */ prvate boolean checkTaskQueue() { AtomcBoolean result = new AtomcBoolean(false); taskInstanceMap.forEach((d, taskInstance) -> { f (taskInstance != null && taskInstance.getTaskGroupId() > 0) { result.set(true); } }); return result.get(); } /** * s new process nstance */ prvate boolean sNewProcessInstance() { f (Flag.YES.equals(processInstance.getRecovery())) { logger.nfo("Ths workInstance wll be recover by ths executon"); return false; } f (ExecutonStatus.RUNNING_EXECUTION == processInstance.getState() && processInstance.getRunTmes() == 1) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,861
[BUG-BE][Complete Date] Complement numbers will run in a loop under the serial strategy
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Complement numbers will run in a loop under the serial strategy ### What you expected to happen Complement numbers will run in a loop under the serial strategy ### How to reproduce After creating the workflow, select the complement mode and execute it. ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10861
https://github.com/apache/dolphinscheduler/pull/10862
057a9f6b241bae28ea5ec6d8e1e082b64f6410f3
b5653ea7f2d4d14ba92c45e429c2191099450b0f
2022-07-09T06:50:39Z
java
2022-07-09T08:41:51Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java
return true; } logger.nfo( "The workflowInstance has been executed before, ths executon s to reRun, processInstance status: {}, runTmes: {}", processInstance.getState(), processInstance.getRunTmes()); return false; } publc vod resubmt(long taskCode) throws Excepton { ITaskProcessor taskProcessor = actveTaskProcessorMaps.get(taskCode); f (taskProcessor != null) { taskProcessor.acton(TaskActon.RESUBMIT); logger.debug("RESUBMIT: task code:{}", taskCode); } else { throw new Excepton("resubmt error, taskProcessor s null, task code: " + taskCode); } } publc Map<Long, Integer> getCompleteTaskMap() { return completeTaskMap; } publc Map<Long, ITaskProcessor> getActveTaskProcessMap() { return actveTaskProcessorMaps; } publc Map<Long, TaskInstance> getWatToRetryTaskInstanceMap() { return watToRetryTaskInstanceMap; } prvate vod setGlobalParamIfCommanded(ProcessDefnton processDefnton, Map<Strng, Strng> cmdParam) { // get start params from command param Map<Strng, Strng> startParamMap = new HashMap<>(); f (cmdParam.contansKey(Constants.CMD_PARAM_START_PARAMS)) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,861
[BUG-BE][Complete Date] Complement numbers will run in a loop under the serial strategy
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Complement numbers will run in a loop under the serial strategy ### What you expected to happen Complement numbers will run in a loop under the serial strategy ### How to reproduce After creating the workflow, select the complement mode and execute it. ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10861
https://github.com/apache/dolphinscheduler/pull/10862
057a9f6b241bae28ea5ec6d8e1e082b64f6410f3
b5653ea7f2d4d14ba92c45e429c2191099450b0f
2022-07-09T06:50:39Z
java
2022-07-09T08:41:51Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java
Strng startParamJson = cmdParam.get(Constants.CMD_PARAM_START_PARAMS); startParamMap = JSONUtls.toMap(startParamJson); } Map<Strng, Strng> fatherParamMap = new HashMap<>(); f (cmdParam.contansKey(Constants.CMD_PARAM_FATHER_PARAMS)) { Strng fatherParamJson = cmdParam.get(Constants.CMD_PARAM_FATHER_PARAMS); fatherParamMap = JSONUtls.toMap(fatherParamJson); } startParamMap.putAll(fatherParamMap); // set start param nto global params Map<Strng, Strng> globalMap = processDefnton.getGlobalParamMap(); Lst<Property> globalParamLst = processDefnton.getGlobalParamLst(); f (startParamMap.sze() > 0 && globalMap != null) { //start pa for (Map.Entry<Strng, Strng> param : globalMap.entrySet()) { Strng val = startParamMap.get(param.getKey()); f (val != null) { param.setValue(val); } } //start pa for (Map.Entry<Strng, Strng> startParam : startParamMap.entrySet()) { f (!globalMap.contansKey(startParam.getKey())) { globalMap.put(startParam.getKey(), startParam.getValue()); globalParamLst.add(new Property(startParam.getKey(), IN, VARCHAR, startParam.getValue())); } } } } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,861
[BUG-BE][Complete Date] Complement numbers will run in a loop under the serial strategy
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Complement numbers will run in a loop under the serial strategy ### What you expected to happen Complement numbers will run in a loop under the serial strategy ### How to reproduce After creating the workflow, select the complement mode and execute it. ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10861
https://github.com/apache/dolphinscheduler/pull/10862
057a9f6b241bae28ea5ec6d8e1e082b64f6410f3
b5653ea7f2d4d14ba92c45e429c2191099450b0f
2022-07-09T06:50:39Z
java
2022-07-09T08:41:51Z
dolphinscheduler-master/src/test/java/org/apache/dolphinscheduler/server/master/BlockingTaskTest.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.dolphinscheduler.server.master; import static org.apache.dolphinscheduler.plugin.task.api.TaskConstants.TASK_TYPE_BLOCKING; import org.apache.dolphinscheduler.plugin.task.api.enums.TaskTimeoutStrategy; import org.apache.dolphinscheduler.common.enums.TimeoutFlag;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,861
[BUG-BE][Complete Date] Complement numbers will run in a loop under the serial strategy
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Complement numbers will run in a loop under the serial strategy ### What you expected to happen Complement numbers will run in a loop under the serial strategy ### How to reproduce After creating the workflow, select the complement mode and execute it. ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10861
https://github.com/apache/dolphinscheduler/pull/10862
057a9f6b241bae28ea5ec6d8e1e082b64f6410f3
b5653ea7f2d4d14ba92c45e429c2191099450b0f
2022-07-09T06:50:39Z
java
2022-07-09T08:41:51Z
dolphinscheduler-master/src/test/java/org/apache/dolphinscheduler/server/master/BlockingTaskTest.java
import org.apache.dolphinscheduler.common.model.TaskNode; import org.apache.dolphinscheduler.common.utils.JSONUtils; import org.apache.dolphinscheduler.dao.entity.ProcessInstance; import org.apache.dolphinscheduler.dao.entity.TaskDefinition; import org.apache.dolphinscheduler.dao.entity.TaskInstance; import org.apache.dolphinscheduler.plugin.task.api.enums.DependentRelation; import org.apache.dolphinscheduler.plugin.task.api.enums.ExecutionStatus; import org.apache.dolphinscheduler.plugin.task.api.model.DependentItem; import org.apache.dolphinscheduler.plugin.task.api.model.DependentTaskModel; import org.apache.dolphinscheduler.plugin.task.api.parameters.BlockingParameters; import org.apache.dolphinscheduler.plugin.task.api.parameters.DependentParameters; import org.apache.dolphinscheduler.server.master.config.MasterConfig; import org.apache.dolphinscheduler.server.master.runner.task.BlockingTaskProcessor; import org.apache.dolphinscheduler.server.master.runner.task.TaskAction; import org.apache.dolphinscheduler.service.bean.SpringApplicationContext; import org.apache.dolphinscheduler.service.process.ProcessService; import java.time.Duration; import java.util.ArrayList; import java.util.Date; import java.util.List; import java.util.stream.Collectors; import java.util.stream.Stream; import org.junit.Assert; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mockito; import org.mockito.junit.MockitoJUnitRunner; import org.springframework.context.ApplicationContext; @RunWith(MockitoJUnitRunner.Silent.class)
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,861
[BUG-BE][Complete Date] Complement numbers will run in a loop under the serial strategy
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Complement numbers will run in a loop under the serial strategy ### What you expected to happen Complement numbers will run in a loop under the serial strategy ### How to reproduce After creating the workflow, select the complement mode and execute it. ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10861
https://github.com/apache/dolphinscheduler/pull/10862
057a9f6b241bae28ea5ec6d8e1e082b64f6410f3
b5653ea7f2d4d14ba92c45e429c2191099450b0f
2022-07-09T06:50:39Z
java
2022-07-09T08:41:51Z
dolphinscheduler-master/src/test/java/org/apache/dolphinscheduler/server/master/BlockingTaskTest.java
public class BlockingTaskTest { /** * TaskNode.runFlag : task can be run normally */ public static final String FLOW_NODE_RUN_FLAG_NORMAL = "NORMAL"; private ProcessService processService; private ProcessInstance processInstance; private MasterConfig config; @Before public void before() { ApplicationContext applicationContext = Mockito.mock(ApplicationContext.class); SpringApplicationContext springApplicationContext = new SpringApplicationContext(); springApplicationContext.setApplicationContext(applicationContext); config = new MasterConfig(); Mockito.when(applicationContext.getBean(MasterConfig.class)).thenReturn(config); config.setTaskCommitRetryTimes(3); config.setTaskCommitInterval(Duration.ofSeconds(1)); processService = Mockito.mock(ProcessService.class); Mockito.when(applicationContext.getBean(ProcessService.class)).thenReturn(processService); processInstance = getProcessInstance(); Mockito.when(processService .findProcessInstanceById(processInstance.getId())) .thenReturn(processInstance); TaskDefinition taskDefinition = new TaskDefinition(); taskDefinition.setTimeoutFlag(TimeoutFlag.OPEN); taskDefinition.setTimeoutNotifyStrategy(TaskTimeoutStrategy.WARN);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,861
[BUG-BE][Complete Date] Complement numbers will run in a loop under the serial strategy
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Complement numbers will run in a loop under the serial strategy ### What you expected to happen Complement numbers will run in a loop under the serial strategy ### How to reproduce After creating the workflow, select the complement mode and execute it. ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10861
https://github.com/apache/dolphinscheduler/pull/10862
057a9f6b241bae28ea5ec6d8e1e082b64f6410f3
b5653ea7f2d4d14ba92c45e429c2191099450b0f
2022-07-09T06:50:39Z
java
2022-07-09T08:41:51Z
dolphinscheduler-master/src/test/java/org/apache/dolphinscheduler/server/master/BlockingTaskTest.java
taskDefinition.setTimeout(0); Mockito.when(processService.findTaskDefinition(1L, 1)) .thenReturn(taskDefinition); } private ProcessInstance getProcessInstance() { ProcessInstance processInstance = new ProcessInstance(); processInstance.setId(1000); processInstance.setState(ExecutionStatus.RUNNING_EXECUTION); processInstance.setProcessDefinitionCode(1L); return processInstance; } private TaskInstance getTaskInstance(TaskNode taskNode, ProcessInstance processInstance) { TaskInstance taskInstance = new TaskInstance(); taskInstance.setId(100); taskInstance.setName(taskNode.getName()); taskInstance.setTaskType(taskNode.getType().toUpperCase()); taskInstance.setTaskCode(taskNode.getCode()); taskInstance.setTaskDefinitionVersion(taskNode.getVersion()); taskInstance.setProcessInstanceId(processInstance.getId()); taskInstance.setTaskParams(taskNode.getTaskParams()); taskInstance.setState(ExecutionStatus.RUNNING_EXECUTION); taskInstance.setFirstSubmitTime(new Date()); Mockito.when(processService .submitTaskWithRetry(Mockito.any(ProcessInstance.class) , Mockito.any(TaskInstance.class) , Mockito.any(Integer.class), Mockito.any(Long.class))) .thenReturn(taskInstance); return taskInstance;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,861
[BUG-BE][Complete Date] Complement numbers will run in a loop under the serial strategy
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Complement numbers will run in a loop under the serial strategy ### What you expected to happen Complement numbers will run in a loop under the serial strategy ### How to reproduce After creating the workflow, select the complement mode and execute it. ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10861
https://github.com/apache/dolphinscheduler/pull/10862
057a9f6b241bae28ea5ec6d8e1e082b64f6410f3
b5653ea7f2d4d14ba92c45e429c2191099450b0f
2022-07-09T06:50:39Z
java
2022-07-09T08:41:51Z
dolphinscheduler-master/src/test/java/org/apache/dolphinscheduler/server/master/BlockingTaskTest.java
} private TaskNode getTaskNode(String blockingCondition) { TaskNode taskNode = new TaskNode(); taskNode.setId("tasks-1000"); taskNode.setName("4"); taskNode.setCode(1L); taskNode.setVersion(1); taskNode.setType(TASK_TYPE_BLOCKING); taskNode.setRunFlag(FLOW_NODE_RUN_FLAG_NORMAL); DependentItem dependentItemA = new DependentItem(); dependentItemA.setDepTaskCode(1L); dependentItemA.setStatus(ExecutionStatus.SUCCESS); DependentItem dependentItemB = new DependentItem(); dependentItemB.setDepTaskCode(2L); dependentItemB.setStatus(ExecutionStatus.SUCCESS); DependentItem dependentItemC = new DependentItem(); dependentItemC.setDepTaskCode(3L); dependentItemC.setStatus(ExecutionStatus.SUCCESS); DependentTaskModel dependentTaskModel = new DependentTaskModel(); dependentTaskModel.setDependItemList(Stream.of(dependentItemA, dependentItemB, dependentItemC) .collect(Collectors.toList())); dependentTaskModel.setRelation(DependentRelation.AND); DependentParameters dependentParameters = new DependentParameters(); dependentParameters.setDependTaskList(Stream.of(dependentTaskModel).collect(Collectors.toList()));
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,861
[BUG-BE][Complete Date] Complement numbers will run in a loop under the serial strategy
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Complement numbers will run in a loop under the serial strategy ### What you expected to happen Complement numbers will run in a loop under the serial strategy ### How to reproduce After creating the workflow, select the complement mode and execute it. ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10861
https://github.com/apache/dolphinscheduler/pull/10862
057a9f6b241bae28ea5ec6d8e1e082b64f6410f3
b5653ea7f2d4d14ba92c45e429c2191099450b0f
2022-07-09T06:50:39Z
java
2022-07-09T08:41:51Z
dolphinscheduler-master/src/test/java/org/apache/dolphinscheduler/server/master/BlockingTaskTest.java
dependentParameters.setRelation(DependentRelation.AND); taskNode.setDependence(JSONUtils.toJsonString(dependentParameters)); BlockingParameters blockingParameters = new BlockingParameters(); blockingParameters.setAlertWhenBlocking(false); blockingParameters.setBlockingCondition(blockingCondition); taskNode.setParams(JSONUtils.toJsonString(blockingParameters)); return taskNode; } private TaskInstance testBasicInit(String blockingCondition, ExecutionStatus... expectResults) { TaskInstance taskInstance = getTaskInstance(getTaskNode(blockingCondition), processInstance); Mockito.when(processService .submitTask(processInstance, taskInstance)) .thenReturn(taskInstance); Mockito.when(processService .findTaskInstanceById(taskInstance.getId())) .thenReturn(taskInstance); Mockito.when(processService .saveTaskInstance(taskInstance)) .thenReturn(true); Mockito.when(processService .updateTaskInstance(taskInstance)) .thenReturn(true); List<TaskInstance> conditions = getTaskInstanceForValidTaskList(expectResults); Mockito.when(processService. findValidTaskListByProcessId(processInstance.getId())) .thenReturn(conditions);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,861
[BUG-BE][Complete Date] Complement numbers will run in a loop under the serial strategy
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Complement numbers will run in a loop under the serial strategy ### What you expected to happen Complement numbers will run in a loop under the serial strategy ### How to reproduce After creating the workflow, select the complement mode and execute it. ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10861
https://github.com/apache/dolphinscheduler/pull/10862
057a9f6b241bae28ea5ec6d8e1e082b64f6410f3
b5653ea7f2d4d14ba92c45e429c2191099450b0f
2022-07-09T06:50:39Z
java
2022-07-09T08:41:51Z
dolphinscheduler-master/src/test/java/org/apache/dolphinscheduler/server/master/BlockingTaskTest.java
return taskInstance; } /** * mock task instance and its execution result in front of blocking node */ private List<TaskInstance> getTaskInstanceForValidTaskList(ExecutionStatus... status) { List<TaskInstance> taskInstanceList = new ArrayList<>(); for (int i = 1; i <= status.length; i++) { TaskInstance taskInstance = new TaskInstance(); taskInstance.setId(i); taskInstance.setName(String.valueOf(i)); taskInstance.setState(status[i - 1]); taskInstanceList.add(taskInstance); } return taskInstanceList; } @Test public void testBlockingTaskSubmit() { TaskInstance taskInstance = testBasicInit("BlockingOnFailed", ExecutionStatus.SUCCESS, ExecutionStatus.FAILURE, ExecutionStatus.SUCCESS); BlockingTaskProcessor blockingTaskProcessor = new BlockingTaskProcessor(); blockingTaskProcessor.init(taskInstance, processInstance); boolean res = blockingTaskProcessor.action(TaskAction.SUBMIT); Assert.assertEquals(true, res); } @Test public void testPauseTask() { TaskInstance taskInstance = testBasicInit("BlockingOnFailed", ExecutionStatus.SUCCESS, ExecutionStatus.FAILURE, ExecutionStatus.SUCCESS); BlockingTaskProcessor blockingTaskProcessor = new BlockingTaskProcessor();
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,861
[BUG-BE][Complete Date] Complement numbers will run in a loop under the serial strategy
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Complement numbers will run in a loop under the serial strategy ### What you expected to happen Complement numbers will run in a loop under the serial strategy ### How to reproduce After creating the workflow, select the complement mode and execute it. ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10861
https://github.com/apache/dolphinscheduler/pull/10862
057a9f6b241bae28ea5ec6d8e1e082b64f6410f3
b5653ea7f2d4d14ba92c45e429c2191099450b0f
2022-07-09T06:50:39Z
java
2022-07-09T08:41:51Z
dolphinscheduler-master/src/test/java/org/apache/dolphinscheduler/server/master/BlockingTaskTest.java
blockingTaskProcessor.init(taskInstance, processInstance); blockingTaskProcessor.action(TaskAction.SUBMIT); blockingTaskProcessor.action(TaskAction.PAUSE); ExecutionStatus status = taskInstance.getState(); Assert.assertEquals(ExecutionStatus.PAUSE, status); } @Test public void testBlocking() { TaskInstance taskInstance = testBasicInit("BlockingOnFailed", ExecutionStatus.SUCCESS, ExecutionStatus.FAILURE, ExecutionStatus.SUCCESS); BlockingTaskProcessor blockingTaskProcessor = new BlockingTaskProcessor(); blockingTaskProcessor.init(taskInstance, processInstance); blockingTaskProcessor.action(TaskAction.SUBMIT); blockingTaskProcessor.action(TaskAction.RUN); ExecutionStatus status = processInstance.getState(); Assert.assertEquals(ExecutionStatus.READY_BLOCK, status); } @Test public void testNoneBlocking() { TaskInstance taskInstance = testBasicInit("BlockingOnSuccess", ExecutionStatus.SUCCESS, ExecutionStatus.SUCCESS, ExecutionStatus.SUCCESS); BlockingTaskProcessor blockingTaskProcessor = new BlockingTaskProcessor(); blockingTaskProcessor.init(taskInstance, processInstance); blockingTaskProcessor.action(TaskAction.SUBMIT); blockingTaskProcessor.action(TaskAction.RUN); ExecutionStatus status = processInstance.getState(); Assert.assertEquals(ExecutionStatus.RUNNING_EXECUTION, status); } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,849
[Bug][Api] Complete Data workflow remove duplicates.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When complete data, the income date format is `2022-06-01 00:02:10, 2022-06-01 00:02:10, 2022-06-02 00:02:10`, and there are duplicate scheduling dates. ### What you expected to happen 1.When complementing, scheduling does not allow duplicates. ### How to reproduce 1.run workflow domplete data. 2.enter data format is `2022-06-01 00:02:10, 2022-06-01 00:02:10, 2022-06-02 00:02:10` ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10849
https://github.com/apache/dolphinscheduler/pull/10850
b5653ea7f2d4d14ba92c45e429c2191099450b0f
73f4846c49a95e5e84e3a6b1102c115e4a031c0a
2022-07-08T09:42:24Z
java
2022-07-09T13:29:11Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,849
[Bug][Api] Complete Data workflow remove duplicates.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When complete data, the income date format is `2022-06-01 00:02:10, 2022-06-01 00:02:10, 2022-06-02 00:02:10`, and there are duplicate scheduling dates. ### What you expected to happen 1.When complementing, scheduling does not allow duplicates. ### How to reproduce 1.run workflow domplete data. 2.enter data format is `2022-06-01 00:02:10, 2022-06-01 00:02:10, 2022-06-02 00:02:10` ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10849
https://github.com/apache/dolphinscheduler/pull/10850
b5653ea7f2d4d14ba92c45e429c2191099450b0f
73f4846c49a95e5e84e3a6b1102c115e4a031c0a
2022-07-08T09:42:24Z
java
2022-07-09T13:29:11Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
* * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.dolphinscheduler.api.service.impl; import static org.apache.dolphinscheduler.api.constants.ApiFuncIdentificationConstant.WORKFLOW_START; import static org.apache.dolphinscheduler.common.Constants.CMDPARAM_COMPLEMENT_DATA_END_DATE; import static org.apache.dolphinscheduler.common.Constants.CMDPARAM_COMPLEMENT_DATA_SCHEDULE_DATE_LIST; import static org.apache.dolphinscheduler.common.Constants.CMDPARAM_COMPLEMENT_DATA_START_DATE; import static org.apache.dolphinscheduler.common.Constants.CMD_PARAM_RECOVER_PROCESS_ID_STRING; import static org.apache.dolphinscheduler.common.Constants.CMD_PARAM_START_NODES; import static org.apache.dolphinscheduler.common.Constants.CMD_PARAM_START_PARAMS; import static org.apache.dolphinscheduler.common.Constants.COMMA; import static org.apache.dolphinscheduler.common.Constants.MAX_TASK_TIMEOUT; import static org.apache.dolphinscheduler.common.Constants.SCHEDULE_TIME_MAX_LENGTH; import org.apache.dolphinscheduler.api.constants.ApiFuncIdentificationConstant; import org.apache.dolphinscheduler.api.enums.ExecuteType; import org.apache.dolphinscheduler.api.enums.Status; import org.apache.dolphinscheduler.api.service.ExecutorService; import org.apache.dolphinscheduler.api.service.MonitorService; import org.apache.dolphinscheduler.api.service.ProjectService; import org.apache.dolphinscheduler.common.Constants; import org.apache.dolphinscheduler.common.enums.CommandType; import org.apache.dolphinscheduler.common.enums.ComplementDependentMode; import org.apache.dolphinscheduler.common.enums.CycleEnum; import org.apache.dolphinscheduler.common.enums.FailureStrategy; import org.apache.dolphinscheduler.common.enums.Flag;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,849
[Bug][Api] Complete Data workflow remove duplicates.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When complete data, the income date format is `2022-06-01 00:02:10, 2022-06-01 00:02:10, 2022-06-02 00:02:10`, and there are duplicate scheduling dates. ### What you expected to happen 1.When complementing, scheduling does not allow duplicates. ### How to reproduce 1.run workflow domplete data. 2.enter data format is `2022-06-01 00:02:10, 2022-06-01 00:02:10, 2022-06-02 00:02:10` ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10849
https://github.com/apache/dolphinscheduler/pull/10850
b5653ea7f2d4d14ba92c45e429c2191099450b0f
73f4846c49a95e5e84e3a6b1102c115e4a031c0a
2022-07-08T09:42:24Z
java
2022-07-09T13:29:11Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
import org.apache.dolphinscheduler.common.enums.Priority; import org.apache.dolphinscheduler.common.enums.ReleaseState; import org.apache.dolphinscheduler.common.enums.RunMode; import org.apache.dolphinscheduler.common.enums.TaskDependType; import org.apache.dolphinscheduler.common.enums.TaskGroupQueueStatus; import org.apache.dolphinscheduler.common.enums.WarningType; import org.apache.dolphinscheduler.common.model.Server; import org.apache.dolphinscheduler.common.utils.DateUtils; import org.apache.dolphinscheduler.common.utils.JSONUtils; import org.apache.dolphinscheduler.dao.entity.Command; import org.apache.dolphinscheduler.dao.entity.DependentProcessDefinition; import org.apache.dolphinscheduler.dao.entity.ProcessDefinition; import org.apache.dolphinscheduler.dao.entity.ProcessInstance; import org.apache.dolphinscheduler.dao.entity.ProcessTaskRelation; import org.apache.dolphinscheduler.dao.entity.Project; import org.apache.dolphinscheduler.dao.entity.Schedule; import org.apache.dolphinscheduler.dao.entity.TaskDefinition; import org.apache.dolphinscheduler.dao.entity.TaskGroupQueue; import org.apache.dolphinscheduler.dao.entity.Tenant; import org.apache.dolphinscheduler.dao.entity.User; import org.apache.dolphinscheduler.dao.mapper.ProcessDefinitionMapper; import org.apache.dolphinscheduler.dao.mapper.ProcessInstanceMapper; import org.apache.dolphinscheduler.dao.mapper.ProcessTaskRelationMapper; import org.apache.dolphinscheduler.dao.mapper.ProjectMapper; import org.apache.dolphinscheduler.dao.mapper.TaskDefinitionMapper; import org.apache.dolphinscheduler.dao.mapper.TaskGroupQueueMapper; import org.apache.dolphinscheduler.plugin.task.api.TaskConstants; import org.apache.dolphinscheduler.plugin.task.api.enums.ExecutionStatus; import org.apache.dolphinscheduler.remote.command.StateEventChangeCommand; import org.apache.dolphinscheduler.remote.processor.StateEventCallbackService;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,849
[Bug][Api] Complete Data workflow remove duplicates.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When complete data, the income date format is `2022-06-01 00:02:10, 2022-06-01 00:02:10, 2022-06-02 00:02:10`, and there are duplicate scheduling dates. ### What you expected to happen 1.When complementing, scheduling does not allow duplicates. ### How to reproduce 1.run workflow domplete data. 2.enter data format is `2022-06-01 00:02:10, 2022-06-01 00:02:10, 2022-06-02 00:02:10` ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10849
https://github.com/apache/dolphinscheduler/pull/10850
b5653ea7f2d4d14ba92c45e429c2191099450b0f
73f4846c49a95e5e84e3a6b1102c115e4a031c0a
2022-07-08T09:42:24Z
java
2022-07-09T13:29:11Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
import org.apache.dolphinscheduler.remote.utils.Host; import org.apache.dolphinscheduler.service.cron.CronUtils; import org.apache.dolphinscheduler.service.exceptions.CronParseException; import org.apache.dolphinscheduler.service.process.ProcessService; import org.apache.commons.beanutils.BeanUtils; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.MapUtils; import org.apache.commons.lang3.StringUtils; import java.time.ZonedDateTime; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import java.util.stream.Collectors; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.fasterxml.jackson.core.type.TypeReference; import com.google.common.collect.Lists; /** * executor service impl */ @Service public class ExecutorServiceImpl extends BaseServiceImpl implements ExecutorService { private static final Logger logger = LoggerFactory.getLogger(ExecutorServiceImpl.class); @Autowired
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,849
[Bug][Api] Complete Data workflow remove duplicates.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When complete data, the income date format is `2022-06-01 00:02:10, 2022-06-01 00:02:10, 2022-06-02 00:02:10`, and there are duplicate scheduling dates. ### What you expected to happen 1.When complementing, scheduling does not allow duplicates. ### How to reproduce 1.run workflow domplete data. 2.enter data format is `2022-06-01 00:02:10, 2022-06-01 00:02:10, 2022-06-02 00:02:10` ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10849
https://github.com/apache/dolphinscheduler/pull/10850
b5653ea7f2d4d14ba92c45e429c2191099450b0f
73f4846c49a95e5e84e3a6b1102c115e4a031c0a
2022-07-08T09:42:24Z
java
2022-07-09T13:29:11Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
private ProjectMapper projectMapper; @Autowired private ProjectService projectService; @Autowired private ProcessDefinitionMapper processDefinitionMapper; @Autowired private MonitorService monitorService; @Autowired private ProcessInstanceMapper processInstanceMapper; @Autowired private ProcessService processService; @Autowired private StateEventCallbackService stateEventCallbackService; @Autowired private TaskDefinitionMapper taskDefinitionMapper; @Autowired private ProcessTaskRelationMapper processTaskRelationMapper; @Autowired private TaskGroupQueueMapper taskGroupQueueMapper; /** * execute process instance * * @param loginUser login user * @param projectCode project code * @param processDefinitionCode process definition code * @param cronTime cron time * @param commandType command type * @param failureStrategy failure strategy * @param startNodeList start nodelist * @param taskDependType node dependency type
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,849
[Bug][Api] Complete Data workflow remove duplicates.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When complete data, the income date format is `2022-06-01 00:02:10, 2022-06-01 00:02:10, 2022-06-02 00:02:10`, and there are duplicate scheduling dates. ### What you expected to happen 1.When complementing, scheduling does not allow duplicates. ### How to reproduce 1.run workflow domplete data. 2.enter data format is `2022-06-01 00:02:10, 2022-06-01 00:02:10, 2022-06-02 00:02:10` ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10849
https://github.com/apache/dolphinscheduler/pull/10850
b5653ea7f2d4d14ba92c45e429c2191099450b0f
73f4846c49a95e5e84e3a6b1102c115e4a031c0a
2022-07-08T09:42:24Z
java
2022-07-09T13:29:11Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
* @param warningType warning type * @param warningGroupId notify group id * @param processInstancePriority process instance priority * @param workerGroup worker group name * @param environmentCode environment code * @param runMode run mode * @param timeout timeout * @param startParams the global param values which pass to new process instance * @param expectedParallelismNumber the expected parallelism number when execute complement in parallel mode * @return execute process instance code */ @Override public Map<String, Object> execProcessInstance(User loginUser, long projectCode, long processDefinitionCode, String cronTime, CommandType commandType, FailureStrategy failureStrategy, String startNodeList, TaskDependType taskDependType, WarningType warningType, int warningGroupId, RunMode runMode, Priority processInstancePriority, String workerGroup, Long environmentCode, Integer timeout, Map<String, String> startParams, Integer expectedParallelismNumber, int dryRun, ComplementDependentMode complementDependentMode) { Project project = projectMapper.queryByCode(projectCode); Map<String, Object> result = projectService.checkProjectAndAuth(loginUser, project, projectCode, WORKFLOW_START); if (result.get(Constants.STATUS) != Status.SUCCESS) { return result; } if (timeout <= 0 || timeout > MAX_TASK_TIMEOUT) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,849
[Bug][Api] Complete Data workflow remove duplicates.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When complete data, the income date format is `2022-06-01 00:02:10, 2022-06-01 00:02:10, 2022-06-02 00:02:10`, and there are duplicate scheduling dates. ### What you expected to happen 1.When complementing, scheduling does not allow duplicates. ### How to reproduce 1.run workflow domplete data. 2.enter data format is `2022-06-01 00:02:10, 2022-06-01 00:02:10, 2022-06-02 00:02:10` ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10849
https://github.com/apache/dolphinscheduler/pull/10850
b5653ea7f2d4d14ba92c45e429c2191099450b0f
73f4846c49a95e5e84e3a6b1102c115e4a031c0a
2022-07-08T09:42:24Z
java
2022-07-09T13:29:11Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
putMsg(result, Status.TASK_TIMEOUT_PARAMS_ERROR); return result; } ProcessDefinition processDefinition = processDefinitionMapper.queryByCode(processDefinitionCode); result = checkProcessDefinitionValid(projectCode, processDefinition, processDefinitionCode, processDefinition.getVersion()); if (result.get(Constants.STATUS) != Status.SUCCESS) { return result; } if (!checkTenantSuitable(processDefinition)) { logger.error("there is not any valid tenant for the process definition: id:{},name:{}, ", processDefinition.getId(), processDefinition.getName()); putMsg(result, Status.TENANT_NOT_SUITABLE); return result; } if (!checkScheduleTimeNum(commandType, cronTime)) { putMsg(result, Status.SCHEDULE_TIME_NUMBER); return result; } if (!checkMasterExists(result)) { return result; } /** * create command */ int create = this.createCommand(commandType, processDefinition.getCode(), taskDependType, failureStrategy, startNodeList, cronTime, warningType, loginUser.getId(), warningGroupId, runMode, processInstancePriority, workerGroup, environmentCode, startParams, expectedParallelismNumber, dryRun, complementDependentMode);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,849
[Bug][Api] Complete Data workflow remove duplicates.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When complete data, the income date format is `2022-06-01 00:02:10, 2022-06-01 00:02:10, 2022-06-02 00:02:10`, and there are duplicate scheduling dates. ### What you expected to happen 1.When complementing, scheduling does not allow duplicates. ### How to reproduce 1.run workflow domplete data. 2.enter data format is `2022-06-01 00:02:10, 2022-06-01 00:02:10, 2022-06-02 00:02:10` ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10849
https://github.com/apache/dolphinscheduler/pull/10850
b5653ea7f2d4d14ba92c45e429c2191099450b0f
73f4846c49a95e5e84e3a6b1102c115e4a031c0a
2022-07-08T09:42:24Z
java
2022-07-09T13:29:11Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
if (create > 0) { processDefinition.setWarningGroupId(warningGroupId); processDefinitionMapper.updateById(processDefinition); putMsg(result, Status.SUCCESS); } else { putMsg(result, Status.START_PROCESS_INSTANCE_ERROR); } return result; } /** * check whether master exists * * @param result result * @return master exists return true , otherwise return false */ private boolean checkMasterExists(Map<String, Object> result) { List<Server> masterServers = monitorService.getServerListFromRegistry(true); if (masterServers.isEmpty()) { putMsg(result, Status.MASTER_NOT_EXISTS); return false; } return true; } /** * @param complementData * @param cronTime * @return CommandType is COMPLEMENT_DATA and cronTime's number is not greater than 100 return true , otherwise return false */
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,849
[Bug][Api] Complete Data workflow remove duplicates.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When complete data, the income date format is `2022-06-01 00:02:10, 2022-06-01 00:02:10, 2022-06-02 00:02:10`, and there are duplicate scheduling dates. ### What you expected to happen 1.When complementing, scheduling does not allow duplicates. ### How to reproduce 1.run workflow domplete data. 2.enter data format is `2022-06-01 00:02:10, 2022-06-01 00:02:10, 2022-06-02 00:02:10` ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10849
https://github.com/apache/dolphinscheduler/pull/10850
b5653ea7f2d4d14ba92c45e429c2191099450b0f
73f4846c49a95e5e84e3a6b1102c115e4a031c0a
2022-07-08T09:42:24Z
java
2022-07-09T13:29:11Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
private boolean checkScheduleTimeNum(CommandType complementData, String cronTime) { if (!CommandType.COMPLEMENT_DATA.equals(complementData)) { return true; } if (cronTime == null) { return true; } Map<String, String> cronMap = JSONUtils.toMap(cronTime); if (cronMap.containsKey(CMDPARAM_COMPLEMENT_DATA_SCHEDULE_DATE_LIST)) { String[] stringDates = cronMap.get(CMDPARAM_COMPLEMENT_DATA_SCHEDULE_DATE_LIST).split(COMMA); if (stringDates.length > SCHEDULE_TIME_MAX_LENGTH) { return false; } } return true; } /** * check whether the process definition can be executed * * @param projectCode project code * @param processDefinition process definition * @param processDefineCode process definition code * @param version process instance verison * @return check result code */ @Override public Map<String, Object> checkProcessDefinitionValid(long projectCode, ProcessDefinition processDefinition, long processDefineCode, Integer version) { Map<String, Object> result = new HashMap<>(); if (processDefinition == null || projectCode != processDefinition.getProjectCode()) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,849
[Bug][Api] Complete Data workflow remove duplicates.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When complete data, the income date format is `2022-06-01 00:02:10, 2022-06-01 00:02:10, 2022-06-02 00:02:10`, and there are duplicate scheduling dates. ### What you expected to happen 1.When complementing, scheduling does not allow duplicates. ### How to reproduce 1.run workflow domplete data. 2.enter data format is `2022-06-01 00:02:10, 2022-06-01 00:02:10, 2022-06-02 00:02:10` ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10849
https://github.com/apache/dolphinscheduler/pull/10850
b5653ea7f2d4d14ba92c45e429c2191099450b0f
73f4846c49a95e5e84e3a6b1102c115e4a031c0a
2022-07-08T09:42:24Z
java
2022-07-09T13:29:11Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
putMsg(result, Status.PROCESS_DEFINE_NOT_EXIST, String.valueOf(processDefineCode)); } else if (processDefinition.getReleaseState() != ReleaseState.ONLINE) { putMsg(result, Status.PROCESS_DEFINE_NOT_RELEASE, String.valueOf(processDefineCode), version); } else if (!checkSubProcessDefinitionValid(processDefinition)) { putMsg(result, Status.SUB_PROCESS_DEFINE_NOT_RELEASE); } else { result.put(Constants.STATUS, Status.SUCCESS); } return result; } /** * check if the current process has subprocesses and all subprocesses are valid * * @param processDefinition * @return check result */ @Override public boolean checkSubProcessDefinitionValid(ProcessDefinition processDefinition) { List<ProcessTaskRelation> processTaskRelations = processTaskRelationMapper.queryDownstreamByProcessDefinitionCode(processDefinition.getCode()); if (processTaskRelations.isEmpty()) { return true; } Set<Long> relationCodes = processTaskRelations.stream().map(ProcessTaskRelation::getPostTaskCode).collect(Collectors.toSet()); List<TaskDefinition> taskDefinitions = taskDefinitionMapper.queryByCodeList(relationCodes);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,849
[Bug][Api] Complete Data workflow remove duplicates.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When complete data, the income date format is `2022-06-01 00:02:10, 2022-06-01 00:02:10, 2022-06-02 00:02:10`, and there are duplicate scheduling dates. ### What you expected to happen 1.When complementing, scheduling does not allow duplicates. ### How to reproduce 1.run workflow domplete data. 2.enter data format is `2022-06-01 00:02:10, 2022-06-01 00:02:10, 2022-06-02 00:02:10` ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10849
https://github.com/apache/dolphinscheduler/pull/10850
b5653ea7f2d4d14ba92c45e429c2191099450b0f
73f4846c49a95e5e84e3a6b1102c115e4a031c0a
2022-07-08T09:42:24Z
java
2022-07-09T13:29:11Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
Set<Long> processDefinitionCodeSet = new HashSet<>(); taskDefinitions.stream() .filter(task -> TaskConstants.TASK_TYPE_SUB_PROCESS.equalsIgnoreCase(task.getTaskType())).forEach( taskDefinition -> processDefinitionCodeSet.add(Long.valueOf( JSONUtils.getNodeString(taskDefinition.getTaskParams(), Constants.CMD_PARAM_SUB_PROCESS_DEFINE_CODE)))); if (processDefinitionCodeSet.isEmpty()) { return true; } List<ProcessDefinition> processDefinitions = processDefinitionMapper.queryByCodes(processDefinitionCodeSet); return processDefinitions.stream() .filter(definition -> definition.getReleaseState().equals(ReleaseState.OFFLINE)).collect(Collectors.toSet()) .isEmpty(); } /** * do action to process instance:pause, stop, repeat, recover from pause, recover from stop * * @param loginUser login user * @param projectCode project code * @param processInstanceId process instance id * @param executeType execute type * @return execute result code */ @Override public Map<String, Object> execute(User loginUser, long projectCode, Integer processInstanceId, ExecuteType executeType) { Project project = projectMapper.queryByCode(projectCode); Map<String, Object> result = projectService.checkProjectAndAuth(loginUser, project, projectCode, ApiFuncIdentificationConstant.map.get(executeType));
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,849
[Bug][Api] Complete Data workflow remove duplicates.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When complete data, the income date format is `2022-06-01 00:02:10, 2022-06-01 00:02:10, 2022-06-02 00:02:10`, and there are duplicate scheduling dates. ### What you expected to happen 1.When complementing, scheduling does not allow duplicates. ### How to reproduce 1.run workflow domplete data. 2.enter data format is `2022-06-01 00:02:10, 2022-06-01 00:02:10, 2022-06-02 00:02:10` ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10849
https://github.com/apache/dolphinscheduler/pull/10850
b5653ea7f2d4d14ba92c45e429c2191099450b0f
73f4846c49a95e5e84e3a6b1102c115e4a031c0a
2022-07-08T09:42:24Z
java
2022-07-09T13:29:11Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
if (result.get(Constants.STATUS) != Status.SUCCESS) { return result; } if (!checkMasterExists(result)) { return result; } ProcessInstance processInstance = processService.findProcessInstanceDetailById(processInstanceId); if (processInstance == null) { putMsg(result, Status.PROCESS_INSTANCE_NOT_EXIST, processInstanceId); return result; } ProcessDefinition processDefinition = processService.findProcessDefinition(processInstance.getProcessDefinitionCode(), processInstance.getProcessDefinitionVersion()); if (executeType != ExecuteType.STOP && executeType != ExecuteType.PAUSE) { result = checkProcessDefinitionValid(projectCode, processDefinition, processInstance.getProcessDefinitionCode(), processInstance.getProcessDefinitionVersion()); if (result.get(Constants.STATUS) != Status.SUCCESS) { return result; } } result = checkExecuteType(processInstance, executeType); if (result.get(Constants.STATUS) != Status.SUCCESS) { return result; } if (!checkTenantSuitable(processDefinition)) { logger.error("there is not any valid tenant for the process definition: id:{},name:{}, ", processDefinition.getId(), processDefinition.getName());
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,849
[Bug][Api] Complete Data workflow remove duplicates.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When complete data, the income date format is `2022-06-01 00:02:10, 2022-06-01 00:02:10, 2022-06-02 00:02:10`, and there are duplicate scheduling dates. ### What you expected to happen 1.When complementing, scheduling does not allow duplicates. ### How to reproduce 1.run workflow domplete data. 2.enter data format is `2022-06-01 00:02:10, 2022-06-01 00:02:10, 2022-06-02 00:02:10` ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10849
https://github.com/apache/dolphinscheduler/pull/10850
b5653ea7f2d4d14ba92c45e429c2191099450b0f
73f4846c49a95e5e84e3a6b1102c115e4a031c0a
2022-07-08T09:42:24Z
java
2022-07-09T13:29:11Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
putMsg(result, Status.TENANT_NOT_SUITABLE); } // Map<String, Object> commandMap = JSONUtils.parseObject(processInstance.getCommandParam(), new TypeReference<Map<String, Object>>() { }); String startParams = null; if (MapUtils.isNotEmpty(commandMap) && executeType == ExecuteType.REPEAT_RUNNING) { Object startParamsJson = commandMap.get(Constants.CMD_PARAM_START_PARAMS); if (startParamsJson != null) { startParams = startParamsJson.toString(); } } switch (executeType) { case REPEAT_RUNNING: result = insertCommand(loginUser, processInstanceId, processDefinition.getCode(), processDefinition.getVersion(), CommandType.REPEAT_RUNNING, startParams); break; case RECOVER_SUSPENDED_PROCESS: result = insertCommand(loginUser, processInstanceId, processDefinition.getCode(), processDefinition.getVersion(), CommandType.RECOVER_SUSPENDED_PROCESS, startParams); break; case START_FAILURE_TASK_PROCESS: result = insertCommand(loginUser, processInstanceId, processDefinition.getCode(), processDefinition.getVersion(), CommandType.START_FAILURE_TASK_PROCESS, startParams); break; case STOP: if (processInstance.getState() == ExecutionStatus.READY_STOP) { putMsg(result, Status.PROCESS_INSTANCE_ALREADY_CHANGED, processInstance.getName(), processInstance.getState());
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,849
[Bug][Api] Complete Data workflow remove duplicates.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When complete data, the income date format is `2022-06-01 00:02:10, 2022-06-01 00:02:10, 2022-06-02 00:02:10`, and there are duplicate scheduling dates. ### What you expected to happen 1.When complementing, scheduling does not allow duplicates. ### How to reproduce 1.run workflow domplete data. 2.enter data format is `2022-06-01 00:02:10, 2022-06-01 00:02:10, 2022-06-02 00:02:10` ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10849
https://github.com/apache/dolphinscheduler/pull/10850
b5653ea7f2d4d14ba92c45e429c2191099450b0f
73f4846c49a95e5e84e3a6b1102c115e4a031c0a
2022-07-08T09:42:24Z
java
2022-07-09T13:29:11Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
} else { result = updateProcessInstancePrepare(processInstance, CommandType.STOP, ExecutionStatus.READY_STOP); } break; case PAUSE: if (processInstance.getState() == ExecutionStatus.READY_PAUSE) { putMsg(result, Status.PROCESS_INSTANCE_ALREADY_CHANGED, processInstance.getName(), processInstance.getState()); } else { result = updateProcessInstancePrepare(processInstance, CommandType.PAUSE, ExecutionStatus.READY_PAUSE); } break; default: logger.error("unknown execute type : {}", executeType); putMsg(result, Status.REQUEST_PARAMS_NOT_VALID_ERROR, "unknown execute type"); break; } return result; } @Override public Map<String, Object> forceStartTaskInstance(User loginUser, int queueId) { Map<String, Object> result = new HashMap<>(); TaskGroupQueue taskGroupQueue = taskGroupQueueMapper.selectById(queueId); // ProcessInstance processInstance = processInstanceMapper.selectById(taskGroupQueue.getProcessId()); if (processInstance == null) { putMsg(result, Status.PROCESS_INSTANCE_NOT_EXIST, taskGroupQueue.getProcessId()); return result; }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,849
[Bug][Api] Complete Data workflow remove duplicates.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When complete data, the income date format is `2022-06-01 00:02:10, 2022-06-01 00:02:10, 2022-06-02 00:02:10`, and there are duplicate scheduling dates. ### What you expected to happen 1.When complementing, scheduling does not allow duplicates. ### How to reproduce 1.run workflow domplete data. 2.enter data format is `2022-06-01 00:02:10, 2022-06-01 00:02:10, 2022-06-02 00:02:10` ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10849
https://github.com/apache/dolphinscheduler/pull/10850
b5653ea7f2d4d14ba92c45e429c2191099450b0f
73f4846c49a95e5e84e3a6b1102c115e4a031c0a
2022-07-08T09:42:24Z
java
2022-07-09T13:29:11Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
if (!checkMasterExists(result)) { return result; } return forceStart(processInstance, taskGroupQueue); } /** * check tenant suitable * * @param processDefinition process definition * @return true if tenant suitable, otherwise return false */ private boolean checkTenantSuitable(ProcessDefinition processDefinition) { Tenant tenant = processService.getTenantForProcess(processDefinition.getTenantId(), processDefinition.getUserId()); return tenant != null; } /** * Check the state of process instance and the type of operation match * * @param processInstance process instance * @param executeType execute type * @return check result code */ private Map<String, Object> checkExecuteType(ProcessInstance processInstance, ExecuteType executeType) { Map<String, Object> result = new HashMap<>(); ExecutionStatus executionStatus = processInstance.getState(); boolean checkResult = false; switch (executeType) { case PAUSE: case STOP:
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,849
[Bug][Api] Complete Data workflow remove duplicates.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When complete data, the income date format is `2022-06-01 00:02:10, 2022-06-01 00:02:10, 2022-06-02 00:02:10`, and there are duplicate scheduling dates. ### What you expected to happen 1.When complementing, scheduling does not allow duplicates. ### How to reproduce 1.run workflow domplete data. 2.enter data format is `2022-06-01 00:02:10, 2022-06-01 00:02:10, 2022-06-02 00:02:10` ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10849
https://github.com/apache/dolphinscheduler/pull/10850
b5653ea7f2d4d14ba92c45e429c2191099450b0f
73f4846c49a95e5e84e3a6b1102c115e4a031c0a
2022-07-08T09:42:24Z
java
2022-07-09T13:29:11Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
if (executionStatus.typeIsRunning()) { checkResult = true; } break; case REPEAT_RUNNING: if (executionStatus.typeIsFinished()) { checkResult = true; } break; case START_FAILURE_TASK_PROCESS: if (executionStatus.typeIsFailure()) { checkResult = true; } break; case RECOVER_SUSPENDED_PROCESS: if (executionStatus.typeIsPause() || executionStatus.typeIsCancel()) { checkResult = true; } break; default: break; } if (!checkResult) { putMsg(result, Status.PROCESS_INSTANCE_STATE_OPERATION_ERROR, processInstance.getName(), executionStatus.toString(), executeType.toString()); } else { putMsg(result, Status.SUCCESS); } return result; }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,849
[Bug][Api] Complete Data workflow remove duplicates.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When complete data, the income date format is `2022-06-01 00:02:10, 2022-06-01 00:02:10, 2022-06-02 00:02:10`, and there are duplicate scheduling dates. ### What you expected to happen 1.When complementing, scheduling does not allow duplicates. ### How to reproduce 1.run workflow domplete data. 2.enter data format is `2022-06-01 00:02:10, 2022-06-01 00:02:10, 2022-06-02 00:02:10` ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10849
https://github.com/apache/dolphinscheduler/pull/10850
b5653ea7f2d4d14ba92c45e429c2191099450b0f
73f4846c49a95e5e84e3a6b1102c115e4a031c0a
2022-07-08T09:42:24Z
java
2022-07-09T13:29:11Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
/** * prepare to update process instance command type and status * * @param processInstance process instance * @param commandType command type * @param executionStatus execute status * @return update result */ private Map<String, Object> updateProcessInstancePrepare(ProcessInstance processInstance, CommandType commandType, ExecutionStatus executionStatus) { Map<String, Object> result = new HashMap<>(); processInstance.setCommandType(commandType); processInstance.addHistoryCmd(commandType); processInstance.setState(executionStatus); int update = processService.updateProcessInstance(processInstance); // if (update > 0) { // StateEventChangeCommand stateEventChangeCommand = new StateEventChangeCommand( processInstance.getId(), 0, processInstance.getState(), processInstance.getId(), 0 ); Host host = new Host(processInstance.getHost()); stateEventCallbackService.sendResult(host, stateEventChangeCommand.convert2Command()); putMsg(result, Status.SUCCESS); } else { putMsg(result, Status.EXECUTE_PROCESS_INSTANCE_ERROR); } return result; } /**
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,849
[Bug][Api] Complete Data workflow remove duplicates.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When complete data, the income date format is `2022-06-01 00:02:10, 2022-06-01 00:02:10, 2022-06-02 00:02:10`, and there are duplicate scheduling dates. ### What you expected to happen 1.When complementing, scheduling does not allow duplicates. ### How to reproduce 1.run workflow domplete data. 2.enter data format is `2022-06-01 00:02:10, 2022-06-01 00:02:10, 2022-06-02 00:02:10` ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10849
https://github.com/apache/dolphinscheduler/pull/10850
b5653ea7f2d4d14ba92c45e429c2191099450b0f
73f4846c49a95e5e84e3a6b1102c115e4a031c0a
2022-07-08T09:42:24Z
java
2022-07-09T13:29:11Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
* prepare to update process instance command type and status * * @param processInstance process instance * @return update result */ private Map<String, Object> forceStart(ProcessInstance processInstance, TaskGroupQueue taskGroupQueue) { Map<String, Object> result = new HashMap<>(); if (taskGroupQueue.getStatus() != TaskGroupQueueStatus.WAIT_QUEUE) { putMsg(result, Status.TASK_GROUP_QUEUE_ALREADY_START); return result; } taskGroupQueue.setForceStart(Flag.YES.getCode()); processService.updateTaskGroupQueue(taskGroupQueue); processService.sendStartTask2Master(processInstance, taskGroupQueue.getTaskId(), org.apache.dolphinscheduler.remote.command.CommandType.TASK_FORCE_STATE_EVENT_REQUEST); putMsg(result, Status.SUCCESS); return result; } /** * insert command, used in the implementation of the page, re run, recovery (pause / failure) execution * * @param loginUser login user * @param instanceId instance id * @param processDefinitionCode process definition code * @param processVersion * @param commandType command type * @return insert result code */ private Map<String, Object> insertCommand(User loginUser, Integer instanceId, long processDefinitionCode, int processVersion, CommandType commandType, String startParams) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,849
[Bug][Api] Complete Data workflow remove duplicates.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When complete data, the income date format is `2022-06-01 00:02:10, 2022-06-01 00:02:10, 2022-06-02 00:02:10`, and there are duplicate scheduling dates. ### What you expected to happen 1.When complementing, scheduling does not allow duplicates. ### How to reproduce 1.run workflow domplete data. 2.enter data format is `2022-06-01 00:02:10, 2022-06-01 00:02:10, 2022-06-02 00:02:10` ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10849
https://github.com/apache/dolphinscheduler/pull/10850
b5653ea7f2d4d14ba92c45e429c2191099450b0f
73f4846c49a95e5e84e3a6b1102c115e4a031c0a
2022-07-08T09:42:24Z
java
2022-07-09T13:29:11Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
Map<String, Object> result = new HashMap<>(); // Map<String, Object> cmdParam = new HashMap<>(); cmdParam.put(CMD_PARAM_RECOVER_PROCESS_ID_STRING, instanceId); if (!StringUtils.isEmpty(startParams)) { cmdParam.put(CMD_PARAM_START_PARAMS, startParams); } Command command = new Command(); command.setCommandType(commandType); command.setProcessDefinitionCode(processDefinitionCode); command.setCommandParam(JSONUtils.toJsonString(cmdParam)); command.setExecutorId(loginUser.getId()); command.setProcessDefinitionVersion(processVersion); command.setProcessInstanceId(instanceId); if (!processService.verifyIsNeedCreateCommand(command)) { putMsg(result, Status.PROCESS_INSTANCE_EXECUTING_COMMAND, String.valueOf(processDefinitionCode)); return result; } int create = processService.createCommand(command); if (create > 0) { putMsg(result, Status.SUCCESS); } else { putMsg(result, Status.EXECUTE_PROCESS_INSTANCE_ERROR); } return result; } /** * check if sub processes are offline before starting process definition * * @param processDefinitionCode process definition code
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,849
[Bug][Api] Complete Data workflow remove duplicates.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When complete data, the income date format is `2022-06-01 00:02:10, 2022-06-01 00:02:10, 2022-06-02 00:02:10`, and there are duplicate scheduling dates. ### What you expected to happen 1.When complementing, scheduling does not allow duplicates. ### How to reproduce 1.run workflow domplete data. 2.enter data format is `2022-06-01 00:02:10, 2022-06-01 00:02:10, 2022-06-02 00:02:10` ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10849
https://github.com/apache/dolphinscheduler/pull/10850
b5653ea7f2d4d14ba92c45e429c2191099450b0f
73f4846c49a95e5e84e3a6b1102c115e4a031c0a
2022-07-08T09:42:24Z
java
2022-07-09T13:29:11Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
* @return check result code */ @Override public Map<String, Object> startCheckByProcessDefinedCode(long processDefinitionCode) { Map<String, Object> result = new HashMap<>(); ProcessDefinition processDefinition = processDefinitionMapper.queryByCode(processDefinitionCode); if (processDefinition == null) { logger.error("process definition is not found"); putMsg(result, Status.REQUEST_PARAMS_NOT_VALID_ERROR, "processDefinitionCode"); return result; } List<Long> codes = new ArrayList<>(); processService.recurseFindSubProcess(processDefinition.getCode(), codes); if (!codes.isEmpty()) { List<ProcessDefinition> processDefinitionList = processDefinitionMapper.queryByCodes(codes); if (processDefinitionList != null) { for (ProcessDefinition processDefinitionTmp : processDefinitionList) { /** * if there is no online process, exit directly */ if (processDefinitionTmp.getReleaseState() != ReleaseState.ONLINE) { putMsg(result, Status.PROCESS_DEFINE_NOT_RELEASE, processDefinitionTmp.getName()); logger.info("not release process definition id: {} , name : {}", processDefinitionTmp.getId(), processDefinitionTmp.getName()); return result; } } } } putMsg(result, Status.SUCCESS);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,849
[Bug][Api] Complete Data workflow remove duplicates.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When complete data, the income date format is `2022-06-01 00:02:10, 2022-06-01 00:02:10, 2022-06-02 00:02:10`, and there are duplicate scheduling dates. ### What you expected to happen 1.When complementing, scheduling does not allow duplicates. ### How to reproduce 1.run workflow domplete data. 2.enter data format is `2022-06-01 00:02:10, 2022-06-01 00:02:10, 2022-06-02 00:02:10` ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10849
https://github.com/apache/dolphinscheduler/pull/10850
b5653ea7f2d4d14ba92c45e429c2191099450b0f
73f4846c49a95e5e84e3a6b1102c115e4a031c0a
2022-07-08T09:42:24Z
java
2022-07-09T13:29:11Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
return result; } /** * create command * * @param commandType commandType * @param processDefineCode processDefineCode * @param nodeDep nodeDep * @param failureStrategy failureStrategy * @param startNodeList startNodeList * @param schedule schedule * @param warningType warningType * @param executorId executorId * @param warningGroupId warningGroupId * @param runMode runMode * @param processInstancePriority processInstancePriority * @param workerGroup workerGroup * @param environmentCode environmentCode * @return command id */ private int createCommand(CommandType commandType, long processDefineCode, TaskDependType nodeDep, FailureStrategy failureStrategy, String startNodeList, String schedule, WarningType warningType, int executorId, int warningGroupId, RunMode runMode, Priority processInstancePriority, String workerGroup, Long environmentCode, Map<String, String> startParams, Integer expectedParallelismNumber, int dryRun, ComplementDependentMode complementDependentMode) { /** * instantiate command schedule instance */ Command command = new Command();
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,849
[Bug][Api] Complete Data workflow remove duplicates.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When complete data, the income date format is `2022-06-01 00:02:10, 2022-06-01 00:02:10, 2022-06-02 00:02:10`, and there are duplicate scheduling dates. ### What you expected to happen 1.When complementing, scheduling does not allow duplicates. ### How to reproduce 1.run workflow domplete data. 2.enter data format is `2022-06-01 00:02:10, 2022-06-01 00:02:10, 2022-06-02 00:02:10` ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10849
https://github.com/apache/dolphinscheduler/pull/10850
b5653ea7f2d4d14ba92c45e429c2191099450b0f
73f4846c49a95e5e84e3a6b1102c115e4a031c0a
2022-07-08T09:42:24Z
java
2022-07-09T13:29:11Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
Map<String, String> cmdParam = new HashMap<>(); if (commandType == null) { command.setCommandType(CommandType.START_PROCESS); } else { command.setCommandType(commandType); } command.setProcessDefinitionCode(processDefineCode); if (nodeDep != null) { command.setTaskDependType(nodeDep); } if (failureStrategy != null) { command.setFailureStrategy(failureStrategy); } if (!StringUtils.isEmpty(startNodeList)) { cmdParam.put(CMD_PARAM_START_NODES, startNodeList); } if (warningType != null) { command.setWarningType(warningType); } if (startParams != null && startParams.size() > 0) { cmdParam.put(CMD_PARAM_START_PARAMS, JSONUtils.toJsonString(startParams)); } command.setCommandParam(JSONUtils.toJsonString(cmdParam)); command.setExecutorId(executorId); command.setWarningGroupId(warningGroupId); command.setProcessInstancePriority(processInstancePriority); command.setWorkerGroup(workerGroup); command.setEnvironmentCode(environmentCode); command.setDryRun(dryRun); ProcessDefinition processDefinition = processService.findProcessDefinitionByCode(processDefineCode);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,849
[Bug][Api] Complete Data workflow remove duplicates.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When complete data, the income date format is `2022-06-01 00:02:10, 2022-06-01 00:02:10, 2022-06-02 00:02:10`, and there are duplicate scheduling dates. ### What you expected to happen 1.When complementing, scheduling does not allow duplicates. ### How to reproduce 1.run workflow domplete data. 2.enter data format is `2022-06-01 00:02:10, 2022-06-01 00:02:10, 2022-06-02 00:02:10` ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10849
https://github.com/apache/dolphinscheduler/pull/10850
b5653ea7f2d4d14ba92c45e429c2191099450b0f
73f4846c49a95e5e84e3a6b1102c115e4a031c0a
2022-07-08T09:42:24Z
java
2022-07-09T13:29:11Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
if (processDefinition != null) { command.setProcessDefinitionVersion(processDefinition.getVersion()); } command.setProcessInstanceId(0); // if (commandType == CommandType.COMPLEMENT_DATA) { if (schedule == null || StringUtils.isEmpty(schedule)) { return 0; } if (!isValidateScheduleTime(schedule)) { return 0; } try { return createComplementCommandList(schedule, runMode, command, expectedParallelismNumber, complementDependentMode); } catch (CronParseException cronParseException) { // logger.error("Parse cron error", cronParseException); return 0; } } else { command.setCommandParam(JSONUtils.toJsonString(cmdParam)); return processService.createCommand(command); } } /** * create complement command * close left and close right * * @param scheduleTimeParam
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,849
[Bug][Api] Complete Data workflow remove duplicates.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When complete data, the income date format is `2022-06-01 00:02:10, 2022-06-01 00:02:10, 2022-06-02 00:02:10`, and there are duplicate scheduling dates. ### What you expected to happen 1.When complementing, scheduling does not allow duplicates. ### How to reproduce 1.run workflow domplete data. 2.enter data format is `2022-06-01 00:02:10, 2022-06-01 00:02:10, 2022-06-02 00:02:10` ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10849
https://github.com/apache/dolphinscheduler/pull/10850
b5653ea7f2d4d14ba92c45e429c2191099450b0f
73f4846c49a95e5e84e3a6b1102c115e4a031c0a
2022-07-08T09:42:24Z
java
2022-07-09T13:29:11Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
* @param runMode * @return */ protected int createComplementCommandList(String scheduleTimeParam, RunMode runMode, Command command, Integer expectedParallelismNumber, ComplementDependentMode complementDependentMode) throws CronParseException { int createCount = 0; String startDate = null; String endDate = null; String dateList = null; int dependentProcessDefinitionCreateCount = 0; runMode = (runMode == null) ? RunMode.RUN_MODE_SERIAL : runMode; Map<String, String> cmdParam = JSONUtils.toMap(command.getCommandParam()); Map<String, String> scheduleParam = JSONUtils.toMap(scheduleTimeParam); if (scheduleParam.containsKey(CMDPARAM_COMPLEMENT_DATA_SCHEDULE_DATE_LIST)) { dateList = scheduleParam.get(CMDPARAM_COMPLEMENT_DATA_SCHEDULE_DATE_LIST); dateList = removeDuplicates(dateList); } if (scheduleParam.containsKey(CMDPARAM_COMPLEMENT_DATA_START_DATE) && scheduleParam.containsKey( CMDPARAM_COMPLEMENT_DATA_END_DATE)) { startDate = scheduleParam.get(CMDPARAM_COMPLEMENT_DATA_START_DATE); endDate = scheduleParam.get(CMDPARAM_COMPLEMENT_DATA_END_DATE); } switch (runMode) { case RUN_MODE_SERIAL: { if (StringUtils.isNotEmpty(dateList)) { cmdParam.put(CMDPARAM_COMPLEMENT_DATA_SCHEDULE_DATE_LIST, dateList); command.setCommandParam(JSONUtils.toJsonString(cmdParam)); createCount = processService.createCommand(command);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,849
[Bug][Api] Complete Data workflow remove duplicates.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When complete data, the income date format is `2022-06-01 00:02:10, 2022-06-01 00:02:10, 2022-06-02 00:02:10`, and there are duplicate scheduling dates. ### What you expected to happen 1.When complementing, scheduling does not allow duplicates. ### How to reproduce 1.run workflow domplete data. 2.enter data format is `2022-06-01 00:02:10, 2022-06-01 00:02:10, 2022-06-02 00:02:10` ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10849
https://github.com/apache/dolphinscheduler/pull/10850
b5653ea7f2d4d14ba92c45e429c2191099450b0f
73f4846c49a95e5e84e3a6b1102c115e4a031c0a
2022-07-08T09:42:24Z
java
2022-07-09T13:29:11Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
} if (startDate != null && endDate != null) { cmdParam.put(CMDPARAM_COMPLEMENT_DATA_START_DATE, startDate); cmdParam.put(CMDPARAM_COMPLEMENT_DATA_END_DATE, endDate); command.setCommandParam(JSONUtils.toJsonString(cmdParam)); createCount = processService.createCommand(command); // List<Schedule> schedules = processService.queryReleaseSchedulerListByProcessDefinitionCode( command.getProcessDefinitionCode()); if (schedules.isEmpty() || complementDependentMode == ComplementDependentMode.OFF_MODE) { logger.info("process code: {} complement dependent in off mode or schedule's size is 0, skip " + "dependent complement data", command.getProcessDefinitionCode()); } else { dependentProcessDefinitionCreateCount += createComplementDependentCommand(schedules, command); } } break; } case RUN_MODE_PARALLEL: { if (startDate != null && endDate != null) { List<Schedule> schedules = processService.queryReleaseSchedulerListByProcessDefinitionCode( command.getProcessDefinitionCode()); List<ZonedDateTime> listDate = new ArrayList<>( CronUtils.getSelfFireDateList(DateUtils.stringToZoneDateTime(startDate), DateUtils.stringToZoneDateTime(endDate), schedules)); int listDateSize = listDate.size(); createCount = listDate.size(); if (!CollectionUtils.isEmpty(listDate)) { if (expectedParallelismNumber != null && expectedParallelismNumber != 0) { createCount = Math.min(listDate.size(), expectedParallelismNumber);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,849
[Bug][Api] Complete Data workflow remove duplicates.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When complete data, the income date format is `2022-06-01 00:02:10, 2022-06-01 00:02:10, 2022-06-02 00:02:10`, and there are duplicate scheduling dates. ### What you expected to happen 1.When complementing, scheduling does not allow duplicates. ### How to reproduce 1.run workflow domplete data. 2.enter data format is `2022-06-01 00:02:10, 2022-06-01 00:02:10, 2022-06-02 00:02:10` ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10849
https://github.com/apache/dolphinscheduler/pull/10850
b5653ea7f2d4d14ba92c45e429c2191099450b0f
73f4846c49a95e5e84e3a6b1102c115e4a031c0a
2022-07-08T09:42:24Z
java
2022-07-09T13:29:11Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
if (listDateSize < createCount) { createCount = listDateSize; } } logger.info("In parallel mode, current expectedParallelismNumber:{}", createCount); // // int itemsPerCommand = (listDateSize / createCount); int remainingItems = (listDateSize % createCount); int startDateIndex = 0; int endDateIndex = 0; for (int i = 1; i <= createCount; i++) { int extra = (i <= remainingItems) ? 1 : 0; int singleCommandItems = (itemsPerCommand + extra); if (i == 1) { endDateIndex += singleCommandItems - 1; } else { startDateIndex = endDateIndex + 1; endDateIndex += singleCommandItems; } cmdParam.put(CMDPARAM_COMPLEMENT_DATA_START_DATE, DateUtils.dateToString(listDate.get(startDateIndex))); cmdParam.put(CMDPARAM_COMPLEMENT_DATA_END_DATE, DateUtils.dateToString(listDate.get(endDateIndex))); command.setCommandParam(JSONUtils.toJsonString(cmdParam)); processService.createCommand(command); if (schedules.isEmpty() || complementDependentMode == ComplementDependentMode.OFF_MODE) { logger.info( "process code: {} complement dependent in off mode or schedule's size is 0, skip " + "dependent complement data", command.getProcessDefinitionCode()); } else { dependentProcessDefinitionCreateCount +=
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,849
[Bug][Api] Complete Data workflow remove duplicates.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When complete data, the income date format is `2022-06-01 00:02:10, 2022-06-01 00:02:10, 2022-06-02 00:02:10`, and there are duplicate scheduling dates. ### What you expected to happen 1.When complementing, scheduling does not allow duplicates. ### How to reproduce 1.run workflow domplete data. 2.enter data format is `2022-06-01 00:02:10, 2022-06-01 00:02:10, 2022-06-02 00:02:10` ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10849
https://github.com/apache/dolphinscheduler/pull/10850
b5653ea7f2d4d14ba92c45e429c2191099450b0f
73f4846c49a95e5e84e3a6b1102c115e4a031c0a
2022-07-08T09:42:24Z
java
2022-07-09T13:29:11Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
createComplementDependentCommand(schedules, command); } } } } if (StringUtils.isNotEmpty(dateList)) { List<String> listDate = Arrays.asList(dateList.split(COMMA)); int listDateSize = listDate.size(); createCount = listDate.size(); if (!CollectionUtils.isEmpty(listDate)) { if (expectedParallelismNumber != null && expectedParallelismNumber != 0) { createCount = Math.min(listDate.size(), expectedParallelismNumber); if (listDateSize < createCount) { createCount = listDateSize; } } logger.info("In parallel mode, current expectedParallelismNumber:{}", createCount); for (List<String> stringDate : Lists.partition(listDate, createCount)) { cmdParam.put(CMDPARAM_COMPLEMENT_DATA_SCHEDULE_DATE_LIST, String.join(COMMA, stringDate)); command.setCommandParam(JSONUtils.toJsonString(cmdParam)); processService.createCommand(command); } } } break; } default: break; } logger.info("create complement command count: {}, create dependent complement command count: {}", createCount,
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,849
[Bug][Api] Complete Data workflow remove duplicates.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When complete data, the income date format is `2022-06-01 00:02:10, 2022-06-01 00:02:10, 2022-06-02 00:02:10`, and there are duplicate scheduling dates. ### What you expected to happen 1.When complementing, scheduling does not allow duplicates. ### How to reproduce 1.run workflow domplete data. 2.enter data format is `2022-06-01 00:02:10, 2022-06-01 00:02:10, 2022-06-02 00:02:10` ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10849
https://github.com/apache/dolphinscheduler/pull/10850
b5653ea7f2d4d14ba92c45e429c2191099450b0f
73f4846c49a95e5e84e3a6b1102c115e4a031c0a
2022-07-08T09:42:24Z
java
2022-07-09T13:29:11Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
dependentProcessDefinitionCreateCount); return createCount; } /** * create complement dependent command */ protected int createComplementDependentCommand(List<Schedule> schedules, Command command) { int dependentProcessDefinitionCreateCount = 0; Command dependentCommand; try { dependentCommand = (Command) BeanUtils.cloneBean(command); } catch (Exception e) { logger.error("copy dependent command error: ", e); return dependentProcessDefinitionCreateCount; } List<DependentProcessDefinition> dependentProcessDefinitionList = getComplementDependentDefinitionList(dependentCommand.getProcessDefinitionCode(), CronUtils.getMaxCycle(schedules.get(0).getCrontab()), dependentCommand.getWorkerGroup()); dependentCommand.setTaskDependType(TaskDependType.TASK_POST); for (DependentProcessDefinition dependentProcessDefinition : dependentProcessDefinitionList) { dependentCommand.setProcessDefinitionCode(dependentProcessDefinition.getProcessDefinitionCode()); dependentCommand.setWorkerGroup(dependentProcessDefinition.getWorkerGroup()); Map<String, String> cmdParam = JSONUtils.toMap(dependentCommand.getCommandParam()); cmdParam.put(CMD_PARAM_START_NODES, String.valueOf(dependentProcessDefinition.getTaskDefinitionCode())); dependentCommand.setCommandParam(JSONUtils.toJsonString(cmdParam)); dependentProcessDefinitionCreateCount += processService.createCommand(dependentCommand); } return dependentProcessDefinitionCreateCount; } /**
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,849
[Bug][Api] Complete Data workflow remove duplicates.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When complete data, the income date format is `2022-06-01 00:02:10, 2022-06-01 00:02:10, 2022-06-02 00:02:10`, and there are duplicate scheduling dates. ### What you expected to happen 1.When complementing, scheduling does not allow duplicates. ### How to reproduce 1.run workflow domplete data. 2.enter data format is `2022-06-01 00:02:10, 2022-06-01 00:02:10, 2022-06-02 00:02:10` ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10849
https://github.com/apache/dolphinscheduler/pull/10850
b5653ea7f2d4d14ba92c45e429c2191099450b0f
73f4846c49a95e5e84e3a6b1102c115e4a031c0a
2022-07-08T09:42:24Z
java
2022-07-09T13:29:11Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
* get complement list */ private List<DependentProcessDefinition> getComplementDependentDefinitionList(long processDefinitionCode, CycleEnum processDefinitionCycle, String workerGroup) { List<DependentProcessDefinition> dependentProcessDefinitionList = processService.queryDependentProcessDefinitionByProcessDefinitionCode(processDefinitionCode); return checkDependentProcessDefinitionValid(dependentProcessDefinitionList, processDefinitionCycle, workerGroup); } /** * Check whether the dependency cycle of the dependent node is consistent with the schedule cycle of * the and if there is no worker group in the schedule, use the complement selection's * worker group */ private List<DependentProcessDefinition> checkDependentProcessDefinitionValid( List<DependentProcessDefinition> dependentProcessDefinitionList, CycleEnum processDefinitionCycle, String workerGroup) { List<DependentProcessDefinition> validDependentProcessDefinitionList = new ArrayList<>(); List<Long> processDefinitionCodeList = dependentProcessDefinitionList.stream().map(DependentProcessDefinition::getProcessDefinitionCode) .collect(Collectors.toList()); Map<Long, String> processDefinitionWorkerGroupMap = processService.queryWorkerGroupByProcessDefinitionCodes(processDefinitionCodeList); for (DependentProcessDefinition dependentProcessDefinition : dependentProcessDefinitionList) { if (dependentProcessDefinition.getDependentCycle() == processDefinitionCycle) { if (processDefinitionWorkerGroupMap.get(dependentProcessDefinition.getProcessDefinitionCode()) == null) { dependentProcessDefinition.setWorkerGroup(workerGroup); }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,849
[Bug][Api] Complete Data workflow remove duplicates.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When complete data, the income date format is `2022-06-01 00:02:10, 2022-06-01 00:02:10, 2022-06-02 00:02:10`, and there are duplicate scheduling dates. ### What you expected to happen 1.When complementing, scheduling does not allow duplicates. ### How to reproduce 1.run workflow domplete data. 2.enter data format is `2022-06-01 00:02:10, 2022-06-01 00:02:10, 2022-06-02 00:02:10` ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10849
https://github.com/apache/dolphinscheduler/pull/10850
b5653ea7f2d4d14ba92c45e429c2191099450b0f
73f4846c49a95e5e84e3a6b1102c115e4a031c0a
2022-07-08T09:42:24Z
java
2022-07-09T13:29:11Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
validDependentProcessDefinitionList.add(dependentProcessDefinition); } } return validDependentProcessDefinitionList; } /** * @param schedule * @return check error return 0 otherwish 1 */ private boolean isValidateScheduleTime(String schedule) { Map<String, String> scheduleResult = JSONUtils.toMap(schedule); if (scheduleResult == null) { return false; } if (scheduleResult.containsKey(CMDPARAM_COMPLEMENT_DATA_SCHEDULE_DATE_LIST)) { if (scheduleResult.get(CMDPARAM_COMPLEMENT_DATA_SCHEDULE_DATE_LIST) == null) { return false; } } if (scheduleResult.containsKey(CMDPARAM_COMPLEMENT_DATA_START_DATE)) { String startDate = scheduleResult.get(CMDPARAM_COMPLEMENT_DATA_START_DATE); String endDate = scheduleResult.get(CMDPARAM_COMPLEMENT_DATA_END_DATE); if (startDate == null || endDate == null) { return false; } try { ZonedDateTime start = DateUtils.stringToZoneDateTime(startDate); ZonedDateTime end = DateUtils.stringToZoneDateTime(endDate); if (start == null || end == null) { return false;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,849
[Bug][Api] Complete Data workflow remove duplicates.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When complete data, the income date format is `2022-06-01 00:02:10, 2022-06-01 00:02:10, 2022-06-02 00:02:10`, and there are duplicate scheduling dates. ### What you expected to happen 1.When complementing, scheduling does not allow duplicates. ### How to reproduce 1.run workflow domplete data. 2.enter data format is `2022-06-01 00:02:10, 2022-06-01 00:02:10, 2022-06-02 00:02:10` ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10849
https://github.com/apache/dolphinscheduler/pull/10850
b5653ea7f2d4d14ba92c45e429c2191099450b0f
73f4846c49a95e5e84e3a6b1102c115e4a031c0a
2022-07-08T09:42:24Z
java
2022-07-09T13:29:11Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
} if (start.isAfter(end)) { logger.error("complement data error, wrong date start:{} and end date:{} ", start, end); return false; } } catch (Exception ex) { logger.warn("Parse schedule time error, startDate: {}, endDate: {}", startDate, endDate); return false; } } return true; } /** * @param scheduleTimeList * @return remove duplicate date list */ private String removeDuplicates(String scheduleTimeList) { HashSet<String> removeDate = new HashSet<String>(); List<String> resultList = new ArrayList<String>(); if (StringUtils.isNotEmpty(scheduleTimeList)) { String[] dateArrays = scheduleTimeList.split(COMMA); List<String> dateList = Arrays.asList(dateArrays); removeDate.addAll(dateList); resultList.addAll(removeDate); return String.join(COMMA, resultList); } return null; } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,833
[Bug] [Quartz] timezone display doesn't match the next_fire_time in ds 3.0.0-beta1 version
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When I set the quartz time with UTC timezone first time,the execute time and the next five execute time match right.But the task didn't execute at all.So I went to chekc the dolphinscheduler meta table in mysql.I found three tables which are qrzt_triggers and qrtz_cron_triggers and t_ds_schedules.I found the column NEXT_FIRE_TIME showed the time I had set in qrtz_triggers table.The NEXT_FIRE_TIME showed 1657202700000 which means 2022-07-07 22:05:00,Finally I found the bug.Beacuse the ui diplay didn't mean the real execute time. ![image](https://user-images.githubusercontent.com/21135052/177737948-cca6f985-faac-4663-875f-39e3fa26da81.png) ![image](https://user-images.githubusercontent.com/21135052/177738023-1c64de5b-8863-4291-b138-ee905c2ecf8e.png) ![image](https://user-images.githubusercontent.com/21135052/177737742-f1d791e8-f472-4fae-a8bf-e715b5db7a0f.png) ### What you expected to happen <img width="315" alt="84a91d1d39974b575945674f539e8de" src="https://user-images.githubusercontent.com/21135052/177745159-d205e4bc-6bcb-4600-8fc3-fa7d3c92c984.png"> ### How to reproduce ds 3.0.0-beta1 quartz set module ### Anything else _No response_ ### Version 3.0.0-beta-2 ### Are you willing to submit PR? - [x] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10833
https://github.com/apache/dolphinscheduler/pull/10865
73f4846c49a95e5e84e3a6b1102c115e4a031c0a
030fb89d6e44875d08ff34d3cd99ee475de13f42
2022-07-07T09:17:29Z
java
2022-07-09T14:28:08Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/SchedulerServiceImpl.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.dolphinscheduler.api.service.impl; import org.apache.dolphinscheduler.api.dto.ScheduleParam; import org.apache.dolphinscheduler.api.enums.Status; import org.apache.dolphinscheduler.api.exceptions.ServiceException; import org.apache.dolphinscheduler.api.service.ExecutorService; import org.apache.dolphinscheduler.api.service.MonitorService; import org.apache.dolphinscheduler.api.service.ProjectService; import org.apache.dolphinscheduler.api.service.SchedulerService; import org.apache.dolphinscheduler.api.utils.PageInfo; import org.apache.dolphinscheduler.api.utils.Result; import org.apache.dolphinscheduler.api.vo.ScheduleVo; import org.apache.dolphinscheduler.common.Constants; import org.apache.dolphinscheduler.common.enums.FailureStrategy; import org.apache.dolphinscheduler.common.enums.Priority;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,833
[Bug] [Quartz] timezone display doesn't match the next_fire_time in ds 3.0.0-beta1 version
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When I set the quartz time with UTC timezone first time,the execute time and the next five execute time match right.But the task didn't execute at all.So I went to chekc the dolphinscheduler meta table in mysql.I found three tables which are qrzt_triggers and qrtz_cron_triggers and t_ds_schedules.I found the column NEXT_FIRE_TIME showed the time I had set in qrtz_triggers table.The NEXT_FIRE_TIME showed 1657202700000 which means 2022-07-07 22:05:00,Finally I found the bug.Beacuse the ui diplay didn't mean the real execute time. ![image](https://user-images.githubusercontent.com/21135052/177737948-cca6f985-faac-4663-875f-39e3fa26da81.png) ![image](https://user-images.githubusercontent.com/21135052/177738023-1c64de5b-8863-4291-b138-ee905c2ecf8e.png) ![image](https://user-images.githubusercontent.com/21135052/177737742-f1d791e8-f472-4fae-a8bf-e715b5db7a0f.png) ### What you expected to happen <img width="315" alt="84a91d1d39974b575945674f539e8de" src="https://user-images.githubusercontent.com/21135052/177745159-d205e4bc-6bcb-4600-8fc3-fa7d3c92c984.png"> ### How to reproduce ds 3.0.0-beta1 quartz set module ### Anything else _No response_ ### Version 3.0.0-beta-2 ### Are you willing to submit PR? - [x] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10833
https://github.com/apache/dolphinscheduler/pull/10865
73f4846c49a95e5e84e3a6b1102c115e4a031c0a
030fb89d6e44875d08ff34d3cd99ee475de13f42
2022-07-07T09:17:29Z
java
2022-07-09T14:28:08Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/SchedulerServiceImpl.java
import org.apache.dolphinscheduler.common.enums.ReleaseState; import org.apache.dolphinscheduler.common.enums.UserType; import org.apache.dolphinscheduler.common.enums.WarningType; import org.apache.dolphinscheduler.common.model.Server; import org.apache.dolphinscheduler.common.utils.DateUtils; import org.apache.dolphinscheduler.common.utils.JSONUtils; import org.apache.dolphinscheduler.dao.entity.ProcessDefinition; import org.apache.dolphinscheduler.dao.entity.ProcessTaskRelation; import org.apache.dolphinscheduler.dao.entity.Project; import org.apache.dolphinscheduler.dao.entity.Schedule; import org.apache.dolphinscheduler.dao.entity.User; import org.apache.dolphinscheduler.dao.mapper.ProcessDefinitionMapper; import org.apache.dolphinscheduler.dao.mapper.ProcessTaskRelationMapper; import org.apache.dolphinscheduler.dao.mapper.ProjectMapper; import org.apache.dolphinscheduler.dao.mapper.ScheduleMapper; import org.apache.dolphinscheduler.scheduler.api.SchedulerApi; import org.apache.dolphinscheduler.service.cron.CronUtils; import org.apache.dolphinscheduler.service.exceptions.CronParseException; import org.apache.dolphinscheduler.service.process.ProcessService; import org.apache.commons.lang3.StringUtils; import java.time.ZoneId; import java.time.ZonedDateTime; import java.util.ArrayList; import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.TimeZone; import java.util.stream.Collectors; import org.slf4j.Logger;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,833
[Bug] [Quartz] timezone display doesn't match the next_fire_time in ds 3.0.0-beta1 version
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When I set the quartz time with UTC timezone first time,the execute time and the next five execute time match right.But the task didn't execute at all.So I went to chekc the dolphinscheduler meta table in mysql.I found three tables which are qrzt_triggers and qrtz_cron_triggers and t_ds_schedules.I found the column NEXT_FIRE_TIME showed the time I had set in qrtz_triggers table.The NEXT_FIRE_TIME showed 1657202700000 which means 2022-07-07 22:05:00,Finally I found the bug.Beacuse the ui diplay didn't mean the real execute time. ![image](https://user-images.githubusercontent.com/21135052/177737948-cca6f985-faac-4663-875f-39e3fa26da81.png) ![image](https://user-images.githubusercontent.com/21135052/177738023-1c64de5b-8863-4291-b138-ee905c2ecf8e.png) ![image](https://user-images.githubusercontent.com/21135052/177737742-f1d791e8-f472-4fae-a8bf-e715b5db7a0f.png) ### What you expected to happen <img width="315" alt="84a91d1d39974b575945674f539e8de" src="https://user-images.githubusercontent.com/21135052/177745159-d205e4bc-6bcb-4600-8fc3-fa7d3c92c984.png"> ### How to reproduce ds 3.0.0-beta1 quartz set module ### Anything else _No response_ ### Version 3.0.0-beta-2 ### Are you willing to submit PR? - [x] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10833
https://github.com/apache/dolphinscheduler/pull/10865
73f4846c49a95e5e84e3a6b1102c115e4a031c0a
030fb89d6e44875d08ff34d3cd99ee475de13f42
2022-07-07T09:17:29Z
java
2022-07-09T14:28:08Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/SchedulerServiceImpl.java
import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.cronutils.model.Cron; /** * scheduler service impl */ @Service public class SchedulerServiceImpl extends BaseServiceImpl implements SchedulerService { private static final Logger logger = LoggerFactory.getLogger(SchedulerServiceImpl.class); @Autowired private ProjectService projectService; @Autowired private ExecutorService executorService; @Autowired private MonitorService monitorService; @Autowired private ProcessService processService; @Autowired private ScheduleMapper scheduleMapper; @Autowired private ProjectMapper projectMapper; @Autowired private ProcessDefinitionMapper processDefinitionMapper; @Autowired private SchedulerApi schedulerApi; @Autowired