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
unknown
language
stringclasses
5 values
commit_datetime
unknown
updated_file
stringlengths
7
188
chunk_content
stringlengths
1
1.03M
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,617
[Bug][master] After subtask fault tolerance, 2 task instances are generated,The process instance status always is executing  
Sub-process fault tolerance, two commands: 1.run sub_process workflow 2.stop master 3.start master,2 task instances are generated ![image](https://user-images.githubusercontent.com/55787491/91425464-c288cf00-e88d-11ea-9912-91611d62715b.png) ![image](https://user-images.githubusercontent.com/55787491/91425358-9cfbc580-e88d-11ea-8fad-a80da4d52de8.png) The master log is as follows (master日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424758-cec05c80-e88c-11ea-834a-f44e8f21e36b.png) The worker log is as follows (worker日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424852-eac3fe00-e88c-11ea-9f38-df752c9aad78.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3617
https://github.com/apache/dolphinscheduler/pull/3873
c4be3b57493fe75f5a5dbb9f258a0430d0363cc6
39411ce03b864bc770da220ad6f81df47bd2487b
"2020-08-27T09:48:06Z"
java
"2020-10-10T07:05:56Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
/** * remove task log file * @param processInstanceId processInstanceId */ public void removeTaskLogFile(Integer processInstanceId){ LogClientService logClient = new LogClientService(); List<TaskInstance> taskInstanceList = findValidTaskListByProcessId(processInstanceId); if (CollectionUtils.isEmpty(taskInstanceList)){ return; } for (TaskInstance taskInstance : taskInstanceList){ String taskLogPath = taskInstance.getLogPath(); if (StringUtils.isEmpty(taskInstance.getHost())){ continue; } int port = Constants.RPC_PORT; String ip = ""; try { ip = Host.of(taskInstance.getHost()).getIp(); }catch (Exception e){ ip = taskInstance.getHost(); } logClient.removeTaskLog(ip,port,taskLogPath); } } /** * calculate sub process number in the process define. * @param processDefinitionId processDefinitionId
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,617
[Bug][master] After subtask fault tolerance, 2 task instances are generated,The process instance status always is executing  
Sub-process fault tolerance, two commands: 1.run sub_process workflow 2.stop master 3.start master,2 task instances are generated ![image](https://user-images.githubusercontent.com/55787491/91425464-c288cf00-e88d-11ea-9912-91611d62715b.png) ![image](https://user-images.githubusercontent.com/55787491/91425358-9cfbc580-e88d-11ea-8fad-a80da4d52de8.png) The master log is as follows (master日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424758-cec05c80-e88c-11ea-834a-f44e8f21e36b.png) The worker log is as follows (worker日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424852-eac3fe00-e88c-11ea-9f38-df752c9aad78.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3617
https://github.com/apache/dolphinscheduler/pull/3873
c4be3b57493fe75f5a5dbb9f258a0430d0363cc6
39411ce03b864bc770da220ad6f81df47bd2487b
"2020-08-27T09:48:06Z"
java
"2020-10-10T07:05:56Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
* @return process thread num count */ private Integer workProcessThreadNumCount(Integer processDefinitionId){ List<Integer> ids = new ArrayList<>(); recurseFindSubProcessId(processDefinitionId, ids); return ids.size()+1; } /** * recursive query sub process definition id by parent id. * @param parentId parentId * @param ids ids */ public void recurseFindSubProcessId(int parentId, List<Integer> ids){ ProcessDefinition processDefinition = processDefineMapper.selectById(parentId); String processDefinitionJson = processDefinition.getProcessDefinitionJson(); ProcessData processData = JSONUtils.parseObject(processDefinitionJson, ProcessData.class); List<TaskNode> taskNodeList = processData.getTasks(); if (taskNodeList != null && taskNodeList.size() > 0){ for (TaskNode taskNode : taskNodeList){ String parameter = taskNode.getParams(); ObjectNode parameterJson = JSONUtils.parseObject(parameter); if (parameterJson.get(CMDPARAM_SUB_PROCESS_DEFINE_ID) != null){ SubProcessParameters subProcessParam = JSONUtils.parseObject(parameter, SubProcessParameters.class); ids.add(subProcessParam.getProcessDefinitionId()); recurseFindSubProcessId(subProcessParam.getProcessDefinitionId(),ids); } } } } /**
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,617
[Bug][master] After subtask fault tolerance, 2 task instances are generated,The process instance status always is executing  
Sub-process fault tolerance, two commands: 1.run sub_process workflow 2.stop master 3.start master,2 task instances are generated ![image](https://user-images.githubusercontent.com/55787491/91425464-c288cf00-e88d-11ea-9912-91611d62715b.png) ![image](https://user-images.githubusercontent.com/55787491/91425358-9cfbc580-e88d-11ea-8fad-a80da4d52de8.png) The master log is as follows (master日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424758-cec05c80-e88c-11ea-834a-f44e8f21e36b.png) The worker log is as follows (worker日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424852-eac3fe00-e88c-11ea-9f38-df752c9aad78.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3617
https://github.com/apache/dolphinscheduler/pull/3873
c4be3b57493fe75f5a5dbb9f258a0430d0363cc6
39411ce03b864bc770da220ad6f81df47bd2487b
"2020-08-27T09:48:06Z"
java
"2020-10-10T07:05:56Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
* create recovery waiting thread command when thread pool is not enough for the process instance. * sub work process instance need not to create recovery command. * create recovery waiting thread command and delete origin command at the same time. * if the recovery command is exists, only update the field update_time * @param originCommand originCommand * @param processInstance processInstance */ public void createRecoveryWaitingThreadCommand(Command originCommand, ProcessInstance processInstance) { if(processInstance.getIsSubProcess() == Flag.YES){ if(originCommand != null){ commandMapper.deleteById(originCommand.getId()); } return; } Map<String, String> cmdParam = new HashMap<>(); cmdParam.put(Constants.CMDPARAM_RECOVERY_WAITTING_THREAD, String.valueOf(processInstance.getId())); if(originCommand == null){ Command command = new Command( CommandType.RECOVER_WAITTING_THREAD, processInstance.getTaskDependType(), processInstance.getFailureStrategy(), processInstance.getExecutorId(), processInstance.getProcessDefinitionId(), JSONUtils.toJsonString(cmdParam), processInstance.getWarningType(), processInstance.getWarningGroupId(), processInstance.getScheduleTime(), processInstance.getProcessInstancePriority()
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,617
[Bug][master] After subtask fault tolerance, 2 task instances are generated,The process instance status always is executing  
Sub-process fault tolerance, two commands: 1.run sub_process workflow 2.stop master 3.start master,2 task instances are generated ![image](https://user-images.githubusercontent.com/55787491/91425464-c288cf00-e88d-11ea-9912-91611d62715b.png) ![image](https://user-images.githubusercontent.com/55787491/91425358-9cfbc580-e88d-11ea-8fad-a80da4d52de8.png) The master log is as follows (master日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424758-cec05c80-e88c-11ea-834a-f44e8f21e36b.png) The worker log is as follows (worker日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424852-eac3fe00-e88c-11ea-9f38-df752c9aad78.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3617
https://github.com/apache/dolphinscheduler/pull/3873
c4be3b57493fe75f5a5dbb9f258a0430d0363cc6
39411ce03b864bc770da220ad6f81df47bd2487b
"2020-08-27T09:48:06Z"
java
"2020-10-10T07:05:56Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
); saveCommand(command); return ; } if(originCommand.getCommandType() == CommandType.RECOVER_WAITTING_THREAD){ originCommand.setUpdateTime(new Date()); saveCommand(originCommand); }else{ commandMapper.deleteById(originCommand.getId()); originCommand.setId(0); originCommand.setCommandType(CommandType.RECOVER_WAITTING_THREAD); originCommand.setUpdateTime(new Date()); originCommand.setCommandParam(JSONUtils.toJsonString(cmdParam)); originCommand.setProcessInstancePriority(processInstance.getProcessInstancePriority()); saveCommand(originCommand); } } /** * get schedule time from command * @param command command * @param cmdParam cmdParam map * @return date */ private Date getScheduleTime(Command command, Map<String, String> cmdParam){ Date scheduleTime = command.getScheduleTime(); if(scheduleTime == null){ if(cmdParam != null && cmdParam.containsKey(CMDPARAM_COMPLEMENT_DATA_START_DATE)){ scheduleTime = DateUtils.stringToDate(cmdParam.get(CMDPARAM_COMPLEMENT_DATA_START_DATE));
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,617
[Bug][master] After subtask fault tolerance, 2 task instances are generated,The process instance status always is executing  
Sub-process fault tolerance, two commands: 1.run sub_process workflow 2.stop master 3.start master,2 task instances are generated ![image](https://user-images.githubusercontent.com/55787491/91425464-c288cf00-e88d-11ea-9912-91611d62715b.png) ![image](https://user-images.githubusercontent.com/55787491/91425358-9cfbc580-e88d-11ea-8fad-a80da4d52de8.png) The master log is as follows (master日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424758-cec05c80-e88c-11ea-834a-f44e8f21e36b.png) The worker log is as follows (worker日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424852-eac3fe00-e88c-11ea-9f38-df752c9aad78.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3617
https://github.com/apache/dolphinscheduler/pull/3873
c4be3b57493fe75f5a5dbb9f258a0430d0363cc6
39411ce03b864bc770da220ad6f81df47bd2487b
"2020-08-27T09:48:06Z"
java
"2020-10-10T07:05:56Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
} } return scheduleTime; } /** * generate a new work process instance from command. * @param processDefinition processDefinition * @param command command * @param cmdParam cmdParam map * @return process instance */ private ProcessInstance generateNewProcessInstance(ProcessDefinition processDefinition, Command command, Map<String, String> cmdParam){ ProcessInstance processInstance = new ProcessInstance(processDefinition); processInstance.setState(ExecutionStatus.RUNNING_EXECUTION); processInstance.setRecovery(Flag.NO); processInstance.setStartTime(new Date()); processInstance.setRunTimes(1); processInstance.setMaxTryTimes(0); processInstance.setProcessDefinitionId(command.getProcessDefinitionId()); processInstance.setCommandParam(command.getCommandParam()); processInstance.setCommandType(command.getCommandType()); processInstance.setIsSubProcess(Flag.NO); processInstance.setTaskDependType(command.getTaskDependType()); processInstance.setFailureStrategy(command.getFailureStrategy()); processInstance.setExecutorId(command.getExecutorId()); WarningType warningType = command.getWarningType() == null ? WarningType.NONE : command.getWarningType(); processInstance.setWarningType(warningType); Integer warningGroupId = command.getWarningGroupId() == null ? 0 : command.getWarningGroupId();
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,617
[Bug][master] After subtask fault tolerance, 2 task instances are generated,The process instance status always is executing  
Sub-process fault tolerance, two commands: 1.run sub_process workflow 2.stop master 3.start master,2 task instances are generated ![image](https://user-images.githubusercontent.com/55787491/91425464-c288cf00-e88d-11ea-9912-91611d62715b.png) ![image](https://user-images.githubusercontent.com/55787491/91425358-9cfbc580-e88d-11ea-8fad-a80da4d52de8.png) The master log is as follows (master日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424758-cec05c80-e88c-11ea-834a-f44e8f21e36b.png) The worker log is as follows (worker日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424852-eac3fe00-e88c-11ea-9f38-df752c9aad78.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3617
https://github.com/apache/dolphinscheduler/pull/3873
c4be3b57493fe75f5a5dbb9f258a0430d0363cc6
39411ce03b864bc770da220ad6f81df47bd2487b
"2020-08-27T09:48:06Z"
java
"2020-10-10T07:05:56Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
processInstance.setWarningGroupId(warningGroupId); Date scheduleTime = getScheduleTime(command, cmdParam); if(scheduleTime != null){ processInstance.setScheduleTime(scheduleTime); } processInstance.setCommandStartTime(command.getStartTime()); processInstance.setLocations(processDefinition.getLocations()); processInstance.setConnects(processDefinition.getConnects()); processInstance.setGlobalParams(ParameterUtils.curingGlobalParams( processDefinition.getGlobalParamMap(), processDefinition.getGlobalParamList(), getCommandTypeIfComplement(processInstance, command), processInstance.getScheduleTime())); processInstance.setProcessInstanceJson(processDefinition.getProcessDefinitionJson()); processInstance.setProcessInstancePriority(command.getProcessInstancePriority()); String workerGroup = StringUtils.isBlank(command.getWorkerGroup()) ? Constants.DEFAULT_WORKER_GROUP : command.getWorkerGroup(); processInstance.setWorkerGroup(workerGroup); processInstance.setTimeout(processDefinition.getTimeout()); processInstance.setTenantId(processDefinition.getTenantId()); return processInstance; } /** * get process tenant * there is tenant id in definition, use the tenant of the definition. * if there is not tenant id in the definiton or the tenant not exist * use definition creator's tenant.
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,617
[Bug][master] After subtask fault tolerance, 2 task instances are generated,The process instance status always is executing  
Sub-process fault tolerance, two commands: 1.run sub_process workflow 2.stop master 3.start master,2 task instances are generated ![image](https://user-images.githubusercontent.com/55787491/91425464-c288cf00-e88d-11ea-9912-91611d62715b.png) ![image](https://user-images.githubusercontent.com/55787491/91425358-9cfbc580-e88d-11ea-8fad-a80da4d52de8.png) The master log is as follows (master日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424758-cec05c80-e88c-11ea-834a-f44e8f21e36b.png) The worker log is as follows (worker日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424852-eac3fe00-e88c-11ea-9f38-df752c9aad78.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3617
https://github.com/apache/dolphinscheduler/pull/3873
c4be3b57493fe75f5a5dbb9f258a0430d0363cc6
39411ce03b864bc770da220ad6f81df47bd2487b
"2020-08-27T09:48:06Z"
java
"2020-10-10T07:05:56Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
* @param tenantId tenantId * @param userId userId * @return tenant */ public Tenant getTenantForProcess(int tenantId, int userId){ Tenant tenant = null; if(tenantId >= 0){ tenant = tenantMapper.queryById(tenantId); } if (userId == 0){ return null; } if(tenant == null){ User user = userMapper.selectById(userId); tenant = tenantMapper.queryById(user.getTenantId()); } return tenant; } /** * check command parameters is valid * @param command command * @param cmdParam cmdParam map * @return whether command param is valid */ private Boolean checkCmdParam(Command command, Map<String, String> cmdParam){ if(command.getTaskDependType() == TaskDependType.TASK_ONLY || command.getTaskDependType()== TaskDependType.TASK_PRE){ if(cmdParam == null || !cmdParam.containsKey(Constants.CMDPARAM_START_NODE_NAMES) || cmdParam.get(Constants.CMDPARAM_START_NODE_NAMES).isEmpty()){ logger.error("command node depend type is {}, but start nodes is null ", command.getTaskDependType());
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,617
[Bug][master] After subtask fault tolerance, 2 task instances are generated,The process instance status always is executing  
Sub-process fault tolerance, two commands: 1.run sub_process workflow 2.stop master 3.start master,2 task instances are generated ![image](https://user-images.githubusercontent.com/55787491/91425464-c288cf00-e88d-11ea-9912-91611d62715b.png) ![image](https://user-images.githubusercontent.com/55787491/91425358-9cfbc580-e88d-11ea-8fad-a80da4d52de8.png) The master log is as follows (master日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424758-cec05c80-e88c-11ea-834a-f44e8f21e36b.png) The worker log is as follows (worker日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424852-eac3fe00-e88c-11ea-9f38-df752c9aad78.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3617
https://github.com/apache/dolphinscheduler/pull/3873
c4be3b57493fe75f5a5dbb9f258a0430d0363cc6
39411ce03b864bc770da220ad6f81df47bd2487b
"2020-08-27T09:48:06Z"
java
"2020-10-10T07:05:56Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
return false; } } return true; } /** * construct process instance according to one command. * @param command command * @param host host * @return process instance */ private ProcessInstance constructProcessInstance(Command command, String host){ ProcessInstance processInstance = null; CommandType commandType = command.getCommandType(); Map<String, String> cmdParam = JSONUtils.toMap(command.getCommandParam()); ProcessDefinition processDefinition = null; if(command.getProcessDefinitionId() != 0){ processDefinition = processDefineMapper.selectById(command.getProcessDefinitionId()); if(processDefinition == null){ logger.error("cannot find the work process define! define id : {}", command.getProcessDefinitionId()); return null; } } if(cmdParam != null ){ Integer processInstanceId = 0; if(cmdParam.containsKey(Constants.CMDPARAM_RECOVER_PROCESS_ID_STRING)) { String processId = cmdParam.get(Constants.CMDPARAM_RECOVER_PROCESS_ID_STRING); processInstanceId = Integer.parseInt(processId); if (processInstanceId == 0) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,617
[Bug][master] After subtask fault tolerance, 2 task instances are generated,The process instance status always is executing  
Sub-process fault tolerance, two commands: 1.run sub_process workflow 2.stop master 3.start master,2 task instances are generated ![image](https://user-images.githubusercontent.com/55787491/91425464-c288cf00-e88d-11ea-9912-91611d62715b.png) ![image](https://user-images.githubusercontent.com/55787491/91425358-9cfbc580-e88d-11ea-8fad-a80da4d52de8.png) The master log is as follows (master日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424758-cec05c80-e88c-11ea-834a-f44e8f21e36b.png) The worker log is as follows (worker日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424852-eac3fe00-e88c-11ea-9f38-df752c9aad78.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3617
https://github.com/apache/dolphinscheduler/pull/3873
c4be3b57493fe75f5a5dbb9f258a0430d0363cc6
39411ce03b864bc770da220ad6f81df47bd2487b
"2020-08-27T09:48:06Z"
java
"2020-10-10T07:05:56Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
logger.error("command parameter is error, [ ProcessInstanceId ] is 0"); return null; } }else if(cmdParam.containsKey(Constants.CMDPARAM_SUB_PROCESS)){ String pId = cmdParam.get(Constants.CMDPARAM_SUB_PROCESS); processInstanceId = Integer.parseInt(pId); }else if(cmdParam.containsKey(Constants.CMDPARAM_RECOVERY_WAITTING_THREAD)){ String pId = cmdParam.get(Constants.CMDPARAM_RECOVERY_WAITTING_THREAD); processInstanceId = Integer.parseInt(pId); } if(processInstanceId ==0){ processInstance = generateNewProcessInstance(processDefinition, command, cmdParam); }else{ processInstance = this.findProcessInstanceDetailById(processInstanceId); } processDefinition = processDefineMapper.selectById(processInstance.getProcessDefinitionId()); processInstance.setProcessDefinition(processDefinition); if(processInstance.getCommandParam() != null){ Map<String, String> processCmdParam = JSONUtils.toMap(processInstance.getCommandParam()); for(Map.Entry<String, String> entry: processCmdParam.entrySet()) { if(!cmdParam.containsKey(entry.getKey())){ cmdParam.put(entry.getKey(), entry.getValue()); } } } if(cmdParam.containsKey(Constants.CMDPARAM_SUB_PROCESS)){
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,617
[Bug][master] After subtask fault tolerance, 2 task instances are generated,The process instance status always is executing  
Sub-process fault tolerance, two commands: 1.run sub_process workflow 2.stop master 3.start master,2 task instances are generated ![image](https://user-images.githubusercontent.com/55787491/91425464-c288cf00-e88d-11ea-9912-91611d62715b.png) ![image](https://user-images.githubusercontent.com/55787491/91425358-9cfbc580-e88d-11ea-8fad-a80da4d52de8.png) The master log is as follows (master日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424758-cec05c80-e88c-11ea-834a-f44e8f21e36b.png) The worker log is as follows (worker日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424852-eac3fe00-e88c-11ea-9f38-df752c9aad78.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3617
https://github.com/apache/dolphinscheduler/pull/3873
c4be3b57493fe75f5a5dbb9f258a0430d0363cc6
39411ce03b864bc770da220ad6f81df47bd2487b
"2020-08-27T09:48:06Z"
java
"2020-10-10T07:05:56Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
processInstance.setCommandParam(command.getCommandParam()); } }else{ processInstance = generateNewProcessInstance(processDefinition, command, cmdParam); } if(!checkCmdParam(command, cmdParam)){ logger.error("command parameter check failed!"); return null; } if(command.getScheduleTime() != null){ processInstance.setScheduleTime(command.getScheduleTime()); } processInstance.setHost(host); ExecutionStatus runStatus = ExecutionStatus.RUNNING_EXECUTION; int runTime = processInstance.getRunTimes(); switch (commandType){ case START_PROCESS: break; case START_FAILURE_TASK_PROCESS: List<Integer> failedList = this.findTaskIdByInstanceState(processInstance.getId(), ExecutionStatus.FAILURE); List<Integer> toleranceList = this.findTaskIdByInstanceState(processInstance.getId(), ExecutionStatus.NEED_FAULT_TOLERANCE); List<Integer> killedList = this.findTaskIdByInstanceState(processInstance.getId(), ExecutionStatus.KILL); cmdParam.remove(Constants.CMDPARAM_RECOVERY_START_NODE_STRING); failedList.addAll(killedList); failedList.addAll(toleranceList); for(Integer taskId : failedList){ initTaskInstance(this.findTaskInstanceById(taskId)); }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,617
[Bug][master] After subtask fault tolerance, 2 task instances are generated,The process instance status always is executing  
Sub-process fault tolerance, two commands: 1.run sub_process workflow 2.stop master 3.start master,2 task instances are generated ![image](https://user-images.githubusercontent.com/55787491/91425464-c288cf00-e88d-11ea-9912-91611d62715b.png) ![image](https://user-images.githubusercontent.com/55787491/91425358-9cfbc580-e88d-11ea-8fad-a80da4d52de8.png) The master log is as follows (master日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424758-cec05c80-e88c-11ea-834a-f44e8f21e36b.png) The worker log is as follows (worker日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424852-eac3fe00-e88c-11ea-9f38-df752c9aad78.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3617
https://github.com/apache/dolphinscheduler/pull/3873
c4be3b57493fe75f5a5dbb9f258a0430d0363cc6
39411ce03b864bc770da220ad6f81df47bd2487b
"2020-08-27T09:48:06Z"
java
"2020-10-10T07:05:56Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
cmdParam.put(Constants.CMDPARAM_RECOVERY_START_NODE_STRING, String.join(Constants.COMMA, convertIntListToString(failedList))); processInstance.setCommandParam(JSONUtils.toJsonString(cmdParam)); processInstance.setRunTimes(runTime +1 ); break; case START_CURRENT_TASK_PROCESS: break; case RECOVER_WAITTING_THREAD: break; case RECOVER_SUSPENDED_PROCESS: cmdParam.remove(Constants.CMDPARAM_RECOVERY_START_NODE_STRING); List<Integer> suspendedNodeList = this.findTaskIdByInstanceState(processInstance.getId(), ExecutionStatus.PAUSE); List<Integer> stopNodeList = findTaskIdByInstanceState(processInstance.getId(), ExecutionStatus.KILL); suspendedNodeList.addAll(stopNodeList); for(Integer taskId : suspendedNodeList){ initTaskInstance(this.findTaskInstanceById(taskId)); } cmdParam.put(Constants.CMDPARAM_RECOVERY_START_NODE_STRING, String.join(",", convertIntListToString(suspendedNodeList))); processInstance.setCommandParam(JSONUtils.toJsonString(cmdParam)); processInstance.setRunTimes(runTime +1); break; case RECOVER_TOLERANCE_FAULT_PROCESS: processInstance.setRecovery(Flag.YES); runStatus = processInstance.getState(); break; case COMPLEMENT_DATA:
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,617
[Bug][master] After subtask fault tolerance, 2 task instances are generated,The process instance status always is executing  
Sub-process fault tolerance, two commands: 1.run sub_process workflow 2.stop master 3.start master,2 task instances are generated ![image](https://user-images.githubusercontent.com/55787491/91425464-c288cf00-e88d-11ea-9912-91611d62715b.png) ![image](https://user-images.githubusercontent.com/55787491/91425358-9cfbc580-e88d-11ea-8fad-a80da4d52de8.png) The master log is as follows (master日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424758-cec05c80-e88c-11ea-834a-f44e8f21e36b.png) The worker log is as follows (worker日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424852-eac3fe00-e88c-11ea-9f38-df752c9aad78.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3617
https://github.com/apache/dolphinscheduler/pull/3873
c4be3b57493fe75f5a5dbb9f258a0430d0363cc6
39411ce03b864bc770da220ad6f81df47bd2487b
"2020-08-27T09:48:06Z"
java
"2020-10-10T07:05:56Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
List<TaskInstance> taskInstanceList = this.findValidTaskListByProcessId(processInstance.getId()); for(TaskInstance taskInstance : taskInstanceList){ taskInstance.setFlag(Flag.NO); this.updateTaskInstance(taskInstance); } initComplementDataParam(processDefinition, processInstance, cmdParam); break; case REPEAT_RUNNING: if(cmdParam.containsKey(Constants.CMDPARAM_RECOVERY_START_NODE_STRING)){ cmdParam.remove(Constants.CMDPARAM_RECOVERY_START_NODE_STRING); processInstance.setCommandParam(JSONUtils.toJsonString(cmdParam)); } List<TaskInstance> validTaskList = findValidTaskListByProcessId(processInstance.getId()); for(TaskInstance taskInstance : validTaskList){ taskInstance.setFlag(Flag.NO); updateTaskInstance(taskInstance); } processInstance.setStartTime(new Date()); processInstance.setEndTime(null); processInstance.setRunTimes(runTime +1); initComplementDataParam(processDefinition, processInstance, cmdParam); break; case SCHEDULER: break; default: break; }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,617
[Bug][master] After subtask fault tolerance, 2 task instances are generated,The process instance status always is executing  
Sub-process fault tolerance, two commands: 1.run sub_process workflow 2.stop master 3.start master,2 task instances are generated ![image](https://user-images.githubusercontent.com/55787491/91425464-c288cf00-e88d-11ea-9912-91611d62715b.png) ![image](https://user-images.githubusercontent.com/55787491/91425358-9cfbc580-e88d-11ea-8fad-a80da4d52de8.png) The master log is as follows (master日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424758-cec05c80-e88c-11ea-834a-f44e8f21e36b.png) The worker log is as follows (worker日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424852-eac3fe00-e88c-11ea-9f38-df752c9aad78.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3617
https://github.com/apache/dolphinscheduler/pull/3873
c4be3b57493fe75f5a5dbb9f258a0430d0363cc6
39411ce03b864bc770da220ad6f81df47bd2487b
"2020-08-27T09:48:06Z"
java
"2020-10-10T07:05:56Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
processInstance.setState(runStatus); return processInstance; } /** * return complement data if the process start with complement data * @param processInstance processInstance * @param command command * @return command type */ private CommandType getCommandTypeIfComplement(ProcessInstance processInstance, Command command){ if(CommandType.COMPLEMENT_DATA == processInstance.getCmdTypeIfComplement()){ return CommandType.COMPLEMENT_DATA; }else{ return command.getCommandType(); } } /** * initialize complement data parameters * @param processDefinition processDefinition * @param processInstance processInstance * @param cmdParam cmdParam */ private void initComplementDataParam(ProcessDefinition processDefinition, ProcessInstance processInstance, Map<String, String> cmdParam) { if(!processInstance.isComplementData()){ return; } Date startComplementTime = DateUtils.parse(cmdParam.get(CMDPARAM_COMPLEMENT_DATA_START_DATE), YYYY_MM_DD_HH_MM_SS);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,617
[Bug][master] After subtask fault tolerance, 2 task instances are generated,The process instance status always is executing  
Sub-process fault tolerance, two commands: 1.run sub_process workflow 2.stop master 3.start master,2 task instances are generated ![image](https://user-images.githubusercontent.com/55787491/91425464-c288cf00-e88d-11ea-9912-91611d62715b.png) ![image](https://user-images.githubusercontent.com/55787491/91425358-9cfbc580-e88d-11ea-8fad-a80da4d52de8.png) The master log is as follows (master日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424758-cec05c80-e88c-11ea-834a-f44e8f21e36b.png) The worker log is as follows (worker日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424852-eac3fe00-e88c-11ea-9f38-df752c9aad78.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3617
https://github.com/apache/dolphinscheduler/pull/3873
c4be3b57493fe75f5a5dbb9f258a0430d0363cc6
39411ce03b864bc770da220ad6f81df47bd2487b
"2020-08-27T09:48:06Z"
java
"2020-10-10T07:05:56Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
if(Flag.NO == processInstance.getIsSubProcess()) { processInstance.setScheduleTime(startComplementTime); } processInstance.setGlobalParams(ParameterUtils.curingGlobalParams( processDefinition.getGlobalParamMap(), processDefinition.getGlobalParamList(), CommandType.COMPLEMENT_DATA, processInstance.getScheduleTime())); } /** * set sub work process parameters. * handle sub work process instance, update relation table and command parameters * set sub work process flag, extends parent work process command parameters * @param subProcessInstance subProcessInstance * @return process instance */ public ProcessInstance setSubProcessParam(ProcessInstance subProcessInstance){ String cmdParam = subProcessInstance.getCommandParam(); if(StringUtils.isEmpty(cmdParam)){ return subProcessInstance; } Map<String, String> paramMap = JSONUtils.toMap(cmdParam); if(paramMap.containsKey(CMDPARAM_SUB_PROCESS) && CMDPARAM_EMPTY_SUB_PROCESS.equals(paramMap.get(CMDPARAM_SUB_PROCESS))){ paramMap.remove(CMDPARAM_SUB_PROCESS); paramMap.put(CMDPARAM_SUB_PROCESS, String.valueOf(subProcessInstance.getId())); subProcessInstance.setCommandParam(JSONUtils.toJsonString(paramMap)); subProcessInstance.setIsSubProcess(Flag.YES); this.saveProcessInstance(subProcessInstance); }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,617
[Bug][master] After subtask fault tolerance, 2 task instances are generated,The process instance status always is executing  
Sub-process fault tolerance, two commands: 1.run sub_process workflow 2.stop master 3.start master,2 task instances are generated ![image](https://user-images.githubusercontent.com/55787491/91425464-c288cf00-e88d-11ea-9912-91611d62715b.png) ![image](https://user-images.githubusercontent.com/55787491/91425358-9cfbc580-e88d-11ea-8fad-a80da4d52de8.png) The master log is as follows (master日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424758-cec05c80-e88c-11ea-834a-f44e8f21e36b.png) The worker log is as follows (worker日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424852-eac3fe00-e88c-11ea-9f38-df752c9aad78.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3617
https://github.com/apache/dolphinscheduler/pull/3873
c4be3b57493fe75f5a5dbb9f258a0430d0363cc6
39411ce03b864bc770da220ad6f81df47bd2487b
"2020-08-27T09:48:06Z"
java
"2020-10-10T07:05:56Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
String parentInstanceId = paramMap.get(CMDPARAM_SUB_PROCESS_PARENT_INSTANCE_ID); if(StringUtils.isNotEmpty(parentInstanceId)){ ProcessInstance parentInstance = findProcessInstanceDetailById(Integer.parseInt(parentInstanceId)); if(parentInstance != null){ subProcessInstance.setGlobalParams( joinGlobalParams(parentInstance.getGlobalParams(), subProcessInstance.getGlobalParams())); this.saveProcessInstance(subProcessInstance); }else{ logger.error("sub process command params error, cannot find parent instance: {} ", cmdParam); } } ProcessInstanceMap processInstanceMap = JSONUtils.parseObject(cmdParam, ProcessInstanceMap.class); if(processInstanceMap == null || processInstanceMap.getParentProcessInstanceId() == 0){ return subProcessInstance; } processInstanceMap.setProcessInstanceId(subProcessInstance.getId()); this.updateWorkProcessInstanceMap(processInstanceMap); return subProcessInstance; } /** * join parent global params into sub process. * only the keys doesn't in sub process global would be joined. * @param parentGlobalParams parentGlobalParams * @param subGlobalParams subGlobalParams * @return global params join */ private String joinGlobalParams(String parentGlobalParams, String subGlobalParams){ List<Property> parentPropertyList = JSONUtils.toList(parentGlobalParams, Property.class);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,617
[Bug][master] After subtask fault tolerance, 2 task instances are generated,The process instance status always is executing  
Sub-process fault tolerance, two commands: 1.run sub_process workflow 2.stop master 3.start master,2 task instances are generated ![image](https://user-images.githubusercontent.com/55787491/91425464-c288cf00-e88d-11ea-9912-91611d62715b.png) ![image](https://user-images.githubusercontent.com/55787491/91425358-9cfbc580-e88d-11ea-8fad-a80da4d52de8.png) The master log is as follows (master日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424758-cec05c80-e88c-11ea-834a-f44e8f21e36b.png) The worker log is as follows (worker日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424852-eac3fe00-e88c-11ea-9f38-df752c9aad78.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3617
https://github.com/apache/dolphinscheduler/pull/3873
c4be3b57493fe75f5a5dbb9f258a0430d0363cc6
39411ce03b864bc770da220ad6f81df47bd2487b
"2020-08-27T09:48:06Z"
java
"2020-10-10T07:05:56Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
List<Property> subPropertyList = JSONUtils.toList(subGlobalParams, Property.class); Map<String,String> subMap = subPropertyList.stream().collect(Collectors.toMap(Property::getProp, Property::getValue)); for(Property parent : parentPropertyList){ if(!subMap.containsKey(parent.getProp())){ subPropertyList.add(parent); } } return JSONUtils.toJsonString(subPropertyList); } /** * initialize task instance * @param taskInstance taskInstance */ private void initTaskInstance(TaskInstance taskInstance){ if(!taskInstance.isSubProcess()){ if(taskInstance.getState().typeIsCancel() || taskInstance.getState().typeIsFailure()){ taskInstance.setFlag(Flag.NO); updateTaskInstance(taskInstance); return; } } taskInstance.setState(ExecutionStatus.SUBMITTED_SUCCESS); updateTaskInstance(taskInstance); } /** * submit task to db * submit sub process to command * @param taskInstance taskInstance * @return task instance */
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,617
[Bug][master] After subtask fault tolerance, 2 task instances are generated,The process instance status always is executing  
Sub-process fault tolerance, two commands: 1.run sub_process workflow 2.stop master 3.start master,2 task instances are generated ![image](https://user-images.githubusercontent.com/55787491/91425464-c288cf00-e88d-11ea-9912-91611d62715b.png) ![image](https://user-images.githubusercontent.com/55787491/91425358-9cfbc580-e88d-11ea-8fad-a80da4d52de8.png) The master log is as follows (master日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424758-cec05c80-e88c-11ea-834a-f44e8f21e36b.png) The worker log is as follows (worker日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424852-eac3fe00-e88c-11ea-9f38-df752c9aad78.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3617
https://github.com/apache/dolphinscheduler/pull/3873
c4be3b57493fe75f5a5dbb9f258a0430d0363cc6
39411ce03b864bc770da220ad6f81df47bd2487b
"2020-08-27T09:48:06Z"
java
"2020-10-10T07:05:56Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
@Transactional(rollbackFor = RuntimeException.class) public TaskInstance submitTask(TaskInstance taskInstance){ ProcessInstance processInstance = this.findProcessInstanceDetailById(taskInstance.getProcessInstanceId()); logger.info("start submit task : {}, instance id:{}, state: {}", taskInstance.getName(), taskInstance.getProcessInstanceId(), processInstance.getState()); TaskInstance task = submitTaskInstanceToDB(taskInstance, processInstance); if(task == null){ logger.error("end submit task to db error, task name:{}, process id:{} state: {} ", taskInstance.getName(), taskInstance.getProcessInstance(), processInstance.getState()); return task; } if(!task.getState().typeIsFinished()){ createSubWorkProcessCommand(processInstance, task); } logger.info("end submit task to db successfully:{} state:{} complete, instance id:{} state: {} ", taskInstance.getName(), task.getState(), processInstance.getId(), processInstance.getState()); return task; } /** * set work process instance map * @param parentInstance parentInstance * @param parentTask parentTask * @return process instance map */ private ProcessInstanceMap setProcessInstanceMap(ProcessInstance parentInstance, TaskInstance parentTask){ ProcessInstanceMap processMap = findWorkProcessMapByParent(parentInstance.getId(), parentTask.getId()); if(processMap != null){ return processMap; }else if(parentInstance.getCommandType() == CommandType.REPEAT_RUNNING
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,617
[Bug][master] After subtask fault tolerance, 2 task instances are generated,The process instance status always is executing  
Sub-process fault tolerance, two commands: 1.run sub_process workflow 2.stop master 3.start master,2 task instances are generated ![image](https://user-images.githubusercontent.com/55787491/91425464-c288cf00-e88d-11ea-9912-91611d62715b.png) ![image](https://user-images.githubusercontent.com/55787491/91425358-9cfbc580-e88d-11ea-8fad-a80da4d52de8.png) The master log is as follows (master日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424758-cec05c80-e88c-11ea-834a-f44e8f21e36b.png) The worker log is as follows (worker日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424852-eac3fe00-e88c-11ea-9f38-df752c9aad78.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3617
https://github.com/apache/dolphinscheduler/pull/3873
c4be3b57493fe75f5a5dbb9f258a0430d0363cc6
39411ce03b864bc770da220ad6f81df47bd2487b
"2020-08-27T09:48:06Z"
java
"2020-10-10T07:05:56Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
|| parentInstance.isComplementData()){ processMap = findPreviousTaskProcessMap(parentInstance, parentTask); if(processMap!= null){ processMap.setParentTaskInstanceId(parentTask.getId()); updateWorkProcessInstanceMap(processMap); return processMap; } } processMap = new ProcessInstanceMap(); processMap.setParentProcessInstanceId(parentInstance.getId()); processMap.setParentTaskInstanceId(parentTask.getId()); createWorkProcessInstanceMap(processMap); return processMap; } /** * find previous task work process map. * @param parentProcessInstance parentProcessInstance * @param parentTask parentTask * @return process instance map */ private ProcessInstanceMap findPreviousTaskProcessMap(ProcessInstance parentProcessInstance, TaskInstance parentTask) { Integer preTaskId = 0; List<TaskInstance> preTaskList = this.findPreviousTaskListByWorkProcessId(parentProcessInstance.getId()); for(TaskInstance task : preTaskList){ if(task.getName().equals(parentTask.getName())){ preTaskId = task.getId();
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,617
[Bug][master] After subtask fault tolerance, 2 task instances are generated,The process instance status always is executing  
Sub-process fault tolerance, two commands: 1.run sub_process workflow 2.stop master 3.start master,2 task instances are generated ![image](https://user-images.githubusercontent.com/55787491/91425464-c288cf00-e88d-11ea-9912-91611d62715b.png) ![image](https://user-images.githubusercontent.com/55787491/91425358-9cfbc580-e88d-11ea-8fad-a80da4d52de8.png) The master log is as follows (master日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424758-cec05c80-e88c-11ea-834a-f44e8f21e36b.png) The worker log is as follows (worker日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424852-eac3fe00-e88c-11ea-9f38-df752c9aad78.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3617
https://github.com/apache/dolphinscheduler/pull/3873
c4be3b57493fe75f5a5dbb9f258a0430d0363cc6
39411ce03b864bc770da220ad6f81df47bd2487b
"2020-08-27T09:48:06Z"
java
"2020-10-10T07:05:56Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
ProcessInstanceMap map = findWorkProcessMapByParent(parentProcessInstance.getId(), preTaskId); if(map!=null){ return map; } } } logger.info("sub process instance is not found,parent task:{},parent instance:{}", parentTask.getId(), parentProcessInstance.getId()); return null; } /** * create sub work process command * @param parentProcessInstance parentProcessInstance * @param task task */ private void createSubWorkProcessCommand(ProcessInstance parentProcessInstance, TaskInstance task){ if(!task.isSubProcess()){ return; } ProcessInstanceMap instanceMap = setProcessInstanceMap(parentProcessInstance, task); TaskNode taskNode = JSONUtils.parseObject(task.getTaskJson(), TaskNode.class); Map<String, String> subProcessParam = JSONUtils.toMap(taskNode.getParams()); Integer childDefineId = Integer.parseInt(subProcessParam.get(Constants.CMDPARAM_SUB_PROCESS_DEFINE_ID)); ProcessInstance childInstance = findSubProcessInstance(parentProcessInstance.getId(), task.getId()); CommandType fatherType = parentProcessInstance.getCommandType(); CommandType commandType = fatherType; if(childInstance == null){ String fatherHistoryCommand = parentProcessInstance.getHistoryCmd();
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,617
[Bug][master] After subtask fault tolerance, 2 task instances are generated,The process instance status always is executing  
Sub-process fault tolerance, two commands: 1.run sub_process workflow 2.stop master 3.start master,2 task instances are generated ![image](https://user-images.githubusercontent.com/55787491/91425464-c288cf00-e88d-11ea-9912-91611d62715b.png) ![image](https://user-images.githubusercontent.com/55787491/91425358-9cfbc580-e88d-11ea-8fad-a80da4d52de8.png) The master log is as follows (master日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424758-cec05c80-e88c-11ea-834a-f44e8f21e36b.png) The worker log is as follows (worker日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424852-eac3fe00-e88c-11ea-9f38-df752c9aad78.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3617
https://github.com/apache/dolphinscheduler/pull/3873
c4be3b57493fe75f5a5dbb9f258a0430d0363cc6
39411ce03b864bc770da220ad6f81df47bd2487b
"2020-08-27T09:48:06Z"
java
"2020-10-10T07:05:56Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
if(fatherHistoryCommand.startsWith(CommandType.SCHEDULER.toString()) || fatherHistoryCommand.startsWith(CommandType.COMPLEMENT_DATA.toString())){ commandType = CommandType.valueOf(fatherHistoryCommand.split(Constants.COMMA)[0]); } } if(childInstance != null){ childInstance.setState(ExecutionStatus.SUBMITTED_SUCCESS); updateProcessInstance(childInstance); } String processMapStr = JSONUtils.toJsonString(instanceMap); Map<String, String> cmdParam = JSONUtils.toMap(processMapStr); if(commandType == CommandType.COMPLEMENT_DATA || (childInstance != null && childInstance.isComplementData())){ Map<String, String> parentParam = JSONUtils.toMap(parentProcessInstance.getCommandParam()); String endTime = parentParam.get(CMDPARAM_COMPLEMENT_DATA_END_DATE); String startTime = parentParam.get(CMDPARAM_COMPLEMENT_DATA_START_DATE); cmdParam.put(CMDPARAM_COMPLEMENT_DATA_END_DATE, endTime); cmdParam.put(CMDPARAM_COMPLEMENT_DATA_START_DATE, startTime); processMapStr = JSONUtils.toJsonString(cmdParam); } updateSubProcessDefinitionByParent(parentProcessInstance, childDefineId); Command command = new Command(); command.setWarningType(parentProcessInstance.getWarningType()); command.setWarningGroupId(parentProcessInstance.getWarningGroupId()); command.setFailureStrategy(parentProcessInstance.getFailureStrategy()); command.setProcessDefinitionId(childDefineId); command.setScheduleTime(parentProcessInstance.getScheduleTime()); command.setExecutorId(parentProcessInstance.getExecutorId());
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,617
[Bug][master] After subtask fault tolerance, 2 task instances are generated,The process instance status always is executing  
Sub-process fault tolerance, two commands: 1.run sub_process workflow 2.stop master 3.start master,2 task instances are generated ![image](https://user-images.githubusercontent.com/55787491/91425464-c288cf00-e88d-11ea-9912-91611d62715b.png) ![image](https://user-images.githubusercontent.com/55787491/91425358-9cfbc580-e88d-11ea-8fad-a80da4d52de8.png) The master log is as follows (master日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424758-cec05c80-e88c-11ea-834a-f44e8f21e36b.png) The worker log is as follows (worker日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424852-eac3fe00-e88c-11ea-9f38-df752c9aad78.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3617
https://github.com/apache/dolphinscheduler/pull/3873
c4be3b57493fe75f5a5dbb9f258a0430d0363cc6
39411ce03b864bc770da220ad6f81df47bd2487b
"2020-08-27T09:48:06Z"
java
"2020-10-10T07:05:56Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
command.setCommandParam(processMapStr); command.setCommandType(commandType); command.setProcessInstancePriority(parentProcessInstance.getProcessInstancePriority()); command.setWorkerGroup(parentProcessInstance.getWorkerGroup()); createCommand(command); logger.info("sub process command created: {} ", command.toString()); } /** * update sub process definition * @param parentProcessInstance parentProcessInstance * @param childDefinitionId childDefinitionId */ private void updateSubProcessDefinitionByParent(ProcessInstance parentProcessInstance, int childDefinitionId) { ProcessDefinition fatherDefinition = this.findProcessDefineById(parentProcessInstance.getProcessDefinitionId()); ProcessDefinition childDefinition = this.findProcessDefineById(childDefinitionId); if(childDefinition != null && fatherDefinition != null){ childDefinition.setReceivers(fatherDefinition.getReceivers()); childDefinition.setReceiversCc(fatherDefinition.getReceiversCc()); processDefineMapper.updateById(childDefinition); } } /** * submit task to mysql * @param taskInstance taskInstance * @param processInstance processInstance * @return task instance */ public TaskInstance submitTaskInstanceToDB(TaskInstance taskInstance, ProcessInstance processInstance){ ExecutionStatus processInstanceState = processInstance.getState(); if(taskInstance.getState().typeIsFailure()){
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,617
[Bug][master] After subtask fault tolerance, 2 task instances are generated,The process instance status always is executing  
Sub-process fault tolerance, two commands: 1.run sub_process workflow 2.stop master 3.start master,2 task instances are generated ![image](https://user-images.githubusercontent.com/55787491/91425464-c288cf00-e88d-11ea-9912-91611d62715b.png) ![image](https://user-images.githubusercontent.com/55787491/91425358-9cfbc580-e88d-11ea-8fad-a80da4d52de8.png) The master log is as follows (master日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424758-cec05c80-e88c-11ea-834a-f44e8f21e36b.png) The worker log is as follows (worker日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424852-eac3fe00-e88c-11ea-9f38-df752c9aad78.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3617
https://github.com/apache/dolphinscheduler/pull/3873
c4be3b57493fe75f5a5dbb9f258a0430d0363cc6
39411ce03b864bc770da220ad6f81df47bd2487b
"2020-08-27T09:48:06Z"
java
"2020-10-10T07:05:56Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
if(taskInstance.isSubProcess()){ taskInstance.setRetryTimes(taskInstance.getRetryTimes() + 1 ); }else { if( processInstanceState != ExecutionStatus.READY_STOP && processInstanceState != ExecutionStatus.READY_PAUSE){ taskInstance.setFlag(Flag.NO); updateTaskInstance(taskInstance); if(taskInstance.getState() != ExecutionStatus.NEED_FAULT_TOLERANCE){ taskInstance.setRetryTimes(taskInstance.getRetryTimes() + 1 ); } taskInstance.setSubmitTime(null); taskInstance.setStartTime(null); taskInstance.setEndTime(null); taskInstance.setFlag(Flag.YES); taskInstance.setHost(null); taskInstance.setId(0); } } } taskInstance.setExecutorId(processInstance.getExecutorId()); taskInstance.setProcessInstancePriority(processInstance.getProcessInstancePriority()); taskInstance.setState(getSubmitTaskState(taskInstance, processInstanceState)); if (taskInstance.getSubmitTime() == null) { taskInstance.setSubmitTime(new Date()); } if (taskInstance.getFirstSubmitTime() == null) { taskInstance.setFirstSubmitTime(taskInstance.getSubmitTime()); }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,617
[Bug][master] After subtask fault tolerance, 2 task instances are generated,The process instance status always is executing  
Sub-process fault tolerance, two commands: 1.run sub_process workflow 2.stop master 3.start master,2 task instances are generated ![image](https://user-images.githubusercontent.com/55787491/91425464-c288cf00-e88d-11ea-9912-91611d62715b.png) ![image](https://user-images.githubusercontent.com/55787491/91425358-9cfbc580-e88d-11ea-8fad-a80da4d52de8.png) The master log is as follows (master日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424758-cec05c80-e88c-11ea-834a-f44e8f21e36b.png) The worker log is as follows (worker日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424852-eac3fe00-e88c-11ea-9f38-df752c9aad78.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3617
https://github.com/apache/dolphinscheduler/pull/3873
c4be3b57493fe75f5a5dbb9f258a0430d0363cc6
39411ce03b864bc770da220ad6f81df47bd2487b
"2020-08-27T09:48:06Z"
java
"2020-10-10T07:05:56Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
boolean saveResult = saveTaskInstance(taskInstance); if(!saveResult){ return null; } return taskInstance; } /** * ${processInstancePriority}_${processInstanceId}_${taskInstancePriority}_${taskInstanceId}_${task executed by ip1},${ip2}... * The tasks with the highest priority are selected by comparing the priorities of the above four levels from high to low. * @param taskInstance taskInstance * @return task zk queue str */ public String taskZkInfo(TaskInstance taskInstance) { String taskWorkerGroup = getTaskWorkerGroup(taskInstance); ProcessInstance processInstance = this.findProcessInstanceById(taskInstance.getProcessInstanceId()); if(processInstance == null){ logger.error("process instance is null. please check the task info, task id: " + taskInstance.getId()); return ""; } StringBuilder sb = new StringBuilder(100); sb.append(processInstance.getProcessInstancePriority().ordinal()).append(Constants.UNDERLINE) .append(taskInstance.getProcessInstanceId()).append(Constants.UNDERLINE) .append(taskInstance.getTaskInstancePriority().ordinal()).append(Constants.UNDERLINE) .append(taskInstance.getId()).append(Constants.UNDERLINE) .append(taskInstance.getWorkerGroup()); return sb.toString(); } /** * get submit task instance state by the work process state * cannot modify the task state when running/kill/submit success, or this
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,617
[Bug][master] After subtask fault tolerance, 2 task instances are generated,The process instance status always is executing  
Sub-process fault tolerance, two commands: 1.run sub_process workflow 2.stop master 3.start master,2 task instances are generated ![image](https://user-images.githubusercontent.com/55787491/91425464-c288cf00-e88d-11ea-9912-91611d62715b.png) ![image](https://user-images.githubusercontent.com/55787491/91425358-9cfbc580-e88d-11ea-8fad-a80da4d52de8.png) The master log is as follows (master日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424758-cec05c80-e88c-11ea-834a-f44e8f21e36b.png) The worker log is as follows (worker日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424852-eac3fe00-e88c-11ea-9f38-df752c9aad78.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3617
https://github.com/apache/dolphinscheduler/pull/3873
c4be3b57493fe75f5a5dbb9f258a0430d0363cc6
39411ce03b864bc770da220ad6f81df47bd2487b
"2020-08-27T09:48:06Z"
java
"2020-10-10T07:05:56Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
* task instance is already exists in task queue . * return pause if work process state is ready pause * return stop if work process state is ready stop * if all of above are not satisfied, return submit success * * @param taskInstance taskInstance * @param processInstanceState processInstanceState * @return process instance state */ public ExecutionStatus getSubmitTaskState(TaskInstance taskInstance, ExecutionStatus processInstanceState){ ExecutionStatus state = taskInstance.getState(); if( state == ExecutionStatus.RUNNING_EXECUTION || state == ExecutionStatus.DELAY_EXECUTION || state == ExecutionStatus.KILL || checkTaskExistsInTaskQueue(taskInstance) ){ return state; } if( processInstanceState == ExecutionStatus.READY_PAUSE){ state = ExecutionStatus.PAUSE; }else if(processInstanceState == ExecutionStatus.READY_STOP || !checkProcessStrategy(taskInstance)) { state = ExecutionStatus.KILL; }else{
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,617
[Bug][master] After subtask fault tolerance, 2 task instances are generated,The process instance status always is executing  
Sub-process fault tolerance, two commands: 1.run sub_process workflow 2.stop master 3.start master,2 task instances are generated ![image](https://user-images.githubusercontent.com/55787491/91425464-c288cf00-e88d-11ea-9912-91611d62715b.png) ![image](https://user-images.githubusercontent.com/55787491/91425358-9cfbc580-e88d-11ea-8fad-a80da4d52de8.png) The master log is as follows (master日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424758-cec05c80-e88c-11ea-834a-f44e8f21e36b.png) The worker log is as follows (worker日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424852-eac3fe00-e88c-11ea-9f38-df752c9aad78.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3617
https://github.com/apache/dolphinscheduler/pull/3873
c4be3b57493fe75f5a5dbb9f258a0430d0363cc6
39411ce03b864bc770da220ad6f81df47bd2487b
"2020-08-27T09:48:06Z"
java
"2020-10-10T07:05:56Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
state = ExecutionStatus.SUBMITTED_SUCCESS; } return state; } /** * check process instance strategy * @param taskInstance taskInstance * @return check strategy result */ private boolean checkProcessStrategy(TaskInstance taskInstance){ ProcessInstance processInstance = this.findProcessInstanceById(taskInstance.getProcessInstanceId()); FailureStrategy failureStrategy = processInstance.getFailureStrategy(); if(failureStrategy == FailureStrategy.CONTINUE){ return true; } List<TaskInstance> taskInstances = this.findValidTaskListByProcessId(taskInstance.getProcessInstanceId()); for(TaskInstance task : taskInstances){ if(task.getState() == ExecutionStatus.FAILURE){ return false; } } return true; } /** * check the task instance existing in queue * @param taskInstance taskInstance * @return whether taskinstance exists queue */ public boolean checkTaskExistsInTaskQueue(TaskInstance taskInstance){ if(taskInstance.isSubProcess()){
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,617
[Bug][master] After subtask fault tolerance, 2 task instances are generated,The process instance status always is executing  
Sub-process fault tolerance, two commands: 1.run sub_process workflow 2.stop master 3.start master,2 task instances are generated ![image](https://user-images.githubusercontent.com/55787491/91425464-c288cf00-e88d-11ea-9912-91611d62715b.png) ![image](https://user-images.githubusercontent.com/55787491/91425358-9cfbc580-e88d-11ea-8fad-a80da4d52de8.png) The master log is as follows (master日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424758-cec05c80-e88c-11ea-834a-f44e8f21e36b.png) The worker log is as follows (worker日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424852-eac3fe00-e88c-11ea-9f38-df752c9aad78.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3617
https://github.com/apache/dolphinscheduler/pull/3873
c4be3b57493fe75f5a5dbb9f258a0430d0363cc6
39411ce03b864bc770da220ad6f81df47bd2487b
"2020-08-27T09:48:06Z"
java
"2020-10-10T07:05:56Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
return false; } String taskZkInfo = taskZkInfo(taskInstance); return false; } /** * create a new process instance * @param processInstance processInstance */ public void createProcessInstance(ProcessInstance processInstance){ if (processInstance != null){ processInstanceMapper.insert(processInstance); } } /** * insert or update work process instance to data base * @param processInstance processInstance */ public void saveProcessInstance(ProcessInstance processInstance){ if (processInstance == null){ logger.error("save error, process instance is null!"); return ; } if(processInstance.getId() != 0){ processInstanceMapper.updateById(processInstance); }else{ createProcessInstance(processInstance); } } /**
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,617
[Bug][master] After subtask fault tolerance, 2 task instances are generated,The process instance status always is executing  
Sub-process fault tolerance, two commands: 1.run sub_process workflow 2.stop master 3.start master,2 task instances are generated ![image](https://user-images.githubusercontent.com/55787491/91425464-c288cf00-e88d-11ea-9912-91611d62715b.png) ![image](https://user-images.githubusercontent.com/55787491/91425358-9cfbc580-e88d-11ea-8fad-a80da4d52de8.png) The master log is as follows (master日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424758-cec05c80-e88c-11ea-834a-f44e8f21e36b.png) The worker log is as follows (worker日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424852-eac3fe00-e88c-11ea-9f38-df752c9aad78.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3617
https://github.com/apache/dolphinscheduler/pull/3873
c4be3b57493fe75f5a5dbb9f258a0430d0363cc6
39411ce03b864bc770da220ad6f81df47bd2487b
"2020-08-27T09:48:06Z"
java
"2020-10-10T07:05:56Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
* insert or update command * @param command command * @return save command result */ public int saveCommand(Command command){ if(command.getId() != 0){ return commandMapper.updateById(command); }else{ return commandMapper.insert(command); } } /** * insert or update task instance * @param taskInstance taskInstance * @return save task instance result */ public boolean saveTaskInstance(TaskInstance taskInstance){ if(taskInstance.getId() != 0){ return updateTaskInstance(taskInstance); }else{ return createTaskInstance(taskInstance); } } /** * insert task instance * @param taskInstance taskInstance * @return create task instance result */ public boolean createTaskInstance(TaskInstance taskInstance) { int count = taskInstanceMapper.insert(taskInstance);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,617
[Bug][master] After subtask fault tolerance, 2 task instances are generated,The process instance status always is executing  
Sub-process fault tolerance, two commands: 1.run sub_process workflow 2.stop master 3.start master,2 task instances are generated ![image](https://user-images.githubusercontent.com/55787491/91425464-c288cf00-e88d-11ea-9912-91611d62715b.png) ![image](https://user-images.githubusercontent.com/55787491/91425358-9cfbc580-e88d-11ea-8fad-a80da4d52de8.png) The master log is as follows (master日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424758-cec05c80-e88c-11ea-834a-f44e8f21e36b.png) The worker log is as follows (worker日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424852-eac3fe00-e88c-11ea-9f38-df752c9aad78.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3617
https://github.com/apache/dolphinscheduler/pull/3873
c4be3b57493fe75f5a5dbb9f258a0430d0363cc6
39411ce03b864bc770da220ad6f81df47bd2487b
"2020-08-27T09:48:06Z"
java
"2020-10-10T07:05:56Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
return count > 0; } /** * update task instance * @param taskInstance taskInstance * @return update task instance result */ public boolean updateTaskInstance(TaskInstance taskInstance){ int count = taskInstanceMapper.updateById(taskInstance); return count > 0; } /** * delete a command by id * @param id id */ public void delCommandByid(int id) { commandMapper.deleteById(id); } /** * find task instance by id * @param taskId task id * @return task intance */ public TaskInstance findTaskInstanceById(Integer taskId){ return taskInstanceMapper.selectById(taskId); } /** * package task instance,associate processInstance and processDefine * @param taskInstId taskInstId * @return task instance
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,617
[Bug][master] After subtask fault tolerance, 2 task instances are generated,The process instance status always is executing  
Sub-process fault tolerance, two commands: 1.run sub_process workflow 2.stop master 3.start master,2 task instances are generated ![image](https://user-images.githubusercontent.com/55787491/91425464-c288cf00-e88d-11ea-9912-91611d62715b.png) ![image](https://user-images.githubusercontent.com/55787491/91425358-9cfbc580-e88d-11ea-8fad-a80da4d52de8.png) The master log is as follows (master日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424758-cec05c80-e88c-11ea-834a-f44e8f21e36b.png) The worker log is as follows (worker日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424852-eac3fe00-e88c-11ea-9f38-df752c9aad78.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3617
https://github.com/apache/dolphinscheduler/pull/3873
c4be3b57493fe75f5a5dbb9f258a0430d0363cc6
39411ce03b864bc770da220ad6f81df47bd2487b
"2020-08-27T09:48:06Z"
java
"2020-10-10T07:05:56Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
*/ public TaskInstance getTaskInstanceDetailByTaskId(int taskInstId){ // TaskInstance taskInstance = findTaskInstanceById(taskInstId); if(taskInstance == null){ return taskInstance; } // ProcessInstance processInstance = findProcessInstanceDetailById(taskInstance.getProcessInstanceId()); // ProcessDefinition processDefine = findProcessDefineById(taskInstance.getProcessDefinitionId()); taskInstance.setProcessInstance(processInstance); taskInstance.setProcessDefine(processDefine); return taskInstance; } /** * get id list by task state * @param instanceId instanceId * @param state state * @return task instance states */ public List<Integer> findTaskIdByInstanceState(int instanceId, ExecutionStatus state){ return taskInstanceMapper.queryTaskByProcessIdAndState(instanceId, state.ordinal()); } /** * find valid task list by process definition id * @param processInstanceId processInstanceId * @return task instance list */ public List<TaskInstance> findValidTaskListByProcessId(Integer processInstanceId){
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,617
[Bug][master] After subtask fault tolerance, 2 task instances are generated,The process instance status always is executing  
Sub-process fault tolerance, two commands: 1.run sub_process workflow 2.stop master 3.start master,2 task instances are generated ![image](https://user-images.githubusercontent.com/55787491/91425464-c288cf00-e88d-11ea-9912-91611d62715b.png) ![image](https://user-images.githubusercontent.com/55787491/91425358-9cfbc580-e88d-11ea-8fad-a80da4d52de8.png) The master log is as follows (master日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424758-cec05c80-e88c-11ea-834a-f44e8f21e36b.png) The worker log is as follows (worker日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424852-eac3fe00-e88c-11ea-9f38-df752c9aad78.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3617
https://github.com/apache/dolphinscheduler/pull/3873
c4be3b57493fe75f5a5dbb9f258a0430d0363cc6
39411ce03b864bc770da220ad6f81df47bd2487b
"2020-08-27T09:48:06Z"
java
"2020-10-10T07:05:56Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
return taskInstanceMapper.findValidTaskListByProcessId(processInstanceId, Flag.YES); } /** * find previous task list by work process id * @param processInstanceId processInstanceId * @return task instance list */ public List<TaskInstance> findPreviousTaskListByWorkProcessId(Integer processInstanceId){ return taskInstanceMapper.findValidTaskListByProcessId(processInstanceId, Flag.NO); } /** * update work process instance map * @param processInstanceMap processInstanceMap * @return update process instance result */ public int updateWorkProcessInstanceMap(ProcessInstanceMap processInstanceMap){ return processInstanceMapMapper.updateById(processInstanceMap); } /** * create work process instance map * @param processInstanceMap processInstanceMap * @return create process instance result */ public int createWorkProcessInstanceMap(ProcessInstanceMap processInstanceMap){ Integer count = 0; if(processInstanceMap !=null){ return processInstanceMapMapper.insert(processInstanceMap); } return count; }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,617
[Bug][master] After subtask fault tolerance, 2 task instances are generated,The process instance status always is executing  
Sub-process fault tolerance, two commands: 1.run sub_process workflow 2.stop master 3.start master,2 task instances are generated ![image](https://user-images.githubusercontent.com/55787491/91425464-c288cf00-e88d-11ea-9912-91611d62715b.png) ![image](https://user-images.githubusercontent.com/55787491/91425358-9cfbc580-e88d-11ea-8fad-a80da4d52de8.png) The master log is as follows (master日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424758-cec05c80-e88c-11ea-834a-f44e8f21e36b.png) The worker log is as follows (worker日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424852-eac3fe00-e88c-11ea-9f38-df752c9aad78.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3617
https://github.com/apache/dolphinscheduler/pull/3873
c4be3b57493fe75f5a5dbb9f258a0430d0363cc6
39411ce03b864bc770da220ad6f81df47bd2487b
"2020-08-27T09:48:06Z"
java
"2020-10-10T07:05:56Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
/** * find work process map by parent process id and parent task id. * @param parentWorkProcessId parentWorkProcessId * @param parentTaskId parentTaskId * @return process instance map */ public ProcessInstanceMap findWorkProcessMapByParent(Integer parentWorkProcessId, Integer parentTaskId){ return processInstanceMapMapper.queryByParentId(parentWorkProcessId, parentTaskId); } /** * delete work process map by parent process id * @param parentWorkProcessId parentWorkProcessId * @return delete process map result */ public int deleteWorkProcessMapByParentId(int parentWorkProcessId){ return processInstanceMapMapper.deleteByParentProcessId(parentWorkProcessId); } /** * find sub process instance * @param parentProcessId parentProcessId * @param parentTaskId parentTaskId * @return process instance */ public ProcessInstance findSubProcessInstance(Integer parentProcessId, Integer parentTaskId){ ProcessInstance processInstance = null; ProcessInstanceMap processInstanceMap = processInstanceMapMapper.queryByParentId(parentProcessId, parentTaskId); if(processInstanceMap == null || processInstanceMap.getProcessInstanceId() == 0){ return processInstance; } processInstance = findProcessInstanceById(processInstanceMap.getProcessInstanceId());
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,617
[Bug][master] After subtask fault tolerance, 2 task instances are generated,The process instance status always is executing  
Sub-process fault tolerance, two commands: 1.run sub_process workflow 2.stop master 3.start master,2 task instances are generated ![image](https://user-images.githubusercontent.com/55787491/91425464-c288cf00-e88d-11ea-9912-91611d62715b.png) ![image](https://user-images.githubusercontent.com/55787491/91425358-9cfbc580-e88d-11ea-8fad-a80da4d52de8.png) The master log is as follows (master日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424758-cec05c80-e88c-11ea-834a-f44e8f21e36b.png) The worker log is as follows (worker日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424852-eac3fe00-e88c-11ea-9f38-df752c9aad78.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3617
https://github.com/apache/dolphinscheduler/pull/3873
c4be3b57493fe75f5a5dbb9f258a0430d0363cc6
39411ce03b864bc770da220ad6f81df47bd2487b
"2020-08-27T09:48:06Z"
java
"2020-10-10T07:05:56Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
return processInstance; } /** * find parent process instance * @param subProcessId subProcessId * @return process instance */ public ProcessInstance findParentProcessInstance(Integer subProcessId) { ProcessInstance processInstance = null; ProcessInstanceMap processInstanceMap = processInstanceMapMapper.queryBySubProcessId(subProcessId); if(processInstanceMap == null || processInstanceMap.getProcessInstanceId() == 0){ return processInstance; } processInstance = findProcessInstanceById(processInstanceMap.getParentProcessInstanceId()); return processInstance; } /** * change task state * @param state state * @param startTime startTime * @param host host * @param executePath executePath * @param logPath logPath * @param taskInstId taskInstId */ public void changeTaskState(ExecutionStatus state, Date startTime, String host, String executePath, String logPath, int taskInstId) { TaskInstance taskInstance = taskInstanceMapper.selectById(taskInstId);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,617
[Bug][master] After subtask fault tolerance, 2 task instances are generated,The process instance status always is executing  
Sub-process fault tolerance, two commands: 1.run sub_process workflow 2.stop master 3.start master,2 task instances are generated ![image](https://user-images.githubusercontent.com/55787491/91425464-c288cf00-e88d-11ea-9912-91611d62715b.png) ![image](https://user-images.githubusercontent.com/55787491/91425358-9cfbc580-e88d-11ea-8fad-a80da4d52de8.png) The master log is as follows (master日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424758-cec05c80-e88c-11ea-834a-f44e8f21e36b.png) The worker log is as follows (worker日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424852-eac3fe00-e88c-11ea-9f38-df752c9aad78.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3617
https://github.com/apache/dolphinscheduler/pull/3873
c4be3b57493fe75f5a5dbb9f258a0430d0363cc6
39411ce03b864bc770da220ad6f81df47bd2487b
"2020-08-27T09:48:06Z"
java
"2020-10-10T07:05:56Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
taskInstance.setState(state); taskInstance.setStartTime(startTime); taskInstance.setHost(host); taskInstance.setExecutePath(executePath); taskInstance.setLogPath(logPath); saveTaskInstance(taskInstance); } /** * update process instance * @param processInstance processInstance * @return update process instance result */ public int updateProcessInstance(ProcessInstance processInstance){ return processInstanceMapper.updateById(processInstance); } /** * update the process instance * @param processInstanceId processInstanceId * @param processJson processJson * @param globalParams globalParams * @param scheduleTime scheduleTime * @param flag flag * @param locations locations * @param connects connects * @return update process instance result */ public int updateProcessInstance(Integer processInstanceId, String processJson, String globalParams, Date scheduleTime, Flag flag, String locations, String connects){ ProcessInstance processInstance = processInstanceMapper.queryDetailById(processInstanceId);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,617
[Bug][master] After subtask fault tolerance, 2 task instances are generated,The process instance status always is executing  
Sub-process fault tolerance, two commands: 1.run sub_process workflow 2.stop master 3.start master,2 task instances are generated ![image](https://user-images.githubusercontent.com/55787491/91425464-c288cf00-e88d-11ea-9912-91611d62715b.png) ![image](https://user-images.githubusercontent.com/55787491/91425358-9cfbc580-e88d-11ea-8fad-a80da4d52de8.png) The master log is as follows (master日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424758-cec05c80-e88c-11ea-834a-f44e8f21e36b.png) The worker log is as follows (worker日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424852-eac3fe00-e88c-11ea-9f38-df752c9aad78.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3617
https://github.com/apache/dolphinscheduler/pull/3873
c4be3b57493fe75f5a5dbb9f258a0430d0363cc6
39411ce03b864bc770da220ad6f81df47bd2487b
"2020-08-27T09:48:06Z"
java
"2020-10-10T07:05:56Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
if(processInstance!= null){ processInstance.setProcessInstanceJson(processJson); processInstance.setGlobalParams(globalParams); processInstance.setScheduleTime(scheduleTime); processInstance.setLocations(locations); processInstance.setConnects(connects); return processInstanceMapper.updateById(processInstance); } return 0; } /** * change task state * @param state state * @param endTime endTime * @param taskInstId taskInstId * @param varPool varPool */ public void changeTaskState(ExecutionStatus state, Date endTime, int processId, String appIds, int taskInstId, String varPool) { TaskInstance taskInstance = taskInstanceMapper.selectById(taskInstId); taskInstance.setPid(processId); taskInstance.setAppLink(appIds); taskInstance.setState(state); taskInstance.setEndTime(endTime); taskInstance.setVarPool(varPool); saveTaskInstance(taskInstance);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,617
[Bug][master] After subtask fault tolerance, 2 task instances are generated,The process instance status always is executing  
Sub-process fault tolerance, two commands: 1.run sub_process workflow 2.stop master 3.start master,2 task instances are generated ![image](https://user-images.githubusercontent.com/55787491/91425464-c288cf00-e88d-11ea-9912-91611d62715b.png) ![image](https://user-images.githubusercontent.com/55787491/91425358-9cfbc580-e88d-11ea-8fad-a80da4d52de8.png) The master log is as follows (master日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424758-cec05c80-e88c-11ea-834a-f44e8f21e36b.png) The worker log is as follows (worker日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424852-eac3fe00-e88c-11ea-9f38-df752c9aad78.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3617
https://github.com/apache/dolphinscheduler/pull/3873
c4be3b57493fe75f5a5dbb9f258a0430d0363cc6
39411ce03b864bc770da220ad6f81df47bd2487b
"2020-08-27T09:48:06Z"
java
"2020-10-10T07:05:56Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
} /** * convert integer list to string list * @param intList intList * @return string list */ public List<String> convertIntListToString(List<Integer> intList){ if(intList == null){ return new ArrayList<>(); } List<String> result = new ArrayList<String>(intList.size()); for(Integer intVar : intList){ result.add(String.valueOf(intVar)); } return result; } /** * update pid and app links field by task instance id * @param taskInstId taskInstId * @param pid pid * @param appLinks appLinks */ public void updatePidByTaskInstId(int taskInstId, int pid,String appLinks) { TaskInstance taskInstance = taskInstanceMapper.selectById(taskInstId); taskInstance.setPid(pid); taskInstance.setAppLink(appLinks); saveTaskInstance(taskInstance); } /** * query schedule by id
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,617
[Bug][master] After subtask fault tolerance, 2 task instances are generated,The process instance status always is executing  
Sub-process fault tolerance, two commands: 1.run sub_process workflow 2.stop master 3.start master,2 task instances are generated ![image](https://user-images.githubusercontent.com/55787491/91425464-c288cf00-e88d-11ea-9912-91611d62715b.png) ![image](https://user-images.githubusercontent.com/55787491/91425358-9cfbc580-e88d-11ea-8fad-a80da4d52de8.png) The master log is as follows (master日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424758-cec05c80-e88c-11ea-834a-f44e8f21e36b.png) The worker log is as follows (worker日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424852-eac3fe00-e88c-11ea-9f38-df752c9aad78.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3617
https://github.com/apache/dolphinscheduler/pull/3873
c4be3b57493fe75f5a5dbb9f258a0430d0363cc6
39411ce03b864bc770da220ad6f81df47bd2487b
"2020-08-27T09:48:06Z"
java
"2020-10-10T07:05:56Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
* @param id id * @return schedule */ public Schedule querySchedule(int id) { return scheduleMapper.selectById(id); } /** * query Schedule by processDefinitionId * @param processDefinitionId processDefinitionId * @see Schedule */ public List<Schedule> queryReleaseSchedulerListByProcessDefinitionId(int processDefinitionId) { return scheduleMapper.queryReleaseSchedulerListByProcessDefinitionId(processDefinitionId); } /** * query need failover process instance * @param host host * @return process instance list */ public List<ProcessInstance> queryNeedFailoverProcessInstances(String host){ return processInstanceMapper.queryByHostAndStatus(host, stateArray); } /** * process need failover process instance * @param processInstance processInstance */ @Transactional(rollbackFor = RuntimeException.class) public void processNeedFailoverProcessInstances(ProcessInstance processInstance){ // processInstance.setHost(Constants.NULL);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,617
[Bug][master] After subtask fault tolerance, 2 task instances are generated,The process instance status always is executing  
Sub-process fault tolerance, two commands: 1.run sub_process workflow 2.stop master 3.start master,2 task instances are generated ![image](https://user-images.githubusercontent.com/55787491/91425464-c288cf00-e88d-11ea-9912-91611d62715b.png) ![image](https://user-images.githubusercontent.com/55787491/91425358-9cfbc580-e88d-11ea-8fad-a80da4d52de8.png) The master log is as follows (master日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424758-cec05c80-e88c-11ea-834a-f44e8f21e36b.png) The worker log is as follows (worker日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424852-eac3fe00-e88c-11ea-9f38-df752c9aad78.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3617
https://github.com/apache/dolphinscheduler/pull/3873
c4be3b57493fe75f5a5dbb9f258a0430d0363cc6
39411ce03b864bc770da220ad6f81df47bd2487b
"2020-08-27T09:48:06Z"
java
"2020-10-10T07:05:56Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
processInstanceMapper.updateById(processInstance); // Command cmd = new Command(); cmd.setProcessDefinitionId(processInstance.getProcessDefinitionId()); cmd.setCommandParam(String.format("{\"%s\":%d}", Constants.CMDPARAM_RECOVER_PROCESS_ID_STRING, processInstance.getId())); cmd.setExecutorId(processInstance.getExecutorId()); cmd.setCommandType(CommandType.RECOVER_TOLERANCE_FAULT_PROCESS); createCommand(cmd); } /** * query all need failover task instances by host * @param host host * @return task instance list */ public List<TaskInstance> queryNeedFailoverTaskInstances(String host){ return taskInstanceMapper.queryByHostAndStatus(host, stateArray); } /** * find data source by id * @param id id * @return datasource */ public DataSource findDataSourceById(int id){ return dataSourceMapper.selectById(id); } /** * update process instance state by id * @param processInstanceId processInstanceId * @param executionStatus executionStatus
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,617
[Bug][master] After subtask fault tolerance, 2 task instances are generated,The process instance status always is executing  
Sub-process fault tolerance, two commands: 1.run sub_process workflow 2.stop master 3.start master,2 task instances are generated ![image](https://user-images.githubusercontent.com/55787491/91425464-c288cf00-e88d-11ea-9912-91611d62715b.png) ![image](https://user-images.githubusercontent.com/55787491/91425358-9cfbc580-e88d-11ea-8fad-a80da4d52de8.png) The master log is as follows (master日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424758-cec05c80-e88c-11ea-834a-f44e8f21e36b.png) The worker log is as follows (worker日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424852-eac3fe00-e88c-11ea-9f38-df752c9aad78.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3617
https://github.com/apache/dolphinscheduler/pull/3873
c4be3b57493fe75f5a5dbb9f258a0430d0363cc6
39411ce03b864bc770da220ad6f81df47bd2487b
"2020-08-27T09:48:06Z"
java
"2020-10-10T07:05:56Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
* @return update process result */ public int updateProcessInstanceState(Integer processInstanceId, ExecutionStatus executionStatus) { ProcessInstance instance = processInstanceMapper.selectById(processInstanceId); instance.setState(executionStatus); return processInstanceMapper.updateById(instance); } /** * find process instance by the task id * @param taskId taskId * @return process instance */ public ProcessInstance findProcessInstanceByTaskId(int taskId){ TaskInstance taskInstance = taskInstanceMapper.selectById(taskId); if(taskInstance!= null){ return processInstanceMapper.selectById(taskInstance.getProcessInstanceId()); } return null; } /** * find udf function list by id list string * @param ids ids * @return udf function list */ public List<UdfFunc> queryUdfFunListByids(int[] ids){ return udfFuncMapper.queryUdfByIdStr(ids, null); } /** * find tenant code by resource name * @param resName resource name
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,617
[Bug][master] After subtask fault tolerance, 2 task instances are generated,The process instance status always is executing  
Sub-process fault tolerance, two commands: 1.run sub_process workflow 2.stop master 3.start master,2 task instances are generated ![image](https://user-images.githubusercontent.com/55787491/91425464-c288cf00-e88d-11ea-9912-91611d62715b.png) ![image](https://user-images.githubusercontent.com/55787491/91425358-9cfbc580-e88d-11ea-8fad-a80da4d52de8.png) The master log is as follows (master日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424758-cec05c80-e88c-11ea-834a-f44e8f21e36b.png) The worker log is as follows (worker日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424852-eac3fe00-e88c-11ea-9f38-df752c9aad78.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3617
https://github.com/apache/dolphinscheduler/pull/3873
c4be3b57493fe75f5a5dbb9f258a0430d0363cc6
39411ce03b864bc770da220ad6f81df47bd2487b
"2020-08-27T09:48:06Z"
java
"2020-10-10T07:05:56Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
* @param resourceType resource type * @return tenant code */ public String queryTenantCodeByResName(String resName,ResourceType resourceType){ return resourceMapper.queryTenantCodeByResourceName(resName, resourceType.ordinal()); } /** * find schedule list by process define id. * @param ids ids * @return schedule list */ public List<Schedule> selectAllByProcessDefineId(int[] ids){ return scheduleMapper.selectAllByProcessDefineArray( ids); } /** * get dependency cycle by work process define id and scheduler fire time * @param masterId masterId * @param processDefinitionId processDefinitionId * @param scheduledFireTime the time the task schedule is expected to trigger * @return CycleDependency * @throws Exception if error throws Exception */ public CycleDependency getCycleDependency(int masterId, int processDefinitionId, Date scheduledFireTime) throws Exception { List<CycleDependency> list = getCycleDependencies(masterId,new int[]{processDefinitionId},scheduledFireTime); return list.size()>0 ? list.get(0) : null; } /** * get dependency cycle list by work process define id list and scheduler fire time * @param masterId masterId
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,617
[Bug][master] After subtask fault tolerance, 2 task instances are generated,The process instance status always is executing  
Sub-process fault tolerance, two commands: 1.run sub_process workflow 2.stop master 3.start master,2 task instances are generated ![image](https://user-images.githubusercontent.com/55787491/91425464-c288cf00-e88d-11ea-9912-91611d62715b.png) ![image](https://user-images.githubusercontent.com/55787491/91425358-9cfbc580-e88d-11ea-8fad-a80da4d52de8.png) The master log is as follows (master日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424758-cec05c80-e88c-11ea-834a-f44e8f21e36b.png) The worker log is as follows (worker日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424852-eac3fe00-e88c-11ea-9f38-df752c9aad78.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3617
https://github.com/apache/dolphinscheduler/pull/3873
c4be3b57493fe75f5a5dbb9f258a0430d0363cc6
39411ce03b864bc770da220ad6f81df47bd2487b
"2020-08-27T09:48:06Z"
java
"2020-10-10T07:05:56Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
* @param ids ids * @param scheduledFireTime the time the task schedule is expected to trigger * @return CycleDependency list * @throws Exception if error throws Exception */ public List<CycleDependency> getCycleDependencies(int masterId,int[] ids,Date scheduledFireTime) throws Exception { List<CycleDependency> cycleDependencyList = new ArrayList<CycleDependency>(); if (ids == null || ids.length == 0) { logger.warn("ids[] is empty!is invalid!"); return cycleDependencyList; } if(scheduledFireTime == null){ logger.warn("scheduledFireTime is null!is invalid!"); return cycleDependencyList; } String strCrontab = ""; CronExpression depCronExpression; Cron depCron; List<Date> list; List<Schedule> schedules = this.selectAllByProcessDefineId(ids); // for(Schedule depSchedule:schedules){ strCrontab = depSchedule.getCrontab(); depCronExpression = CronUtils.parse2CronExpression(strCrontab); depCron = CronUtils.parse2Cron(strCrontab); CycleEnum cycleEnum = CronUtils.getMiniCycle(depCron); if(cycleEnum == null){ logger.error("{} is not valid",strCrontab); continue; }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,617
[Bug][master] After subtask fault tolerance, 2 task instances are generated,The process instance status always is executing  
Sub-process fault tolerance, two commands: 1.run sub_process workflow 2.stop master 3.start master,2 task instances are generated ![image](https://user-images.githubusercontent.com/55787491/91425464-c288cf00-e88d-11ea-9912-91611d62715b.png) ![image](https://user-images.githubusercontent.com/55787491/91425358-9cfbc580-e88d-11ea-8fad-a80da4d52de8.png) The master log is as follows (master日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424758-cec05c80-e88c-11ea-834a-f44e8f21e36b.png) The worker log is as follows (worker日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424852-eac3fe00-e88c-11ea-9f38-df752c9aad78.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3617
https://github.com/apache/dolphinscheduler/pull/3873
c4be3b57493fe75f5a5dbb9f258a0430d0363cc6
39411ce03b864bc770da220ad6f81df47bd2487b
"2020-08-27T09:48:06Z"
java
"2020-10-10T07:05:56Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
Calendar calendar = Calendar.getInstance(); switch (cycleEnum){ /*case MINUTE: calendar.add(Calendar.MINUTE,-61);*/ case HOUR: calendar.add(Calendar.HOUR,-25); break; case DAY: calendar.add(Calendar.DATE,-32); break; case WEEK: calendar.add(Calendar.DATE,-32); break; case MONTH: calendar.add(Calendar.MONTH,-13); break; default: logger.warn("Dependent process definition's cycleEnum is {},not support!!", cycleEnum.name()); continue; } Date start = calendar.getTime(); if(depSchedule.getProcessDefinitionId() == masterId){ list = CronUtils.getSelfFireDateList(start, scheduledFireTime, depCronExpression); }else { list = CronUtils.getFireDateList(start, scheduledFireTime, depCronExpression); } if(list.size()>=1){ start = list.get(list.size()-1); CycleDependency dependency = new CycleDependency(depSchedule.getProcessDefinitionId(),start, CronUtils.getExpirationTime(start, cycleEnum), cycleEnum); cycleDependencyList.add(dependency);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,617
[Bug][master] After subtask fault tolerance, 2 task instances are generated,The process instance status always is executing  
Sub-process fault tolerance, two commands: 1.run sub_process workflow 2.stop master 3.start master,2 task instances are generated ![image](https://user-images.githubusercontent.com/55787491/91425464-c288cf00-e88d-11ea-9912-91611d62715b.png) ![image](https://user-images.githubusercontent.com/55787491/91425358-9cfbc580-e88d-11ea-8fad-a80da4d52de8.png) The master log is as follows (master日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424758-cec05c80-e88c-11ea-834a-f44e8f21e36b.png) The worker log is as follows (worker日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424852-eac3fe00-e88c-11ea-9f38-df752c9aad78.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3617
https://github.com/apache/dolphinscheduler/pull/3873
c4be3b57493fe75f5a5dbb9f258a0430d0363cc6
39411ce03b864bc770da220ad6f81df47bd2487b
"2020-08-27T09:48:06Z"
java
"2020-10-10T07:05:56Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
} } return cycleDependencyList; } /** * find last scheduler process instance in the date interval * @param definitionId definitionId * @param dateInterval dateInterval * @return process instance */ public ProcessInstance findLastSchedulerProcessInterval(int definitionId, DateInterval dateInterval) { return processInstanceMapper.queryLastSchedulerProcess(definitionId, dateInterval.getStartTime(), dateInterval.getEndTime()); } /** * find last manual process instance interval * @param definitionId process definition id * @param dateInterval dateInterval * @return process instance */ public ProcessInstance findLastManualProcessInterval(int definitionId, DateInterval dateInterval) { return processInstanceMapper.queryLastManualProcess(definitionId, dateInterval.getStartTime(), dateInterval.getEndTime()); } /** * find last running process instance * @param definitionId process definition id * @param startTime start time
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,617
[Bug][master] After subtask fault tolerance, 2 task instances are generated,The process instance status always is executing  
Sub-process fault tolerance, two commands: 1.run sub_process workflow 2.stop master 3.start master,2 task instances are generated ![image](https://user-images.githubusercontent.com/55787491/91425464-c288cf00-e88d-11ea-9912-91611d62715b.png) ![image](https://user-images.githubusercontent.com/55787491/91425358-9cfbc580-e88d-11ea-8fad-a80da4d52de8.png) The master log is as follows (master日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424758-cec05c80-e88c-11ea-834a-f44e8f21e36b.png) The worker log is as follows (worker日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424852-eac3fe00-e88c-11ea-9f38-df752c9aad78.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3617
https://github.com/apache/dolphinscheduler/pull/3873
c4be3b57493fe75f5a5dbb9f258a0430d0363cc6
39411ce03b864bc770da220ad6f81df47bd2487b
"2020-08-27T09:48:06Z"
java
"2020-10-10T07:05:56Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
* @param endTime end time * @return process instance */ public ProcessInstance findLastRunningProcess(int definitionId, Date startTime, Date endTime) { return processInstanceMapper.queryLastRunningProcess(definitionId, startTime, endTime, stateArray); } /** * query user queue by process instance id * @param processInstanceId processInstanceId * @return queue */ public String queryUserQueueByProcessInstanceId(int processInstanceId){ String queue = ""; ProcessInstance processInstance = processInstanceMapper.selectById(processInstanceId); if(processInstance == null){ return queue; } User executor = userMapper.selectById(processInstance.getExecutorId()); if(executor != null){ queue = executor.getQueue(); } return queue; } /** * get task worker group * @param taskInstance taskInstance * @return workerGroupId
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,617
[Bug][master] After subtask fault tolerance, 2 task instances are generated,The process instance status always is executing  
Sub-process fault tolerance, two commands: 1.run sub_process workflow 2.stop master 3.start master,2 task instances are generated ![image](https://user-images.githubusercontent.com/55787491/91425464-c288cf00-e88d-11ea-9912-91611d62715b.png) ![image](https://user-images.githubusercontent.com/55787491/91425358-9cfbc580-e88d-11ea-8fad-a80da4d52de8.png) The master log is as follows (master日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424758-cec05c80-e88c-11ea-834a-f44e8f21e36b.png) The worker log is as follows (worker日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424852-eac3fe00-e88c-11ea-9f38-df752c9aad78.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3617
https://github.com/apache/dolphinscheduler/pull/3873
c4be3b57493fe75f5a5dbb9f258a0430d0363cc6
39411ce03b864bc770da220ad6f81df47bd2487b
"2020-08-27T09:48:06Z"
java
"2020-10-10T07:05:56Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
*/ public String getTaskWorkerGroup(TaskInstance taskInstance) { String workerGroup = taskInstance.getWorkerGroup(); if(StringUtils.isNotBlank(workerGroup)){ return workerGroup; } int processInstanceId = taskInstance.getProcessInstanceId(); ProcessInstance processInstance = findProcessInstanceById(processInstanceId); if(processInstance != null){ return processInstance.getWorkerGroup(); } logger.info("task : {} will use default worker group", taskInstance.getId()); return Constants.DEFAULT_WORKER_GROUP; } /** * get have perm project list * @param userId userId * @return project list */ public List<Project> getProjectListHavePerm(int userId){ List<Project> createProjects = projectMapper.queryProjectCreatedByUser(userId); List<Project> authedProjects = projectMapper.queryAuthedProjectListByUserId(userId); if(createProjects == null){ createProjects = new ArrayList<>(); } if(authedProjects != null){ createProjects.addAll(authedProjects); } return createProjects; }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,617
[Bug][master] After subtask fault tolerance, 2 task instances are generated,The process instance status always is executing  
Sub-process fault tolerance, two commands: 1.run sub_process workflow 2.stop master 3.start master,2 task instances are generated ![image](https://user-images.githubusercontent.com/55787491/91425464-c288cf00-e88d-11ea-9912-91611d62715b.png) ![image](https://user-images.githubusercontent.com/55787491/91425358-9cfbc580-e88d-11ea-8fad-a80da4d52de8.png) The master log is as follows (master日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424758-cec05c80-e88c-11ea-834a-f44e8f21e36b.png) The worker log is as follows (worker日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424852-eac3fe00-e88c-11ea-9f38-df752c9aad78.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3617
https://github.com/apache/dolphinscheduler/pull/3873
c4be3b57493fe75f5a5dbb9f258a0430d0363cc6
39411ce03b864bc770da220ad6f81df47bd2487b
"2020-08-27T09:48:06Z"
java
"2020-10-10T07:05:56Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
/** * get have perm project ids * @param userId userId * @return project ids */ public List<Integer> getProjectIdListHavePerm(int userId){ List<Integer> projectIdList = new ArrayList<>(); for(Project project : getProjectListHavePerm(userId)){ projectIdList.add(project.getId()); } return projectIdList; } /** * list unauthorized udf function * @param userId user id * @param needChecks data source id array * @return unauthorized udf function list */ public <T> List<T> listUnauthorized(int userId,T[] needChecks,AuthorizationType authorizationType){ List<T> resultList = new ArrayList<T>(); if (Objects.nonNull(needChecks) && needChecks.length > 0) { Set<T> originResSet = new HashSet<T>(Arrays.asList(needChecks)); switch (authorizationType){ case RESOURCE_FILE_ID: Set<Integer> authorizedResourceFiles = resourceMapper.listAuthorizedResourceById(userId, needChecks).stream().map(t -> t.getId()).collect(toSet()); originResSet.removeAll(authorizedResourceFiles); break; case RESOURCE_FILE_NAME: Set<String> authorizedResources = resourceMapper.listAuthorizedResource(userId, needChecks).stream().map(t -> t.getFullName()).collect(toSet()); originResSet.removeAll(authorizedResources);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,617
[Bug][master] After subtask fault tolerance, 2 task instances are generated,The process instance status always is executing  
Sub-process fault tolerance, two commands: 1.run sub_process workflow 2.stop master 3.start master,2 task instances are generated ![image](https://user-images.githubusercontent.com/55787491/91425464-c288cf00-e88d-11ea-9912-91611d62715b.png) ![image](https://user-images.githubusercontent.com/55787491/91425358-9cfbc580-e88d-11ea-8fad-a80da4d52de8.png) The master log is as follows (master日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424758-cec05c80-e88c-11ea-834a-f44e8f21e36b.png) The worker log is as follows (worker日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424852-eac3fe00-e88c-11ea-9f38-df752c9aad78.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3617
https://github.com/apache/dolphinscheduler/pull/3873
c4be3b57493fe75f5a5dbb9f258a0430d0363cc6
39411ce03b864bc770da220ad6f81df47bd2487b
"2020-08-27T09:48:06Z"
java
"2020-10-10T07:05:56Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
break; case UDF_FILE: Set<Integer> authorizedUdfFiles = resourceMapper.listAuthorizedResourceById(userId, needChecks).stream().map(t -> t.getId()).collect(toSet()); originResSet.removeAll(authorizedUdfFiles); break; case DATASOURCE: Set<Integer> authorizedDatasources = dataSourceMapper.listAuthorizedDataSource(userId,needChecks).stream().map(t -> t.getId()).collect(toSet()); originResSet.removeAll(authorizedDatasources); break; case UDF: Set<Integer> authorizedUdfs = udfFuncMapper.listAuthorizedUdfFunc(userId, needChecks).stream().map(t -> t.getId()).collect(toSet()); originResSet.removeAll(authorizedUdfs); break; } resultList.addAll(originResSet); } return resultList; } /** * get user by user id * @param userId user id * @return User */ public User getUserById(int userId){ return userMapper.selectById(userId); } /** * get resource by resoruce id * @param resoruceId resource id * @return Resource
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,617
[Bug][master] After subtask fault tolerance, 2 task instances are generated,The process instance status always is executing  
Sub-process fault tolerance, two commands: 1.run sub_process workflow 2.stop master 3.start master,2 task instances are generated ![image](https://user-images.githubusercontent.com/55787491/91425464-c288cf00-e88d-11ea-9912-91611d62715b.png) ![image](https://user-images.githubusercontent.com/55787491/91425358-9cfbc580-e88d-11ea-8fad-a80da4d52de8.png) The master log is as follows (master日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424758-cec05c80-e88c-11ea-834a-f44e8f21e36b.png) The worker log is as follows (worker日志如下) ![image](https://user-images.githubusercontent.com/55787491/91424852-eac3fe00-e88c-11ea-9f38-df752c9aad78.png) **Which version of Dolphin Scheduler:** -[1.3.2-release]
https://github.com/apache/dolphinscheduler/issues/3617
https://github.com/apache/dolphinscheduler/pull/3873
c4be3b57493fe75f5a5dbb9f258a0430d0363cc6
39411ce03b864bc770da220ad6f81df47bd2487b
"2020-08-27T09:48:06Z"
java
"2020-10-10T07:05:56Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
*/ public Resource getResourceById(int resoruceId){ return resourceMapper.selectById(resoruceId); } /** * list resources by ids * @param resIds resIds * @return resource list */ public List<Resource> listResourceByIds(Integer[] resIds){ return resourceMapper.listResourceByIds(resIds); } /** * format task app id in task instance * @param taskInstance * @return */ public String formatTaskAppId(TaskInstance taskInstance){ ProcessDefinition definition = this.findProcessDefineById(taskInstance.getProcessDefinitionId()); ProcessInstance processInstanceById = this.findProcessInstanceById(taskInstance.getProcessInstanceId()); if(definition == null || processInstanceById == null){ return ""; } return String.format("%s_%s_%s", definition.getId(), processInstanceById.getId(), taskInstance.getId()); } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,789
[Bug][remote] channel time out
**Describe the bug** 某些网络情况下,master submit task时,无法进行netty通信,task信息发送不到worker,等待很长时间之后,出现time out的异常,然后过一段儿时间就又会出现这种现象。 **To Reproduce** Steps to reproduce the behavior, for example: 1. 手动运行某个流程 2. 流程处于运行中,所有任务全部是已提交的灰色圆点状态 3. master节点很长一段时间之后会出现timeout的异常 4. worker端没有接受到master的信息 **Expected behavior** 在send方法中,获取channel的时候判断了channel的状态是否active,怀疑这里获取到的active 状态的channel并不能向worker发送数据,等待这个channel异常之后,重新创建的channel可以短暂使用,但是过一段儿时间还是会这样复现 **Screenshots** 公司环境截不了图 **Which version of Dolphin Scheduler:** -[1.3.1] -[1.3.2] **Additional context** 不同的网络环境可能结果不同,有朋友的测试集群没有出现异常,而生产出现异常。我个人的生产环境还没有上线进行测试,测试环境基本每半个小时左右可以出现一次 **Requirement or improvement** - 希望尽快修复这个问题,严重影响调度
https://github.com/apache/dolphinscheduler/issues/3789
https://github.com/apache/dolphinscheduler/pull/3913
e740dc7645eb7c2659a40dd0958af41969aafa00
51d476be69287e7c52c53825ea8ed434ed71dc44
"2020-09-22T13:57:17Z"
java
"2020-10-15T02:28:05Z"
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/NettyRemotingClient.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.remote; import io.netty.bootstrap.Bootstrap;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,789
[Bug][remote] channel time out
**Describe the bug** 某些网络情况下,master submit task时,无法进行netty通信,task信息发送不到worker,等待很长时间之后,出现time out的异常,然后过一段儿时间就又会出现这种现象。 **To Reproduce** Steps to reproduce the behavior, for example: 1. 手动运行某个流程 2. 流程处于运行中,所有任务全部是已提交的灰色圆点状态 3. master节点很长一段时间之后会出现timeout的异常 4. worker端没有接受到master的信息 **Expected behavior** 在send方法中,获取channel的时候判断了channel的状态是否active,怀疑这里获取到的active 状态的channel并不能向worker发送数据,等待这个channel异常之后,重新创建的channel可以短暂使用,但是过一段儿时间还是会这样复现 **Screenshots** 公司环境截不了图 **Which version of Dolphin Scheduler:** -[1.3.1] -[1.3.2] **Additional context** 不同的网络环境可能结果不同,有朋友的测试集群没有出现异常,而生产出现异常。我个人的生产环境还没有上线进行测试,测试环境基本每半个小时左右可以出现一次 **Requirement or improvement** - 希望尽快修复这个问题,严重影响调度
https://github.com/apache/dolphinscheduler/issues/3789
https://github.com/apache/dolphinscheduler/pull/3913
e740dc7645eb7c2659a40dd0958af41969aafa00
51d476be69287e7c52c53825ea8ed434ed71dc44
"2020-09-22T13:57:17Z"
java
"2020-10-15T02:28:05Z"
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/NettyRemotingClient.java
import io.netty.channel.*; import io.netty.channel.nio.NioEventLoopGroup; import io.netty.channel.socket.SocketChannel; import io.netty.channel.socket.nio.NioSocketChannel; import org.apache.dolphinscheduler.remote.codec.NettyDecoder; import org.apache.dolphinscheduler.remote.codec.NettyEncoder; import org.apache.dolphinscheduler.remote.command.Command; import org.apache.dolphinscheduler.remote.command.CommandType; import org.apache.dolphinscheduler.remote.config.NettyClientConfig; import org.apache.dolphinscheduler.remote.exceptions.RemotingException; import org.apache.dolphinscheduler.remote.exceptions.RemotingTimeoutException; import org.apache.dolphinscheduler.remote.exceptions.RemotingTooMuchRequestException; import org.apache.dolphinscheduler.remote.future.InvokeCallback; import org.apache.dolphinscheduler.remote.future.ReleaseSemaphore; import org.apache.dolphinscheduler.remote.future.ResponseFuture; import org.apache.dolphinscheduler.remote.handler.NettyClientHandler; import org.apache.dolphinscheduler.remote.processor.NettyRequestProcessor; import org.apache.dolphinscheduler.remote.utils.Host; import org.apache.dolphinscheduler.remote.utils.CallerThreadExecutePolicy; import org.apache.dolphinscheduler.remote.utils.NamedThreadFactory; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.net.InetSocketAddress; import java.util.concurrent.*; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; /** * remoting netty client */ public class NettyRemotingClient {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,789
[Bug][remote] channel time out
**Describe the bug** 某些网络情况下,master submit task时,无法进行netty通信,task信息发送不到worker,等待很长时间之后,出现time out的异常,然后过一段儿时间就又会出现这种现象。 **To Reproduce** Steps to reproduce the behavior, for example: 1. 手动运行某个流程 2. 流程处于运行中,所有任务全部是已提交的灰色圆点状态 3. master节点很长一段时间之后会出现timeout的异常 4. worker端没有接受到master的信息 **Expected behavior** 在send方法中,获取channel的时候判断了channel的状态是否active,怀疑这里获取到的active 状态的channel并不能向worker发送数据,等待这个channel异常之后,重新创建的channel可以短暂使用,但是过一段儿时间还是会这样复现 **Screenshots** 公司环境截不了图 **Which version of Dolphin Scheduler:** -[1.3.1] -[1.3.2] **Additional context** 不同的网络环境可能结果不同,有朋友的测试集群没有出现异常,而生产出现异常。我个人的生产环境还没有上线进行测试,测试环境基本每半个小时左右可以出现一次 **Requirement or improvement** - 希望尽快修复这个问题,严重影响调度
https://github.com/apache/dolphinscheduler/issues/3789
https://github.com/apache/dolphinscheduler/pull/3913
e740dc7645eb7c2659a40dd0958af41969aafa00
51d476be69287e7c52c53825ea8ed434ed71dc44
"2020-09-22T13:57:17Z"
java
"2020-10-15T02:28:05Z"
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/NettyRemotingClient.java
private final Logger logger = LoggerFactory.getLogger(NettyRemotingClient.class); /** * client bootstrap */ private final Bootstrap bootstrap = new Bootstrap(); /** * encoder */ private final NettyEncoder encoder = new NettyEncoder(); /** * channels */ private final ConcurrentHashMap<Host, Channel> channels = new ConcurrentHashMap(128); /** * started flag */ private final AtomicBoolean isStarted = new AtomicBoolean(false); /** * worker group */
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,789
[Bug][remote] channel time out
**Describe the bug** 某些网络情况下,master submit task时,无法进行netty通信,task信息发送不到worker,等待很长时间之后,出现time out的异常,然后过一段儿时间就又会出现这种现象。 **To Reproduce** Steps to reproduce the behavior, for example: 1. 手动运行某个流程 2. 流程处于运行中,所有任务全部是已提交的灰色圆点状态 3. master节点很长一段时间之后会出现timeout的异常 4. worker端没有接受到master的信息 **Expected behavior** 在send方法中,获取channel的时候判断了channel的状态是否active,怀疑这里获取到的active 状态的channel并不能向worker发送数据,等待这个channel异常之后,重新创建的channel可以短暂使用,但是过一段儿时间还是会这样复现 **Screenshots** 公司环境截不了图 **Which version of Dolphin Scheduler:** -[1.3.1] -[1.3.2] **Additional context** 不同的网络环境可能结果不同,有朋友的测试集群没有出现异常,而生产出现异常。我个人的生产环境还没有上线进行测试,测试环境基本每半个小时左右可以出现一次 **Requirement or improvement** - 希望尽快修复这个问题,严重影响调度
https://github.com/apache/dolphinscheduler/issues/3789
https://github.com/apache/dolphinscheduler/pull/3913
e740dc7645eb7c2659a40dd0958af41969aafa00
51d476be69287e7c52c53825ea8ed434ed71dc44
"2020-09-22T13:57:17Z"
java
"2020-10-15T02:28:05Z"
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/NettyRemotingClient.java
private final NioEventLoopGroup workerGroup; /** * client config */ private final NettyClientConfig clientConfig; /** * saync semaphore */ private final Semaphore asyncSemaphore = new Semaphore(200, true); /** * callback thread executor */ private final ExecutorService callbackExecutor; /** * client handler */ private final NettyClientHandler clientHandler; /** * response future executor */ private final ScheduledExecutorService responseFutureExecutor; /** * client init * @param clientConfig client config */ public NettyRemotingClient(final NettyClientConfig clientConfig){ this.clientConfig = clientConfig; this.workerGroup = new NioEventLoopGroup(clientConfig.getWorkerThreads(), new ThreadFactory() { private AtomicInteger threadIndex = new AtomicInteger(0); @Override
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,789
[Bug][remote] channel time out
**Describe the bug** 某些网络情况下,master submit task时,无法进行netty通信,task信息发送不到worker,等待很长时间之后,出现time out的异常,然后过一段儿时间就又会出现这种现象。 **To Reproduce** Steps to reproduce the behavior, for example: 1. 手动运行某个流程 2. 流程处于运行中,所有任务全部是已提交的灰色圆点状态 3. master节点很长一段时间之后会出现timeout的异常 4. worker端没有接受到master的信息 **Expected behavior** 在send方法中,获取channel的时候判断了channel的状态是否active,怀疑这里获取到的active 状态的channel并不能向worker发送数据,等待这个channel异常之后,重新创建的channel可以短暂使用,但是过一段儿时间还是会这样复现 **Screenshots** 公司环境截不了图 **Which version of Dolphin Scheduler:** -[1.3.1] -[1.3.2] **Additional context** 不同的网络环境可能结果不同,有朋友的测试集群没有出现异常,而生产出现异常。我个人的生产环境还没有上线进行测试,测试环境基本每半个小时左右可以出现一次 **Requirement or improvement** - 希望尽快修复这个问题,严重影响调度
https://github.com/apache/dolphinscheduler/issues/3789
https://github.com/apache/dolphinscheduler/pull/3913
e740dc7645eb7c2659a40dd0958af41969aafa00
51d476be69287e7c52c53825ea8ed434ed71dc44
"2020-09-22T13:57:17Z"
java
"2020-10-15T02:28:05Z"
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/NettyRemotingClient.java
public Thread newThread(Runnable r) { return new Thread(r, String.format("NettyClient_%d", this.threadIndex.incrementAndGet())); } }); this.callbackExecutor = new ThreadPoolExecutor(5, 10, 1, TimeUnit.MINUTES, new LinkedBlockingQueue<>(1000), new NamedThreadFactory("CallbackExecutor", 10), new CallerThreadExecutePolicy()); this.clientHandler = new NettyClientHandler(this, callbackExecutor); this.responseFutureExecutor = Executors.newSingleThreadScheduledExecutor(new NamedThreadFactory("ResponseFutureExecutor")); this.start(); } /** * start */ private void start(){ this.bootstrap .group(this.workerGroup) .channel(NioSocketChannel.class) .option(ChannelOption.SO_KEEPALIVE, clientConfig.isSoKeepalive()) .option(ChannelOption.TCP_NODELAY, clientConfig.isTcpNoDelay()) .option(ChannelOption.SO_SNDBUF, clientConfig.getSendBufferSize()) .option(ChannelOption.SO_RCVBUF, clientConfig.getReceiveBufferSize()) .handler(new ChannelInitializer<SocketChannel>() { @Override public void initChannel(SocketChannel ch) throws Exception { ch.pipeline().addLast( new NettyDecoder(), clientHandler, encoder); }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,789
[Bug][remote] channel time out
**Describe the bug** 某些网络情况下,master submit task时,无法进行netty通信,task信息发送不到worker,等待很长时间之后,出现time out的异常,然后过一段儿时间就又会出现这种现象。 **To Reproduce** Steps to reproduce the behavior, for example: 1. 手动运行某个流程 2. 流程处于运行中,所有任务全部是已提交的灰色圆点状态 3. master节点很长一段时间之后会出现timeout的异常 4. worker端没有接受到master的信息 **Expected behavior** 在send方法中,获取channel的时候判断了channel的状态是否active,怀疑这里获取到的active 状态的channel并不能向worker发送数据,等待这个channel异常之后,重新创建的channel可以短暂使用,但是过一段儿时间还是会这样复现 **Screenshots** 公司环境截不了图 **Which version of Dolphin Scheduler:** -[1.3.1] -[1.3.2] **Additional context** 不同的网络环境可能结果不同,有朋友的测试集群没有出现异常,而生产出现异常。我个人的生产环境还没有上线进行测试,测试环境基本每半个小时左右可以出现一次 **Requirement or improvement** - 希望尽快修复这个问题,严重影响调度
https://github.com/apache/dolphinscheduler/issues/3789
https://github.com/apache/dolphinscheduler/pull/3913
e740dc7645eb7c2659a40dd0958af41969aafa00
51d476be69287e7c52c53825ea8ed434ed71dc44
"2020-09-22T13:57:17Z"
java
"2020-10-15T02:28:05Z"
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/NettyRemotingClient.java
}); this.responseFutureExecutor.scheduleAtFixedRate(new Runnable() { @Override public void run() { ResponseFuture.scanFutureTable(); } }, 5000, 1000, TimeUnit.MILLISECONDS); isStarted.compareAndSet(false, true); } /** * async send * @param host host * @param command command * @param timeoutMillis timeoutMillis * @param invokeCallback callback function * @throws InterruptedException * @throws RemotingException */ public void sendAsync(final Host host, final Command command, final long timeoutMillis, final InvokeCallback invokeCallback) throws InterruptedException, RemotingException { final Channel channel = getChannel(host); if (channel == null) { throw new RemotingException("network error"); } /** * request unique identification */ final long opaque = command.getOpaque();
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,789
[Bug][remote] channel time out
**Describe the bug** 某些网络情况下,master submit task时,无法进行netty通信,task信息发送不到worker,等待很长时间之后,出现time out的异常,然后过一段儿时间就又会出现这种现象。 **To Reproduce** Steps to reproduce the behavior, for example: 1. 手动运行某个流程 2. 流程处于运行中,所有任务全部是已提交的灰色圆点状态 3. master节点很长一段时间之后会出现timeout的异常 4. worker端没有接受到master的信息 **Expected behavior** 在send方法中,获取channel的时候判断了channel的状态是否active,怀疑这里获取到的active 状态的channel并不能向worker发送数据,等待这个channel异常之后,重新创建的channel可以短暂使用,但是过一段儿时间还是会这样复现 **Screenshots** 公司环境截不了图 **Which version of Dolphin Scheduler:** -[1.3.1] -[1.3.2] **Additional context** 不同的网络环境可能结果不同,有朋友的测试集群没有出现异常,而生产出现异常。我个人的生产环境还没有上线进行测试,测试环境基本每半个小时左右可以出现一次 **Requirement or improvement** - 希望尽快修复这个问题,严重影响调度
https://github.com/apache/dolphinscheduler/issues/3789
https://github.com/apache/dolphinscheduler/pull/3913
e740dc7645eb7c2659a40dd0958af41969aafa00
51d476be69287e7c52c53825ea8ed434ed71dc44
"2020-09-22T13:57:17Z"
java
"2020-10-15T02:28:05Z"
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/NettyRemotingClient.java
/** * control concurrency number */ boolean acquired = this.asyncSemaphore.tryAcquire(timeoutMillis, TimeUnit.MILLISECONDS); if(acquired){ final ReleaseSemaphore releaseSemaphore = new ReleaseSemaphore(this.asyncSemaphore); /** * response future */ final ResponseFuture responseFuture = new ResponseFuture(opaque, timeoutMillis, invokeCallback, releaseSemaphore); try { channel.writeAndFlush(command).addListener(new ChannelFutureListener(){ @Override public void operationComplete(ChannelFuture future) throws Exception { if(future.isSuccess()){ responseFuture.setSendOk(true); return; } else { responseFuture.setSendOk(false); } responseFuture.setCause(future.cause()); responseFuture.putResponse(null); try { responseFuture.executeInvokeCallback(); } catch (Throwable ex){ logger.error("execute callback error", ex); } finally{
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,789
[Bug][remote] channel time out
**Describe the bug** 某些网络情况下,master submit task时,无法进行netty通信,task信息发送不到worker,等待很长时间之后,出现time out的异常,然后过一段儿时间就又会出现这种现象。 **To Reproduce** Steps to reproduce the behavior, for example: 1. 手动运行某个流程 2. 流程处于运行中,所有任务全部是已提交的灰色圆点状态 3. master节点很长一段时间之后会出现timeout的异常 4. worker端没有接受到master的信息 **Expected behavior** 在send方法中,获取channel的时候判断了channel的状态是否active,怀疑这里获取到的active 状态的channel并不能向worker发送数据,等待这个channel异常之后,重新创建的channel可以短暂使用,但是过一段儿时间还是会这样复现 **Screenshots** 公司环境截不了图 **Which version of Dolphin Scheduler:** -[1.3.1] -[1.3.2] **Additional context** 不同的网络环境可能结果不同,有朋友的测试集群没有出现异常,而生产出现异常。我个人的生产环境还没有上线进行测试,测试环境基本每半个小时左右可以出现一次 **Requirement or improvement** - 希望尽快修复这个问题,严重影响调度
https://github.com/apache/dolphinscheduler/issues/3789
https://github.com/apache/dolphinscheduler/pull/3913
e740dc7645eb7c2659a40dd0958af41969aafa00
51d476be69287e7c52c53825ea8ed434ed71dc44
"2020-09-22T13:57:17Z"
java
"2020-10-15T02:28:05Z"
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/NettyRemotingClient.java
responseFuture.release(); } } }); } catch (Throwable ex){ responseFuture.release(); throw new RemotingException(String.format("send command to host: %s failed", host), ex); } } else{ String message = String.format("try to acquire async semaphore timeout: %d, waiting thread num: %d, total permits: %d", timeoutMillis, asyncSemaphore.getQueueLength(), asyncSemaphore.availablePermits()); throw new RemotingTooMuchRequestException(message); } } /** * sync send * @param host host * @param command command * @param timeoutMillis timeoutMillis * @return command * @throws InterruptedException * @throws RemotingException */ public Command sendSync(final Host host, final Command command, final long timeoutMillis) throws InterruptedException, RemotingException { final Channel channel = getChannel(host); if (channel == null) { throw new RemotingException(String.format("connect to : %s fail", host)); } final long opaque = command.getOpaque(); final ResponseFuture responseFuture = new ResponseFuture(opaque, timeoutMillis, null, null);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,789
[Bug][remote] channel time out
**Describe the bug** 某些网络情况下,master submit task时,无法进行netty通信,task信息发送不到worker,等待很长时间之后,出现time out的异常,然后过一段儿时间就又会出现这种现象。 **To Reproduce** Steps to reproduce the behavior, for example: 1. 手动运行某个流程 2. 流程处于运行中,所有任务全部是已提交的灰色圆点状态 3. master节点很长一段时间之后会出现timeout的异常 4. worker端没有接受到master的信息 **Expected behavior** 在send方法中,获取channel的时候判断了channel的状态是否active,怀疑这里获取到的active 状态的channel并不能向worker发送数据,等待这个channel异常之后,重新创建的channel可以短暂使用,但是过一段儿时间还是会这样复现 **Screenshots** 公司环境截不了图 **Which version of Dolphin Scheduler:** -[1.3.1] -[1.3.2] **Additional context** 不同的网络环境可能结果不同,有朋友的测试集群没有出现异常,而生产出现异常。我个人的生产环境还没有上线进行测试,测试环境基本每半个小时左右可以出现一次 **Requirement or improvement** - 希望尽快修复这个问题,严重影响调度
https://github.com/apache/dolphinscheduler/issues/3789
https://github.com/apache/dolphinscheduler/pull/3913
e740dc7645eb7c2659a40dd0958af41969aafa00
51d476be69287e7c52c53825ea8ed434ed71dc44
"2020-09-22T13:57:17Z"
java
"2020-10-15T02:28:05Z"
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/NettyRemotingClient.java
channel.writeAndFlush(command).addListener(new ChannelFutureListener() { @Override public void operationComplete(ChannelFuture future) throws Exception { if(future.isSuccess()){ responseFuture.setSendOk(true); return; } else { responseFuture.setSendOk(false); } responseFuture.setCause(future.cause()); responseFuture.putResponse(null); logger.error("send command {} to host {} failed", command, host); } }); /** * sync wait for result */ Command result = responseFuture.waitResponse(); if(result == null){ if(responseFuture.isSendOK()){ throw new RemotingTimeoutException(host.toString(), timeoutMillis, responseFuture.getCause()); } else{ throw new RemotingException(host.toString(), responseFuture.getCause()); } } return result; } /** * send task * @param host host
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,789
[Bug][remote] channel time out
**Describe the bug** 某些网络情况下,master submit task时,无法进行netty通信,task信息发送不到worker,等待很长时间之后,出现time out的异常,然后过一段儿时间就又会出现这种现象。 **To Reproduce** Steps to reproduce the behavior, for example: 1. 手动运行某个流程 2. 流程处于运行中,所有任务全部是已提交的灰色圆点状态 3. master节点很长一段时间之后会出现timeout的异常 4. worker端没有接受到master的信息 **Expected behavior** 在send方法中,获取channel的时候判断了channel的状态是否active,怀疑这里获取到的active 状态的channel并不能向worker发送数据,等待这个channel异常之后,重新创建的channel可以短暂使用,但是过一段儿时间还是会这样复现 **Screenshots** 公司环境截不了图 **Which version of Dolphin Scheduler:** -[1.3.1] -[1.3.2] **Additional context** 不同的网络环境可能结果不同,有朋友的测试集群没有出现异常,而生产出现异常。我个人的生产环境还没有上线进行测试,测试环境基本每半个小时左右可以出现一次 **Requirement or improvement** - 希望尽快修复这个问题,严重影响调度
https://github.com/apache/dolphinscheduler/issues/3789
https://github.com/apache/dolphinscheduler/pull/3913
e740dc7645eb7c2659a40dd0958af41969aafa00
51d476be69287e7c52c53825ea8ed434ed71dc44
"2020-09-22T13:57:17Z"
java
"2020-10-15T02:28:05Z"
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/NettyRemotingClient.java
* @param command command * @throws RemotingException */ public void send(final Host host, final Command command) throws RemotingException { Channel channel = getChannel(host); if (channel == null) { throw new RemotingException(String.format("connect to : %s fail", host)); } try { ChannelFuture future = channel.writeAndFlush(command).await(); if (future.isSuccess()) { logger.debug("send command : {} , to : {} successfully.", command, host.getAddress()); } else { String msg = String.format("send command : %s , to :%s failed", command, host.getAddress()); logger.error(msg, future.cause()); throw new RemotingException(msg); } } catch (Exception e) { logger.error("Send command {} to address {} encounter error.", command, host.getAddress()); throw new RemotingException(String.format("Send command : %s , to :%s encounter error", command, host.getAddress()), e); } } /** * register processor * @param commandType command type * @param processor processor */ public void registerProcessor(final CommandType commandType, final NettyRequestProcessor processor) { this.registerProcessor(commandType, processor, null); }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,789
[Bug][remote] channel time out
**Describe the bug** 某些网络情况下,master submit task时,无法进行netty通信,task信息发送不到worker,等待很长时间之后,出现time out的异常,然后过一段儿时间就又会出现这种现象。 **To Reproduce** Steps to reproduce the behavior, for example: 1. 手动运行某个流程 2. 流程处于运行中,所有任务全部是已提交的灰色圆点状态 3. master节点很长一段时间之后会出现timeout的异常 4. worker端没有接受到master的信息 **Expected behavior** 在send方法中,获取channel的时候判断了channel的状态是否active,怀疑这里获取到的active 状态的channel并不能向worker发送数据,等待这个channel异常之后,重新创建的channel可以短暂使用,但是过一段儿时间还是会这样复现 **Screenshots** 公司环境截不了图 **Which version of Dolphin Scheduler:** -[1.3.1] -[1.3.2] **Additional context** 不同的网络环境可能结果不同,有朋友的测试集群没有出现异常,而生产出现异常。我个人的生产环境还没有上线进行测试,测试环境基本每半个小时左右可以出现一次 **Requirement or improvement** - 希望尽快修复这个问题,严重影响调度
https://github.com/apache/dolphinscheduler/issues/3789
https://github.com/apache/dolphinscheduler/pull/3913
e740dc7645eb7c2659a40dd0958af41969aafa00
51d476be69287e7c52c53825ea8ed434ed71dc44
"2020-09-22T13:57:17Z"
java
"2020-10-15T02:28:05Z"
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/NettyRemotingClient.java
/** * register processor * * @param commandType command type * @param processor processor * @param executor thread executor */ public void registerProcessor(final CommandType commandType, final NettyRequestProcessor processor, final ExecutorService executor) { this.clientHandler.registerProcessor(commandType, processor, executor); } /** * get channel * @param host * @return */ public Channel getChannel(Host host) { Channel channel = channels.get(host); if(channel != null && channel.isActive()){ return channel; } return createChannel(host, true); } /** * create channel * @param host host * @param isSync sync flag * @return channel */ public Channel createChannel(Host host, boolean isSync) { ChannelFuture future;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,789
[Bug][remote] channel time out
**Describe the bug** 某些网络情况下,master submit task时,无法进行netty通信,task信息发送不到worker,等待很长时间之后,出现time out的异常,然后过一段儿时间就又会出现这种现象。 **To Reproduce** Steps to reproduce the behavior, for example: 1. 手动运行某个流程 2. 流程处于运行中,所有任务全部是已提交的灰色圆点状态 3. master节点很长一段时间之后会出现timeout的异常 4. worker端没有接受到master的信息 **Expected behavior** 在send方法中,获取channel的时候判断了channel的状态是否active,怀疑这里获取到的active 状态的channel并不能向worker发送数据,等待这个channel异常之后,重新创建的channel可以短暂使用,但是过一段儿时间还是会这样复现 **Screenshots** 公司环境截不了图 **Which version of Dolphin Scheduler:** -[1.3.1] -[1.3.2] **Additional context** 不同的网络环境可能结果不同,有朋友的测试集群没有出现异常,而生产出现异常。我个人的生产环境还没有上线进行测试,测试环境基本每半个小时左右可以出现一次 **Requirement or improvement** - 希望尽快修复这个问题,严重影响调度
https://github.com/apache/dolphinscheduler/issues/3789
https://github.com/apache/dolphinscheduler/pull/3913
e740dc7645eb7c2659a40dd0958af41969aafa00
51d476be69287e7c52c53825ea8ed434ed71dc44
"2020-09-22T13:57:17Z"
java
"2020-10-15T02:28:05Z"
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/NettyRemotingClient.java
try { synchronized (bootstrap){ future = bootstrap.connect(new InetSocketAddress(host.getIp(), host.getPort())); } if(isSync){ future.sync(); } if (future.isSuccess()) { Channel channel = future.channel(); channels.put(host, channel); return channel; } } catch (Exception ex) { logger.warn(String.format("connect to %s error", host), ex); } return null; } /** * close */ public void close() { if(isStarted.compareAndSet(true, false)){ try { closeChannels(); if(workerGroup != null){ this.workerGroup.shutdownGracefully(); } if(callbackExecutor != null){ this.callbackExecutor.shutdownNow(); }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,789
[Bug][remote] channel time out
**Describe the bug** 某些网络情况下,master submit task时,无法进行netty通信,task信息发送不到worker,等待很长时间之后,出现time out的异常,然后过一段儿时间就又会出现这种现象。 **To Reproduce** Steps to reproduce the behavior, for example: 1. 手动运行某个流程 2. 流程处于运行中,所有任务全部是已提交的灰色圆点状态 3. master节点很长一段时间之后会出现timeout的异常 4. worker端没有接受到master的信息 **Expected behavior** 在send方法中,获取channel的时候判断了channel的状态是否active,怀疑这里获取到的active 状态的channel并不能向worker发送数据,等待这个channel异常之后,重新创建的channel可以短暂使用,但是过一段儿时间还是会这样复现 **Screenshots** 公司环境截不了图 **Which version of Dolphin Scheduler:** -[1.3.1] -[1.3.2] **Additional context** 不同的网络环境可能结果不同,有朋友的测试集群没有出现异常,而生产出现异常。我个人的生产环境还没有上线进行测试,测试环境基本每半个小时左右可以出现一次 **Requirement or improvement** - 希望尽快修复这个问题,严重影响调度
https://github.com/apache/dolphinscheduler/issues/3789
https://github.com/apache/dolphinscheduler/pull/3913
e740dc7645eb7c2659a40dd0958af41969aafa00
51d476be69287e7c52c53825ea8ed434ed71dc44
"2020-09-22T13:57:17Z"
java
"2020-10-15T02:28:05Z"
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/NettyRemotingClient.java
if(this.responseFutureExecutor != null){ this.responseFutureExecutor.shutdownNow(); } } catch (Exception ex) { logger.error("netty client close exception", ex); } logger.info("netty client closed"); } } /** * close channels */ private void closeChannels(){ for (Channel channel : this.channels.values()) { channel.close(); } this.channels.clear(); } /** * close channel * @param host host */ public void closeChannel(Host host){ Channel channel = this.channels.remove(host); if(channel != null){ channel.close(); } } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,789
[Bug][remote] channel time out
**Describe the bug** 某些网络情况下,master submit task时,无法进行netty通信,task信息发送不到worker,等待很长时间之后,出现time out的异常,然后过一段儿时间就又会出现这种现象。 **To Reproduce** Steps to reproduce the behavior, for example: 1. 手动运行某个流程 2. 流程处于运行中,所有任务全部是已提交的灰色圆点状态 3. master节点很长一段时间之后会出现timeout的异常 4. worker端没有接受到master的信息 **Expected behavior** 在send方法中,获取channel的时候判断了channel的状态是否active,怀疑这里获取到的active 状态的channel并不能向worker发送数据,等待这个channel异常之后,重新创建的channel可以短暂使用,但是过一段儿时间还是会这样复现 **Screenshots** 公司环境截不了图 **Which version of Dolphin Scheduler:** -[1.3.1] -[1.3.2] **Additional context** 不同的网络环境可能结果不同,有朋友的测试集群没有出现异常,而生产出现异常。我个人的生产环境还没有上线进行测试,测试环境基本每半个小时左右可以出现一次 **Requirement or improvement** - 希望尽快修复这个问题,严重影响调度
https://github.com/apache/dolphinscheduler/issues/3789
https://github.com/apache/dolphinscheduler/pull/3913
e740dc7645eb7c2659a40dd0958af41969aafa00
51d476be69287e7c52c53825ea8ed434ed71dc44
"2020-09-22T13:57:17Z"
java
"2020-10-15T02:28:05Z"
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/NettyRemotingServer.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.
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,789
[Bug][remote] channel time out
**Describe the bug** 某些网络情况下,master submit task时,无法进行netty通信,task信息发送不到worker,等待很长时间之后,出现time out的异常,然后过一段儿时间就又会出现这种现象。 **To Reproduce** Steps to reproduce the behavior, for example: 1. 手动运行某个流程 2. 流程处于运行中,所有任务全部是已提交的灰色圆点状态 3. master节点很长一段时间之后会出现timeout的异常 4. worker端没有接受到master的信息 **Expected behavior** 在send方法中,获取channel的时候判断了channel的状态是否active,怀疑这里获取到的active 状态的channel并不能向worker发送数据,等待这个channel异常之后,重新创建的channel可以短暂使用,但是过一段儿时间还是会这样复现 **Screenshots** 公司环境截不了图 **Which version of Dolphin Scheduler:** -[1.3.1] -[1.3.2] **Additional context** 不同的网络环境可能结果不同,有朋友的测试集群没有出现异常,而生产出现异常。我个人的生产环境还没有上线进行测试,测试环境基本每半个小时左右可以出现一次 **Requirement or improvement** - 希望尽快修复这个问题,严重影响调度
https://github.com/apache/dolphinscheduler/issues/3789
https://github.com/apache/dolphinscheduler/pull/3913
e740dc7645eb7c2659a40dd0958af41969aafa00
51d476be69287e7c52c53825ea8ed434ed71dc44
"2020-09-22T13:57:17Z"
java
"2020-10-15T02:28:05Z"
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/NettyRemotingServer.java
* See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.dolphinscheduler.remote; import io.netty.bootstrap.ServerBootstrap; import io.netty.channel.ChannelFuture; import io.netty.channel.ChannelInitializer; import io.netty.channel.ChannelOption; import io.netty.channel.ChannelPipeline; import io.netty.channel.nio.NioEventLoopGroup; import io.netty.channel.socket.nio.NioServerSocketChannel; import io.netty.channel.socket.nio.NioSocketChannel; import org.apache.dolphinscheduler.remote.codec.NettyDecoder; import org.apache.dolphinscheduler.remote.codec.NettyEncoder; import org.apache.dolphinscheduler.remote.command.CommandType; import org.apache.dolphinscheduler.remote.config.NettyServerConfig; import org.apache.dolphinscheduler.remote.handler.NettyServerHandler; import org.apache.dolphinscheduler.remote.processor.NettyRequestProcessor; import org.apache.dolphinscheduler.remote.utils.Constants; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.ThreadFactory; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; /** * remoting netty server */ public class NettyRemotingServer {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,789
[Bug][remote] channel time out
**Describe the bug** 某些网络情况下,master submit task时,无法进行netty通信,task信息发送不到worker,等待很长时间之后,出现time out的异常,然后过一段儿时间就又会出现这种现象。 **To Reproduce** Steps to reproduce the behavior, for example: 1. 手动运行某个流程 2. 流程处于运行中,所有任务全部是已提交的灰色圆点状态 3. master节点很长一段时间之后会出现timeout的异常 4. worker端没有接受到master的信息 **Expected behavior** 在send方法中,获取channel的时候判断了channel的状态是否active,怀疑这里获取到的active 状态的channel并不能向worker发送数据,等待这个channel异常之后,重新创建的channel可以短暂使用,但是过一段儿时间还是会这样复现 **Screenshots** 公司环境截不了图 **Which version of Dolphin Scheduler:** -[1.3.1] -[1.3.2] **Additional context** 不同的网络环境可能结果不同,有朋友的测试集群没有出现异常,而生产出现异常。我个人的生产环境还没有上线进行测试,测试环境基本每半个小时左右可以出现一次 **Requirement or improvement** - 希望尽快修复这个问题,严重影响调度
https://github.com/apache/dolphinscheduler/issues/3789
https://github.com/apache/dolphinscheduler/pull/3913
e740dc7645eb7c2659a40dd0958af41969aafa00
51d476be69287e7c52c53825ea8ed434ed71dc44
"2020-09-22T13:57:17Z"
java
"2020-10-15T02:28:05Z"
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/NettyRemotingServer.java
private final Logger logger = LoggerFactory.getLogger(NettyRemotingServer.class); /** * server bootstrap */ private final ServerBootstrap serverBootstrap = new ServerBootstrap(); /** * encoder */ private final NettyEncoder encoder = new NettyEncoder(); /** * default executor */ private final ExecutorService defaultExecutor = Executors.newFixedThreadPool(Constants.CPUS); /** * boss group */ private final NioEventLoopGroup bossGroup; /** * worker group */ private final NioEventLoopGroup workGroup; /** * server config */ private final NettyServerConfig serverConfig; /** * server handler */ private final NettyServerHandler serverHandler = new NettyServerHandler(this); /**
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,789
[Bug][remote] channel time out
**Describe the bug** 某些网络情况下,master submit task时,无法进行netty通信,task信息发送不到worker,等待很长时间之后,出现time out的异常,然后过一段儿时间就又会出现这种现象。 **To Reproduce** Steps to reproduce the behavior, for example: 1. 手动运行某个流程 2. 流程处于运行中,所有任务全部是已提交的灰色圆点状态 3. master节点很长一段时间之后会出现timeout的异常 4. worker端没有接受到master的信息 **Expected behavior** 在send方法中,获取channel的时候判断了channel的状态是否active,怀疑这里获取到的active 状态的channel并不能向worker发送数据,等待这个channel异常之后,重新创建的channel可以短暂使用,但是过一段儿时间还是会这样复现 **Screenshots** 公司环境截不了图 **Which version of Dolphin Scheduler:** -[1.3.1] -[1.3.2] **Additional context** 不同的网络环境可能结果不同,有朋友的测试集群没有出现异常,而生产出现异常。我个人的生产环境还没有上线进行测试,测试环境基本每半个小时左右可以出现一次 **Requirement or improvement** - 希望尽快修复这个问题,严重影响调度
https://github.com/apache/dolphinscheduler/issues/3789
https://github.com/apache/dolphinscheduler/pull/3913
e740dc7645eb7c2659a40dd0958af41969aafa00
51d476be69287e7c52c53825ea8ed434ed71dc44
"2020-09-22T13:57:17Z"
java
"2020-10-15T02:28:05Z"
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/NettyRemotingServer.java
* started flag */ private final AtomicBoolean isStarted = new AtomicBoolean(false); /** * server init * * @param serverConfig server config */ public NettyRemotingServer(final NettyServerConfig serverConfig){ this.serverConfig = serverConfig; this.bossGroup = new NioEventLoopGroup(1, new ThreadFactory() { private AtomicInteger threadIndex = new AtomicInteger(0); @Override public Thread newThread(Runnable r) { return new Thread(r, String.format("NettyServerBossThread_%d", this.threadIndex.incrementAndGet())); } }); this.workGroup = new NioEventLoopGroup(serverConfig.getWorkerThread(), new ThreadFactory() { private AtomicInteger threadIndex = new AtomicInteger(0); @Override public Thread newThread(Runnable r) { return new Thread(r, String.format("NettyServerWorkerThread_%d", this.threadIndex.incrementAndGet())); } }); } /** * server start */ public void start(){ if(this.isStarted.get()){
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,789
[Bug][remote] channel time out
**Describe the bug** 某些网络情况下,master submit task时,无法进行netty通信,task信息发送不到worker,等待很长时间之后,出现time out的异常,然后过一段儿时间就又会出现这种现象。 **To Reproduce** Steps to reproduce the behavior, for example: 1. 手动运行某个流程 2. 流程处于运行中,所有任务全部是已提交的灰色圆点状态 3. master节点很长一段时间之后会出现timeout的异常 4. worker端没有接受到master的信息 **Expected behavior** 在send方法中,获取channel的时候判断了channel的状态是否active,怀疑这里获取到的active 状态的channel并不能向worker发送数据,等待这个channel异常之后,重新创建的channel可以短暂使用,但是过一段儿时间还是会这样复现 **Screenshots** 公司环境截不了图 **Which version of Dolphin Scheduler:** -[1.3.1] -[1.3.2] **Additional context** 不同的网络环境可能结果不同,有朋友的测试集群没有出现异常,而生产出现异常。我个人的生产环境还没有上线进行测试,测试环境基本每半个小时左右可以出现一次 **Requirement or improvement** - 希望尽快修复这个问题,严重影响调度
https://github.com/apache/dolphinscheduler/issues/3789
https://github.com/apache/dolphinscheduler/pull/3913
e740dc7645eb7c2659a40dd0958af41969aafa00
51d476be69287e7c52c53825ea8ed434ed71dc44
"2020-09-22T13:57:17Z"
java
"2020-10-15T02:28:05Z"
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/NettyRemotingServer.java
return; } this.serverBootstrap .group(this.bossGroup, this.workGroup) .channel(NioServerSocketChannel.class) .option(ChannelOption.SO_REUSEADDR, true) .option(ChannelOption.SO_BACKLOG, serverConfig.getSoBacklog()) .childOption(ChannelOption.SO_KEEPALIVE, serverConfig.isSoKeepalive()) .childOption(ChannelOption.TCP_NODELAY, serverConfig.isTcpNoDelay()) .childOption(ChannelOption.SO_SNDBUF, serverConfig.getSendBufferSize()) .childOption(ChannelOption.SO_RCVBUF, serverConfig.getReceiveBufferSize()) .childHandler(new ChannelInitializer<NioSocketChannel>() { @Override protected void initChannel(NioSocketChannel ch) throws Exception { initNettyChannel(ch); } }); ChannelFuture future; try { future = serverBootstrap.bind(serverConfig.getListenPort()).sync(); } catch (Exception e) { logger.error("NettyRemotingServer bind fail {}, exit",e.getMessage(), e); throw new RuntimeException(String.format("NettyRemotingServer bind %s fail", serverConfig.getListenPort())); } if (future.isSuccess()) { logger.info("NettyRemotingServer bind success at port : {}", serverConfig.getListenPort()); } else if (future.cause() != null) { throw new RuntimeException(String.format("NettyRemotingServer bind %s fail", serverConfig.getListenPort()), future.cause()); } else { throw new RuntimeException(String.format("NettyRemotingServer bind %s fail", serverConfig.getListenPort()));
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,789
[Bug][remote] channel time out
**Describe the bug** 某些网络情况下,master submit task时,无法进行netty通信,task信息发送不到worker,等待很长时间之后,出现time out的异常,然后过一段儿时间就又会出现这种现象。 **To Reproduce** Steps to reproduce the behavior, for example: 1. 手动运行某个流程 2. 流程处于运行中,所有任务全部是已提交的灰色圆点状态 3. master节点很长一段时间之后会出现timeout的异常 4. worker端没有接受到master的信息 **Expected behavior** 在send方法中,获取channel的时候判断了channel的状态是否active,怀疑这里获取到的active 状态的channel并不能向worker发送数据,等待这个channel异常之后,重新创建的channel可以短暂使用,但是过一段儿时间还是会这样复现 **Screenshots** 公司环境截不了图 **Which version of Dolphin Scheduler:** -[1.3.1] -[1.3.2] **Additional context** 不同的网络环境可能结果不同,有朋友的测试集群没有出现异常,而生产出现异常。我个人的生产环境还没有上线进行测试,测试环境基本每半个小时左右可以出现一次 **Requirement or improvement** - 希望尽快修复这个问题,严重影响调度
https://github.com/apache/dolphinscheduler/issues/3789
https://github.com/apache/dolphinscheduler/pull/3913
e740dc7645eb7c2659a40dd0958af41969aafa00
51d476be69287e7c52c53825ea8ed434ed71dc44
"2020-09-22T13:57:17Z"
java
"2020-10-15T02:28:05Z"
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/NettyRemotingServer.java
} isStarted.compareAndSet(false, true); } /** * init netty channel * @param ch socket channel * @throws Exception */ private void initNettyChannel(NioSocketChannel ch) throws Exception{ ChannelPipeline pipeline = ch.pipeline(); pipeline.addLast("encoder", encoder); pipeline.addLast("decoder", new NettyDecoder()); pipeline.addLast("handler", serverHandler); } /** * register processor * @param commandType command type * @param processor processor */ public void registerProcessor(final CommandType commandType, final NettyRequestProcessor processor) { this.registerProcessor(commandType, processor, null); } /** * register processor * * @param commandType command type * @param processor processor * @param executor thread executor */
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,789
[Bug][remote] channel time out
**Describe the bug** 某些网络情况下,master submit task时,无法进行netty通信,task信息发送不到worker,等待很长时间之后,出现time out的异常,然后过一段儿时间就又会出现这种现象。 **To Reproduce** Steps to reproduce the behavior, for example: 1. 手动运行某个流程 2. 流程处于运行中,所有任务全部是已提交的灰色圆点状态 3. master节点很长一段时间之后会出现timeout的异常 4. worker端没有接受到master的信息 **Expected behavior** 在send方法中,获取channel的时候判断了channel的状态是否active,怀疑这里获取到的active 状态的channel并不能向worker发送数据,等待这个channel异常之后,重新创建的channel可以短暂使用,但是过一段儿时间还是会这样复现 **Screenshots** 公司环境截不了图 **Which version of Dolphin Scheduler:** -[1.3.1] -[1.3.2] **Additional context** 不同的网络环境可能结果不同,有朋友的测试集群没有出现异常,而生产出现异常。我个人的生产环境还没有上线进行测试,测试环境基本每半个小时左右可以出现一次 **Requirement or improvement** - 希望尽快修复这个问题,严重影响调度
https://github.com/apache/dolphinscheduler/issues/3789
https://github.com/apache/dolphinscheduler/pull/3913
e740dc7645eb7c2659a40dd0958af41969aafa00
51d476be69287e7c52c53825ea8ed434ed71dc44
"2020-09-22T13:57:17Z"
java
"2020-10-15T02:28:05Z"
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/NettyRemotingServer.java
public void registerProcessor(final CommandType commandType, final NettyRequestProcessor processor, final ExecutorService executor) { this.serverHandler.registerProcessor(commandType, processor, executor); } /** * get default thread executor * @return thread executor */ public ExecutorService getDefaultExecutor() { return defaultExecutor; } public void close() { if(isStarted.compareAndSet(true, false)){ try { if(bossGroup != null){ this.bossGroup.shutdownGracefully(); } if(workGroup != null){ this.workGroup.shutdownGracefully(); } if(defaultExecutor != null){ defaultExecutor.shutdown(); } } catch (Exception ex) { logger.error("netty server close exception", ex); } logger.info("netty server closed"); } } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,789
[Bug][remote] channel time out
**Describe the bug** 某些网络情况下,master submit task时,无法进行netty通信,task信息发送不到worker,等待很长时间之后,出现time out的异常,然后过一段儿时间就又会出现这种现象。 **To Reproduce** Steps to reproduce the behavior, for example: 1. 手动运行某个流程 2. 流程处于运行中,所有任务全部是已提交的灰色圆点状态 3. master节点很长一段时间之后会出现timeout的异常 4. worker端没有接受到master的信息 **Expected behavior** 在send方法中,获取channel的时候判断了channel的状态是否active,怀疑这里获取到的active 状态的channel并不能向worker发送数据,等待这个channel异常之后,重新创建的channel可以短暂使用,但是过一段儿时间还是会这样复现 **Screenshots** 公司环境截不了图 **Which version of Dolphin Scheduler:** -[1.3.1] -[1.3.2] **Additional context** 不同的网络环境可能结果不同,有朋友的测试集群没有出现异常,而生产出现异常。我个人的生产环境还没有上线进行测试,测试环境基本每半个小时左右可以出现一次 **Requirement or improvement** - 希望尽快修复这个问题,严重影响调度
https://github.com/apache/dolphinscheduler/issues/3789
https://github.com/apache/dolphinscheduler/pull/3913
e740dc7645eb7c2659a40dd0958af41969aafa00
51d476be69287e7c52c53825ea8ed434ed71dc44
"2020-09-22T13:57:17Z"
java
"2020-10-15T02:28:05Z"
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/command/CommandType.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.remote.command; public enum CommandType { /** * remove task log request, */ REMOVE_TAK_LOG_REQUEST, /** * remove task log response */ REMOVE_TAK_LOG_RESPONSE, /** * roll view log request */ ROLL_VIEW_LOG_REQUEST,
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,789
[Bug][remote] channel time out
**Describe the bug** 某些网络情况下,master submit task时,无法进行netty通信,task信息发送不到worker,等待很长时间之后,出现time out的异常,然后过一段儿时间就又会出现这种现象。 **To Reproduce** Steps to reproduce the behavior, for example: 1. 手动运行某个流程 2. 流程处于运行中,所有任务全部是已提交的灰色圆点状态 3. master节点很长一段时间之后会出现timeout的异常 4. worker端没有接受到master的信息 **Expected behavior** 在send方法中,获取channel的时候判断了channel的状态是否active,怀疑这里获取到的active 状态的channel并不能向worker发送数据,等待这个channel异常之后,重新创建的channel可以短暂使用,但是过一段儿时间还是会这样复现 **Screenshots** 公司环境截不了图 **Which version of Dolphin Scheduler:** -[1.3.1] -[1.3.2] **Additional context** 不同的网络环境可能结果不同,有朋友的测试集群没有出现异常,而生产出现异常。我个人的生产环境还没有上线进行测试,测试环境基本每半个小时左右可以出现一次 **Requirement or improvement** - 希望尽快修复这个问题,严重影响调度
https://github.com/apache/dolphinscheduler/issues/3789
https://github.com/apache/dolphinscheduler/pull/3913
e740dc7645eb7c2659a40dd0958af41969aafa00
51d476be69287e7c52c53825ea8ed434ed71dc44
"2020-09-22T13:57:17Z"
java
"2020-10-15T02:28:05Z"
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/command/CommandType.java
/** * roll view log response */ ROLL_VIEW_LOG_RESPONSE, /** * view whole log request */ VIEW_WHOLE_LOG_REQUEST, /** * view whole log response */ VIEW_WHOLE_LOG_RESPONSE, /** * get log bytes request */ GET_LOG_BYTES_REQUEST, /** * get log bytes response */ GET_LOG_BYTES_RESPONSE, WORKER_REQUEST, MASTER_RESPONSE, /** * execute task request */ TASK_EXECUTE_REQUEST, /** * execute task ack */ TASK_EXECUTE_ACK,
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,789
[Bug][remote] channel time out
**Describe the bug** 某些网络情况下,master submit task时,无法进行netty通信,task信息发送不到worker,等待很长时间之后,出现time out的异常,然后过一段儿时间就又会出现这种现象。 **To Reproduce** Steps to reproduce the behavior, for example: 1. 手动运行某个流程 2. 流程处于运行中,所有任务全部是已提交的灰色圆点状态 3. master节点很长一段时间之后会出现timeout的异常 4. worker端没有接受到master的信息 **Expected behavior** 在send方法中,获取channel的时候判断了channel的状态是否active,怀疑这里获取到的active 状态的channel并不能向worker发送数据,等待这个channel异常之后,重新创建的channel可以短暂使用,但是过一段儿时间还是会这样复现 **Screenshots** 公司环境截不了图 **Which version of Dolphin Scheduler:** -[1.3.1] -[1.3.2] **Additional context** 不同的网络环境可能结果不同,有朋友的测试集群没有出现异常,而生产出现异常。我个人的生产环境还没有上线进行测试,测试环境基本每半个小时左右可以出现一次 **Requirement or improvement** - 希望尽快修复这个问题,严重影响调度
https://github.com/apache/dolphinscheduler/issues/3789
https://github.com/apache/dolphinscheduler/pull/3913
e740dc7645eb7c2659a40dd0958af41969aafa00
51d476be69287e7c52c53825ea8ed434ed71dc44
"2020-09-22T13:57:17Z"
java
"2020-10-15T02:28:05Z"
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/command/CommandType.java
/** * execute task response */ TASK_EXECUTE_RESPONSE, /** * db task ack */ DB_TASK_ACK, /** * db task response */ DB_TASK_RESPONSE, /** * kill task */ TASK_KILL_REQUEST, /** * kill task response */ TASK_KILL_RESPONSE, /** * ping */ PING, /** * pong */ PONG; }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,789
[Bug][remote] channel time out
**Describe the bug** 某些网络情况下,master submit task时,无法进行netty通信,task信息发送不到worker,等待很长时间之后,出现time out的异常,然后过一段儿时间就又会出现这种现象。 **To Reproduce** Steps to reproduce the behavior, for example: 1. 手动运行某个流程 2. 流程处于运行中,所有任务全部是已提交的灰色圆点状态 3. master节点很长一段时间之后会出现timeout的异常 4. worker端没有接受到master的信息 **Expected behavior** 在send方法中,获取channel的时候判断了channel的状态是否active,怀疑这里获取到的active 状态的channel并不能向worker发送数据,等待这个channel异常之后,重新创建的channel可以短暂使用,但是过一段儿时间还是会这样复现 **Screenshots** 公司环境截不了图 **Which version of Dolphin Scheduler:** -[1.3.1] -[1.3.2] **Additional context** 不同的网络环境可能结果不同,有朋友的测试集群没有出现异常,而生产出现异常。我个人的生产环境还没有上线进行测试,测试环境基本每半个小时左右可以出现一次 **Requirement or improvement** - 希望尽快修复这个问题,严重影响调度
https://github.com/apache/dolphinscheduler/issues/3789
https://github.com/apache/dolphinscheduler/pull/3913
e740dc7645eb7c2659a40dd0958af41969aafa00
51d476be69287e7c52c53825ea8ed434ed71dc44
"2020-09-22T13:57:17Z"
java
"2020-10-15T02:28:05Z"
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/config/NettyClientConfig.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.remote.config; import org.apache.dolphinscheduler.remote.utils.Constants; /** * netty client config */ public class NettyClientConfig {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,789
[Bug][remote] channel time out
**Describe the bug** 某些网络情况下,master submit task时,无法进行netty通信,task信息发送不到worker,等待很长时间之后,出现time out的异常,然后过一段儿时间就又会出现这种现象。 **To Reproduce** Steps to reproduce the behavior, for example: 1. 手动运行某个流程 2. 流程处于运行中,所有任务全部是已提交的灰色圆点状态 3. master节点很长一段时间之后会出现timeout的异常 4. worker端没有接受到master的信息 **Expected behavior** 在send方法中,获取channel的时候判断了channel的状态是否active,怀疑这里获取到的active 状态的channel并不能向worker发送数据,等待这个channel异常之后,重新创建的channel可以短暂使用,但是过一段儿时间还是会这样复现 **Screenshots** 公司环境截不了图 **Which version of Dolphin Scheduler:** -[1.3.1] -[1.3.2] **Additional context** 不同的网络环境可能结果不同,有朋友的测试集群没有出现异常,而生产出现异常。我个人的生产环境还没有上线进行测试,测试环境基本每半个小时左右可以出现一次 **Requirement or improvement** - 希望尽快修复这个问题,严重影响调度
https://github.com/apache/dolphinscheduler/issues/3789
https://github.com/apache/dolphinscheduler/pull/3913
e740dc7645eb7c2659a40dd0958af41969aafa00
51d476be69287e7c52c53825ea8ed434ed71dc44
"2020-09-22T13:57:17Z"
java
"2020-10-15T02:28:05Z"
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/config/NettyClientConfig.java
/** * worker threads,default get machine cpus */ private int workerThreads = Constants.CPUS; /** * whether tpc delay */ private boolean tcpNoDelay = true; /** * whether keep alive */ private boolean soKeepalive = true; /** * send buffer size */ private int sendBufferSize = 65535; /** * receive buffer size */ private int receiveBufferSize = 65535; public int getWorkerThreads() { return workerThreads;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,789
[Bug][remote] channel time out
**Describe the bug** 某些网络情况下,master submit task时,无法进行netty通信,task信息发送不到worker,等待很长时间之后,出现time out的异常,然后过一段儿时间就又会出现这种现象。 **To Reproduce** Steps to reproduce the behavior, for example: 1. 手动运行某个流程 2. 流程处于运行中,所有任务全部是已提交的灰色圆点状态 3. master节点很长一段时间之后会出现timeout的异常 4. worker端没有接受到master的信息 **Expected behavior** 在send方法中,获取channel的时候判断了channel的状态是否active,怀疑这里获取到的active 状态的channel并不能向worker发送数据,等待这个channel异常之后,重新创建的channel可以短暂使用,但是过一段儿时间还是会这样复现 **Screenshots** 公司环境截不了图 **Which version of Dolphin Scheduler:** -[1.3.1] -[1.3.2] **Additional context** 不同的网络环境可能结果不同,有朋友的测试集群没有出现异常,而生产出现异常。我个人的生产环境还没有上线进行测试,测试环境基本每半个小时左右可以出现一次 **Requirement or improvement** - 希望尽快修复这个问题,严重影响调度
https://github.com/apache/dolphinscheduler/issues/3789
https://github.com/apache/dolphinscheduler/pull/3913
e740dc7645eb7c2659a40dd0958af41969aafa00
51d476be69287e7c52c53825ea8ed434ed71dc44
"2020-09-22T13:57:17Z"
java
"2020-10-15T02:28:05Z"
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/config/NettyClientConfig.java
} public void setWorkerThreads(int workerThreads) { this.workerThreads = workerThreads; } public boolean isTcpNoDelay() { return tcpNoDelay; } public void setTcpNoDelay(boolean tcpNoDelay) { this.tcpNoDelay = tcpNoDelay; } public boolean isSoKeepalive() { return soKeepalive; } public void setSoKeepalive(boolean soKeepalive) { this.soKeepalive = soKeepalive; } public int getSendBufferSize() { return sendBufferSize; } public void setSendBufferSize(int sendBufferSize) { this.sendBufferSize = sendBufferSize; } public int getReceiveBufferSize() { return receiveBufferSize; } public void setReceiveBufferSize(int receiveBufferSize) { this.receiveBufferSize = receiveBufferSize; } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,789
[Bug][remote] channel time out
**Describe the bug** 某些网络情况下,master submit task时,无法进行netty通信,task信息发送不到worker,等待很长时间之后,出现time out的异常,然后过一段儿时间就又会出现这种现象。 **To Reproduce** Steps to reproduce the behavior, for example: 1. 手动运行某个流程 2. 流程处于运行中,所有任务全部是已提交的灰色圆点状态 3. master节点很长一段时间之后会出现timeout的异常 4. worker端没有接受到master的信息 **Expected behavior** 在send方法中,获取channel的时候判断了channel的状态是否active,怀疑这里获取到的active 状态的channel并不能向worker发送数据,等待这个channel异常之后,重新创建的channel可以短暂使用,但是过一段儿时间还是会这样复现 **Screenshots** 公司环境截不了图 **Which version of Dolphin Scheduler:** -[1.3.1] -[1.3.2] **Additional context** 不同的网络环境可能结果不同,有朋友的测试集群没有出现异常,而生产出现异常。我个人的生产环境还没有上线进行测试,测试环境基本每半个小时左右可以出现一次 **Requirement or improvement** - 希望尽快修复这个问题,严重影响调度
https://github.com/apache/dolphinscheduler/issues/3789
https://github.com/apache/dolphinscheduler/pull/3913
e740dc7645eb7c2659a40dd0958af41969aafa00
51d476be69287e7c52c53825ea8ed434ed71dc44
"2020-09-22T13:57:17Z"
java
"2020-10-15T02:28:05Z"
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/handler/NettyClientHandler.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
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,789
[Bug][remote] channel time out
**Describe the bug** 某些网络情况下,master submit task时,无法进行netty通信,task信息发送不到worker,等待很长时间之后,出现time out的异常,然后过一段儿时间就又会出现这种现象。 **To Reproduce** Steps to reproduce the behavior, for example: 1. 手动运行某个流程 2. 流程处于运行中,所有任务全部是已提交的灰色圆点状态 3. master节点很长一段时间之后会出现timeout的异常 4. worker端没有接受到master的信息 **Expected behavior** 在send方法中,获取channel的时候判断了channel的状态是否active,怀疑这里获取到的active 状态的channel并不能向worker发送数据,等待这个channel异常之后,重新创建的channel可以短暂使用,但是过一段儿时间还是会这样复现 **Screenshots** 公司环境截不了图 **Which version of Dolphin Scheduler:** -[1.3.1] -[1.3.2] **Additional context** 不同的网络环境可能结果不同,有朋友的测试集群没有出现异常,而生产出现异常。我个人的生产环境还没有上线进行测试,测试环境基本每半个小时左右可以出现一次 **Requirement or improvement** - 希望尽快修复这个问题,严重影响调度
https://github.com/apache/dolphinscheduler/issues/3789
https://github.com/apache/dolphinscheduler/pull/3913
e740dc7645eb7c2659a40dd0958af41969aafa00
51d476be69287e7c52c53825ea8ed434ed71dc44
"2020-09-22T13:57:17Z"
java
"2020-10-15T02:28:05Z"
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/handler/NettyClientHandler.java
* 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.remote.handler; import io.netty.channel.*; import org.apache.dolphinscheduler.remote.NettyRemotingClient; import org.apache.dolphinscheduler.remote.command.Command; import org.apache.dolphinscheduler.remote.command.CommandType; import org.apache.dolphinscheduler.remote.future.ResponseFuture; import org.apache.dolphinscheduler.remote.processor.NettyRequestProcessor; import org.apache.dolphinscheduler.remote.utils.ChannelUtils; import org.apache.dolphinscheduler.remote.utils.Constants; import org.apache.dolphinscheduler.remote.utils.Pair; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.RejectedExecutionException; /** * netty client request handler */ @ChannelHandler.Sharable public class NettyClientHandler extends ChannelInboundHandlerAdapter { private final Logger logger = LoggerFactory.getLogger(NettyClientHandler.class); /** * netty client */
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,789
[Bug][remote] channel time out
**Describe the bug** 某些网络情况下,master submit task时,无法进行netty通信,task信息发送不到worker,等待很长时间之后,出现time out的异常,然后过一段儿时间就又会出现这种现象。 **To Reproduce** Steps to reproduce the behavior, for example: 1. 手动运行某个流程 2. 流程处于运行中,所有任务全部是已提交的灰色圆点状态 3. master节点很长一段时间之后会出现timeout的异常 4. worker端没有接受到master的信息 **Expected behavior** 在send方法中,获取channel的时候判断了channel的状态是否active,怀疑这里获取到的active 状态的channel并不能向worker发送数据,等待这个channel异常之后,重新创建的channel可以短暂使用,但是过一段儿时间还是会这样复现 **Screenshots** 公司环境截不了图 **Which version of Dolphin Scheduler:** -[1.3.1] -[1.3.2] **Additional context** 不同的网络环境可能结果不同,有朋友的测试集群没有出现异常,而生产出现异常。我个人的生产环境还没有上线进行测试,测试环境基本每半个小时左右可以出现一次 **Requirement or improvement** - 希望尽快修复这个问题,严重影响调度
https://github.com/apache/dolphinscheduler/issues/3789
https://github.com/apache/dolphinscheduler/pull/3913
e740dc7645eb7c2659a40dd0958af41969aafa00
51d476be69287e7c52c53825ea8ed434ed71dc44
"2020-09-22T13:57:17Z"
java
"2020-10-15T02:28:05Z"
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/handler/NettyClientHandler.java
private final NettyRemotingClient nettyRemotingClient; /** * callback thread executor */ private final ExecutorService callbackExecutor; /** * processors */ private final ConcurrentHashMap<CommandType, Pair<NettyRequestProcessor, ExecutorService>> processors; /** * default executor */ private final ExecutorService defaultExecutor = Executors.newFixedThreadPool(Constants.CPUS); public NettyClientHandler(NettyRemotingClient nettyRemotingClient, ExecutorService callbackExecutor){ this.nettyRemotingClient = nettyRemotingClient; this.callbackExecutor = callbackExecutor; this.processors = new ConcurrentHashMap(); } /** * When the current channel is not active, * the current channel has reached the end of its life cycle * * @param ctx channel handler context * @throws Exception */ @Override public void channelInactive(ChannelHandlerContext ctx) throws Exception { nettyRemotingClient.closeChannel(ChannelUtils.toAddress(ctx.channel())); ctx.channel().close(); }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,789
[Bug][remote] channel time out
**Describe the bug** 某些网络情况下,master submit task时,无法进行netty通信,task信息发送不到worker,等待很长时间之后,出现time out的异常,然后过一段儿时间就又会出现这种现象。 **To Reproduce** Steps to reproduce the behavior, for example: 1. 手动运行某个流程 2. 流程处于运行中,所有任务全部是已提交的灰色圆点状态 3. master节点很长一段时间之后会出现timeout的异常 4. worker端没有接受到master的信息 **Expected behavior** 在send方法中,获取channel的时候判断了channel的状态是否active,怀疑这里获取到的active 状态的channel并不能向worker发送数据,等待这个channel异常之后,重新创建的channel可以短暂使用,但是过一段儿时间还是会这样复现 **Screenshots** 公司环境截不了图 **Which version of Dolphin Scheduler:** -[1.3.1] -[1.3.2] **Additional context** 不同的网络环境可能结果不同,有朋友的测试集群没有出现异常,而生产出现异常。我个人的生产环境还没有上线进行测试,测试环境基本每半个小时左右可以出现一次 **Requirement or improvement** - 希望尽快修复这个问题,严重影响调度
https://github.com/apache/dolphinscheduler/issues/3789
https://github.com/apache/dolphinscheduler/pull/3913
e740dc7645eb7c2659a40dd0958af41969aafa00
51d476be69287e7c52c53825ea8ed434ed71dc44
"2020-09-22T13:57:17Z"
java
"2020-10-15T02:28:05Z"
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/handler/NettyClientHandler.java
/** * The current channel reads data from the remote * * @param ctx channel handler context * @param msg message * @throws Exception */ @Override public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception { processReceived(ctx.channel(), (Command)msg); } /** * register processor * * @param commandType command type * @param processor processor */ public void registerProcessor(final CommandType commandType, final NettyRequestProcessor processor) { this.registerProcessor(commandType, processor, null); } /** * register processor * * @param commandType command type * @param processor processor * @param executor thread executor */ public void registerProcessor(final CommandType commandType, final NettyRequestProcessor processor, final ExecutorService executor) { ExecutorService executorRef = executor; if(executorRef == null){
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,789
[Bug][remote] channel time out
**Describe the bug** 某些网络情况下,master submit task时,无法进行netty通信,task信息发送不到worker,等待很长时间之后,出现time out的异常,然后过一段儿时间就又会出现这种现象。 **To Reproduce** Steps to reproduce the behavior, for example: 1. 手动运行某个流程 2. 流程处于运行中,所有任务全部是已提交的灰色圆点状态 3. master节点很长一段时间之后会出现timeout的异常 4. worker端没有接受到master的信息 **Expected behavior** 在send方法中,获取channel的时候判断了channel的状态是否active,怀疑这里获取到的active 状态的channel并不能向worker发送数据,等待这个channel异常之后,重新创建的channel可以短暂使用,但是过一段儿时间还是会这样复现 **Screenshots** 公司环境截不了图 **Which version of Dolphin Scheduler:** -[1.3.1] -[1.3.2] **Additional context** 不同的网络环境可能结果不同,有朋友的测试集群没有出现异常,而生产出现异常。我个人的生产环境还没有上线进行测试,测试环境基本每半个小时左右可以出现一次 **Requirement or improvement** - 希望尽快修复这个问题,严重影响调度
https://github.com/apache/dolphinscheduler/issues/3789
https://github.com/apache/dolphinscheduler/pull/3913
e740dc7645eb7c2659a40dd0958af41969aafa00
51d476be69287e7c52c53825ea8ed434ed71dc44
"2020-09-22T13:57:17Z"
java
"2020-10-15T02:28:05Z"
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/handler/NettyClientHandler.java
executorRef = defaultExecutor; } this.processors.putIfAbsent(commandType, new Pair<>(processor, executorRef)); } /** * process received logic * * @param command command */ private void processReceived(final Channel channel, final Command command) { ResponseFuture future = ResponseFuture.getFuture(command.getOpaque()); if(future != null){ future.setResponseCommand(command); future.release(); if(future.getInvokeCallback() != null){ this.callbackExecutor.submit(new Runnable() { @Override public void run() { future.executeInvokeCallback(); } }); } else{ future.putResponse(command); } } else{ processByCommandType(channel, command); } } public void processByCommandType(final Channel channel, final Command command) { final Pair<NettyRequestProcessor, ExecutorService> pair = processors.get(command.getType());
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,789
[Bug][remote] channel time out
**Describe the bug** 某些网络情况下,master submit task时,无法进行netty通信,task信息发送不到worker,等待很长时间之后,出现time out的异常,然后过一段儿时间就又会出现这种现象。 **To Reproduce** Steps to reproduce the behavior, for example: 1. 手动运行某个流程 2. 流程处于运行中,所有任务全部是已提交的灰色圆点状态 3. master节点很长一段时间之后会出现timeout的异常 4. worker端没有接受到master的信息 **Expected behavior** 在send方法中,获取channel的时候判断了channel的状态是否active,怀疑这里获取到的active 状态的channel并不能向worker发送数据,等待这个channel异常之后,重新创建的channel可以短暂使用,但是过一段儿时间还是会这样复现 **Screenshots** 公司环境截不了图 **Which version of Dolphin Scheduler:** -[1.3.1] -[1.3.2] **Additional context** 不同的网络环境可能结果不同,有朋友的测试集群没有出现异常,而生产出现异常。我个人的生产环境还没有上线进行测试,测试环境基本每半个小时左右可以出现一次 **Requirement or improvement** - 希望尽快修复这个问题,严重影响调度
https://github.com/apache/dolphinscheduler/issues/3789
https://github.com/apache/dolphinscheduler/pull/3913
e740dc7645eb7c2659a40dd0958af41969aafa00
51d476be69287e7c52c53825ea8ed434ed71dc44
"2020-09-22T13:57:17Z"
java
"2020-10-15T02:28:05Z"
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/handler/NettyClientHandler.java
if (pair != null) { Runnable run = () -> { try { pair.getLeft().process(channel, command); } catch (Throwable e) { logger.error(String.format("process command %s exception", command), e); } }; try { pair.getRight().submit(run); } catch (RejectedExecutionException e) { logger.warn("thread pool is full, discard command {} from {}", command, ChannelUtils.getRemoteAddress(channel)); } } else { logger.warn("receive response {}, but not matched any request ", command); } } /** * caught exception * @param ctx channel handler context * @param cause cause * @throws Exception */ @Override public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception { logger.error("exceptionCaught : {}", cause); nettyRemotingClient.closeChannel(ChannelUtils.toAddress(ctx.channel())); ctx.channel().close(); } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,789
[Bug][remote] channel time out
**Describe the bug** 某些网络情况下,master submit task时,无法进行netty通信,task信息发送不到worker,等待很长时间之后,出现time out的异常,然后过一段儿时间就又会出现这种现象。 **To Reproduce** Steps to reproduce the behavior, for example: 1. 手动运行某个流程 2. 流程处于运行中,所有任务全部是已提交的灰色圆点状态 3. master节点很长一段时间之后会出现timeout的异常 4. worker端没有接受到master的信息 **Expected behavior** 在send方法中,获取channel的时候判断了channel的状态是否active,怀疑这里获取到的active 状态的channel并不能向worker发送数据,等待这个channel异常之后,重新创建的channel可以短暂使用,但是过一段儿时间还是会这样复现 **Screenshots** 公司环境截不了图 **Which version of Dolphin Scheduler:** -[1.3.1] -[1.3.2] **Additional context** 不同的网络环境可能结果不同,有朋友的测试集群没有出现异常,而生产出现异常。我个人的生产环境还没有上线进行测试,测试环境基本每半个小时左右可以出现一次 **Requirement or improvement** - 希望尽快修复这个问题,严重影响调度
https://github.com/apache/dolphinscheduler/issues/3789
https://github.com/apache/dolphinscheduler/pull/3913
e740dc7645eb7c2659a40dd0958af41969aafa00
51d476be69287e7c52c53825ea8ed434ed71dc44
"2020-09-22T13:57:17Z"
java
"2020-10-15T02:28:05Z"
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/handler/NettyServerHandler.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
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,789
[Bug][remote] channel time out
**Describe the bug** 某些网络情况下,master submit task时,无法进行netty通信,task信息发送不到worker,等待很长时间之后,出现time out的异常,然后过一段儿时间就又会出现这种现象。 **To Reproduce** Steps to reproduce the behavior, for example: 1. 手动运行某个流程 2. 流程处于运行中,所有任务全部是已提交的灰色圆点状态 3. master节点很长一段时间之后会出现timeout的异常 4. worker端没有接受到master的信息 **Expected behavior** 在send方法中,获取channel的时候判断了channel的状态是否active,怀疑这里获取到的active 状态的channel并不能向worker发送数据,等待这个channel异常之后,重新创建的channel可以短暂使用,但是过一段儿时间还是会这样复现 **Screenshots** 公司环境截不了图 **Which version of Dolphin Scheduler:** -[1.3.1] -[1.3.2] **Additional context** 不同的网络环境可能结果不同,有朋友的测试集群没有出现异常,而生产出现异常。我个人的生产环境还没有上线进行测试,测试环境基本每半个小时左右可以出现一次 **Requirement or improvement** - 希望尽快修复这个问题,严重影响调度
https://github.com/apache/dolphinscheduler/issues/3789
https://github.com/apache/dolphinscheduler/pull/3913
e740dc7645eb7c2659a40dd0958af41969aafa00
51d476be69287e7c52c53825ea8ed434ed71dc44
"2020-09-22T13:57:17Z"
java
"2020-10-15T02:28:05Z"
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/handler/NettyServerHandler.java
* (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.remote.handler; import io.netty.channel.*; import org.apache.dolphinscheduler.remote.NettyRemotingServer; import org.apache.dolphinscheduler.remote.command.Command; import org.apache.dolphinscheduler.remote.command.CommandType; import org.apache.dolphinscheduler.remote.processor.NettyRequestProcessor; import org.apache.dolphinscheduler.remote.utils.ChannelUtils; import org.apache.dolphinscheduler.remote.utils.Pair; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ExecutorService; import java.util.concurrent.RejectedExecutionException; /** * netty server request handler */ @ChannelHandler.Sharable public class NettyServerHandler extends ChannelInboundHandlerAdapter { private final Logger logger = LoggerFactory.getLogger(NettyServerHandler.class);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,789
[Bug][remote] channel time out
**Describe the bug** 某些网络情况下,master submit task时,无法进行netty通信,task信息发送不到worker,等待很长时间之后,出现time out的异常,然后过一段儿时间就又会出现这种现象。 **To Reproduce** Steps to reproduce the behavior, for example: 1. 手动运行某个流程 2. 流程处于运行中,所有任务全部是已提交的灰色圆点状态 3. master节点很长一段时间之后会出现timeout的异常 4. worker端没有接受到master的信息 **Expected behavior** 在send方法中,获取channel的时候判断了channel的状态是否active,怀疑这里获取到的active 状态的channel并不能向worker发送数据,等待这个channel异常之后,重新创建的channel可以短暂使用,但是过一段儿时间还是会这样复现 **Screenshots** 公司环境截不了图 **Which version of Dolphin Scheduler:** -[1.3.1] -[1.3.2] **Additional context** 不同的网络环境可能结果不同,有朋友的测试集群没有出现异常,而生产出现异常。我个人的生产环境还没有上线进行测试,测试环境基本每半个小时左右可以出现一次 **Requirement or improvement** - 希望尽快修复这个问题,严重影响调度
https://github.com/apache/dolphinscheduler/issues/3789
https://github.com/apache/dolphinscheduler/pull/3913
e740dc7645eb7c2659a40dd0958af41969aafa00
51d476be69287e7c52c53825ea8ed434ed71dc44
"2020-09-22T13:57:17Z"
java
"2020-10-15T02:28:05Z"
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/handler/NettyServerHandler.java
/** * netty remote server */ private final NettyRemotingServer nettyRemotingServer; /** * server processors queue */ private final ConcurrentHashMap<CommandType, Pair<NettyRequestProcessor, ExecutorService>> processors = new ConcurrentHashMap(); public NettyServerHandler(NettyRemotingServer nettyRemotingServer){ this.nettyRemotingServer = nettyRemotingServer; } /** * When the current channel is not active, * the current channel has reached the end of its life cycle * @param ctx channel handler context * @throws Exception */ @Override public void channelInactive(ChannelHandlerContext ctx) throws Exception { ctx.channel().close(); } /** * The current channel reads data from the remote end * * @param ctx channel handler context * @param msg message * @throws Exception */ @Override public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,789
[Bug][remote] channel time out
**Describe the bug** 某些网络情况下,master submit task时,无法进行netty通信,task信息发送不到worker,等待很长时间之后,出现time out的异常,然后过一段儿时间就又会出现这种现象。 **To Reproduce** Steps to reproduce the behavior, for example: 1. 手动运行某个流程 2. 流程处于运行中,所有任务全部是已提交的灰色圆点状态 3. master节点很长一段时间之后会出现timeout的异常 4. worker端没有接受到master的信息 **Expected behavior** 在send方法中,获取channel的时候判断了channel的状态是否active,怀疑这里获取到的active 状态的channel并不能向worker发送数据,等待这个channel异常之后,重新创建的channel可以短暂使用,但是过一段儿时间还是会这样复现 **Screenshots** 公司环境截不了图 **Which version of Dolphin Scheduler:** -[1.3.1] -[1.3.2] **Additional context** 不同的网络环境可能结果不同,有朋友的测试集群没有出现异常,而生产出现异常。我个人的生产环境还没有上线进行测试,测试环境基本每半个小时左右可以出现一次 **Requirement or improvement** - 希望尽快修复这个问题,严重影响调度
https://github.com/apache/dolphinscheduler/issues/3789
https://github.com/apache/dolphinscheduler/pull/3913
e740dc7645eb7c2659a40dd0958af41969aafa00
51d476be69287e7c52c53825ea8ed434ed71dc44
"2020-09-22T13:57:17Z"
java
"2020-10-15T02:28:05Z"
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/handler/NettyServerHandler.java
processReceived(ctx.channel(), (Command)msg); } /** * register processor * * @param commandType command type * @param processor processor */ public void registerProcessor(final CommandType commandType, final NettyRequestProcessor processor) { this.registerProcessor(commandType, processor, null); } /** * register processor * * @param commandType command type * @param processor processor * @param executor thread executor */ public void registerProcessor(final CommandType commandType, final NettyRequestProcessor processor, final ExecutorService executor) { ExecutorService executorRef = executor; if(executorRef == null){ executorRef = nettyRemotingServer.getDefaultExecutor(); } this.processors.putIfAbsent(commandType, new Pair<>(processor, executorRef)); } /** * process received logic * @param channel channel * @param msg message */
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,789
[Bug][remote] channel time out
**Describe the bug** 某些网络情况下,master submit task时,无法进行netty通信,task信息发送不到worker,等待很长时间之后,出现time out的异常,然后过一段儿时间就又会出现这种现象。 **To Reproduce** Steps to reproduce the behavior, for example: 1. 手动运行某个流程 2. 流程处于运行中,所有任务全部是已提交的灰色圆点状态 3. master节点很长一段时间之后会出现timeout的异常 4. worker端没有接受到master的信息 **Expected behavior** 在send方法中,获取channel的时候判断了channel的状态是否active,怀疑这里获取到的active 状态的channel并不能向worker发送数据,等待这个channel异常之后,重新创建的channel可以短暂使用,但是过一段儿时间还是会这样复现 **Screenshots** 公司环境截不了图 **Which version of Dolphin Scheduler:** -[1.3.1] -[1.3.2] **Additional context** 不同的网络环境可能结果不同,有朋友的测试集群没有出现异常,而生产出现异常。我个人的生产环境还没有上线进行测试,测试环境基本每半个小时左右可以出现一次 **Requirement or improvement** - 希望尽快修复这个问题,严重影响调度
https://github.com/apache/dolphinscheduler/issues/3789
https://github.com/apache/dolphinscheduler/pull/3913
e740dc7645eb7c2659a40dd0958af41969aafa00
51d476be69287e7c52c53825ea8ed434ed71dc44
"2020-09-22T13:57:17Z"
java
"2020-10-15T02:28:05Z"
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/handler/NettyServerHandler.java
private void processReceived(final Channel channel, final Command msg) { final CommandType commandType = msg.getType(); final Pair<NettyRequestProcessor, ExecutorService> pair = processors.get(commandType); if (pair != null) { Runnable r = new Runnable() { @Override public void run() { try { pair.getLeft().process(channel, msg); } catch (Throwable ex) { logger.error("process msg {} error", msg, ex); } } }; try { pair.getRight().submit(r); } catch (RejectedExecutionException e) { logger.warn("thread pool is full, discard msg {} from {}", msg, ChannelUtils.getRemoteAddress(channel)); } } else { logger.warn("commandType {} not support", commandType); } } /** * caught exception * * @param ctx channel handler context * @param cause cause * @throws Exception */
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,789
[Bug][remote] channel time out
**Describe the bug** 某些网络情况下,master submit task时,无法进行netty通信,task信息发送不到worker,等待很长时间之后,出现time out的异常,然后过一段儿时间就又会出现这种现象。 **To Reproduce** Steps to reproduce the behavior, for example: 1. 手动运行某个流程 2. 流程处于运行中,所有任务全部是已提交的灰色圆点状态 3. master节点很长一段时间之后会出现timeout的异常 4. worker端没有接受到master的信息 **Expected behavior** 在send方法中,获取channel的时候判断了channel的状态是否active,怀疑这里获取到的active 状态的channel并不能向worker发送数据,等待这个channel异常之后,重新创建的channel可以短暂使用,但是过一段儿时间还是会这样复现 **Screenshots** 公司环境截不了图 **Which version of Dolphin Scheduler:** -[1.3.1] -[1.3.2] **Additional context** 不同的网络环境可能结果不同,有朋友的测试集群没有出现异常,而生产出现异常。我个人的生产环境还没有上线进行测试,测试环境基本每半个小时左右可以出现一次 **Requirement or improvement** - 希望尽快修复这个问题,严重影响调度
https://github.com/apache/dolphinscheduler/issues/3789
https://github.com/apache/dolphinscheduler/pull/3913
e740dc7645eb7c2659a40dd0958af41969aafa00
51d476be69287e7c52c53825ea8ed434ed71dc44
"2020-09-22T13:57:17Z"
java
"2020-10-15T02:28:05Z"
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/handler/NettyServerHandler.java
@Override public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception { logger.error("exceptionCaught : {}",cause.getMessage(), cause); ctx.channel().close(); } /** * channel write changed * * @param ctx channel handler context * @throws Exception */ @Override public void channelWritabilityChanged(ChannelHandlerContext ctx) throws Exception { Channel ch = ctx.channel(); ChannelConfig config = ch.config(); if (!ch.isWritable()) { if (logger.isWarnEnabled()) { logger.warn("{} is not writable, over high water level : {}", ch, config.getWriteBufferHighWaterMark()); } config.setAutoRead(false); } else { if (logger.isWarnEnabled()) { logger.warn("{} is writable, to low water : {}", ch, config.getWriteBufferLowWaterMark()); } config.setAutoRead(true); } } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,789
[Bug][remote] channel time out
**Describe the bug** 某些网络情况下,master submit task时,无法进行netty通信,task信息发送不到worker,等待很长时间之后,出现time out的异常,然后过一段儿时间就又会出现这种现象。 **To Reproduce** Steps to reproduce the behavior, for example: 1. 手动运行某个流程 2. 流程处于运行中,所有任务全部是已提交的灰色圆点状态 3. master节点很长一段时间之后会出现timeout的异常 4. worker端没有接受到master的信息 **Expected behavior** 在send方法中,获取channel的时候判断了channel的状态是否active,怀疑这里获取到的active 状态的channel并不能向worker发送数据,等待这个channel异常之后,重新创建的channel可以短暂使用,但是过一段儿时间还是会这样复现 **Screenshots** 公司环境截不了图 **Which version of Dolphin Scheduler:** -[1.3.1] -[1.3.2] **Additional context** 不同的网络环境可能结果不同,有朋友的测试集群没有出现异常,而生产出现异常。我个人的生产环境还没有上线进行测试,测试环境基本每半个小时左右可以出现一次 **Requirement or improvement** - 希望尽快修复这个问题,严重影响调度
https://github.com/apache/dolphinscheduler/issues/3789
https://github.com/apache/dolphinscheduler/pull/3913
e740dc7645eb7c2659a40dd0958af41969aafa00
51d476be69287e7c52c53825ea8ed434ed71dc44
"2020-09-22T13:57:17Z"
java
"2020-10-15T02:28:05Z"
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/utils/Constants.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.remote.utils; import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; /** * constant */ public class Constants {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,789
[Bug][remote] channel time out
**Describe the bug** 某些网络情况下,master submit task时,无法进行netty通信,task信息发送不到worker,等待很长时间之后,出现time out的异常,然后过一段儿时间就又会出现这种现象。 **To Reproduce** Steps to reproduce the behavior, for example: 1. 手动运行某个流程 2. 流程处于运行中,所有任务全部是已提交的灰色圆点状态 3. master节点很长一段时间之后会出现timeout的异常 4. worker端没有接受到master的信息 **Expected behavior** 在send方法中,获取channel的时候判断了channel的状态是否active,怀疑这里获取到的active 状态的channel并不能向worker发送数据,等待这个channel异常之后,重新创建的channel可以短暂使用,但是过一段儿时间还是会这样复现 **Screenshots** 公司环境截不了图 **Which version of Dolphin Scheduler:** -[1.3.1] -[1.3.2] **Additional context** 不同的网络环境可能结果不同,有朋友的测试集群没有出现异常,而生产出现异常。我个人的生产环境还没有上线进行测试,测试环境基本每半个小时左右可以出现一次 **Requirement or improvement** - 希望尽快修复这个问题,严重影响调度
https://github.com/apache/dolphinscheduler/issues/3789
https://github.com/apache/dolphinscheduler/pull/3913
e740dc7645eb7c2659a40dd0958af41969aafa00
51d476be69287e7c52c53825ea8ed434ed71dc44
"2020-09-22T13:57:17Z"
java
"2020-10-15T02:28:05Z"
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/remote/utils/Constants.java
public static final String COMMA = ","; public static final String SLASH = "/"; /** * charset */ public static final Charset UTF8 = StandardCharsets.UTF_8; /** * cpus */ public static final int CPUS = Runtime.getRuntime().availableProcessors(); public static final String LOCAL_ADDRESS = IPUtils.getFirstNoLoopbackIP4Address(); }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,836
[Bug][API] verifyProcessDefinitionName error message
![image](https://user-images.githubusercontent.com/39816903/94387399-9ad2a280-017c-11eb-8e46-53722fc7cbe4.png)
https://github.com/apache/dolphinscheduler/issues/3836
https://github.com/apache/dolphinscheduler/pull/3908
d32300ba5b33ec17092ae3ba7dd6502f0f709554
13030502fd27863827ce9a2e3ec905c5a359170b
"2020-09-28T03:21:57Z"
java
"2020-10-15T06:09:28Z"
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.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. */
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,836
[Bug][API] verifyProcessDefinitionName error message
![image](https://user-images.githubusercontent.com/39816903/94387399-9ad2a280-017c-11eb-8e46-53722fc7cbe4.png)
https://github.com/apache/dolphinscheduler/issues/3836
https://github.com/apache/dolphinscheduler/pull/3908
d32300ba5b33ec17092ae3ba7dd6502f0f709554
13030502fd27863827ce9a2e3ec905c5a359170b
"2020-09-28T03:21:57Z"
java
"2020-10-15T06:09:28Z"
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
package org.apache.dolphinscheduler.api.service.impl; import static org.apache.dolphinscheduler.common.Constants.CMDPARAM_SUB_PROCESS_DEFINE_ID; import org.apache.dolphinscheduler.api.dto.ProcessMeta; import org.apache.dolphinscheduler.api.dto.treeview.Instance; import org.apache.dolphinscheduler.api.dto.treeview.TreeViewDto; import org.apache.dolphinscheduler.api.enums.Status; import org.apache.dolphinscheduler.api.service.BaseService; import org.apache.dolphinscheduler.api.service.ProcessDefinitionService; import org.apache.dolphinscheduler.api.service.ProcessDefinitionVersionService; import org.apache.dolphinscheduler.api.service.ProcessInstanceService; import org.apache.dolphinscheduler.api.service.ProjectService; import org.apache.dolphinscheduler.api.service.SchedulerService; import org.apache.dolphinscheduler.api.utils.CheckUtils; import org.apache.dolphinscheduler.api.utils.FileUtils; import org.apache.dolphinscheduler.api.utils.PageInfo; import org.apache.dolphinscheduler.api.utils.exportprocess.ProcessAddTaskParam; import org.apache.dolphinscheduler.api.utils.exportprocess.TaskNodeParamFactory; import org.apache.dolphinscheduler.common.Constants; import org.apache.dolphinscheduler.common.enums.AuthorizationType; import org.apache.dolphinscheduler.common.enums.FailureStrategy; import org.apache.dolphinscheduler.common.enums.Flag; import org.apache.dolphinscheduler.common.enums.Priority; import org.apache.dolphinscheduler.common.enums.ReleaseState; import org.apache.dolphinscheduler.common.enums.TaskType; import org.apache.dolphinscheduler.common.enums.UserType; import org.apache.dolphinscheduler.common.enums.WarningType; import org.apache.dolphinscheduler.common.graph.DAG; import org.apache.dolphinscheduler.common.model.TaskNode; import org.apache.dolphinscheduler.common.model.TaskNodeRelation; import org.apache.dolphinscheduler.common.process.ProcessDag;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,836
[Bug][API] verifyProcessDefinitionName error message
![image](https://user-images.githubusercontent.com/39816903/94387399-9ad2a280-017c-11eb-8e46-53722fc7cbe4.png)
https://github.com/apache/dolphinscheduler/issues/3836
https://github.com/apache/dolphinscheduler/pull/3908
d32300ba5b33ec17092ae3ba7dd6502f0f709554
13030502fd27863827ce9a2e3ec905c5a359170b
"2020-09-28T03:21:57Z"
java
"2020-10-15T06:09:28Z"
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
import org.apache.dolphinscheduler.common.process.Property; import org.apache.dolphinscheduler.common.process.ResourceInfo; import org.apache.dolphinscheduler.common.thread.Stopper; import org.apache.dolphinscheduler.common.utils.CollectionUtils; import org.apache.dolphinscheduler.common.utils.DateUtils; import org.apache.dolphinscheduler.common.utils.JSONUtils; import org.apache.dolphinscheduler.common.utils.StreamUtils; import org.apache.dolphinscheduler.common.utils.StringUtils; import org.apache.dolphinscheduler.common.utils.TaskParametersUtils; import org.apache.dolphinscheduler.dao.entity.ProcessData; import org.apache.dolphinscheduler.dao.entity.ProcessDefinition; import org.apache.dolphinscheduler.dao.entity.ProcessDefinitionVersion; import org.apache.dolphinscheduler.dao.entity.ProcessInstance; import org.apache.dolphinscheduler.dao.entity.Project; import org.apache.dolphinscheduler.dao.entity.Schedule; import org.apache.dolphinscheduler.dao.entity.TaskInstance; import org.apache.dolphinscheduler.dao.entity.User; import org.apache.dolphinscheduler.dao.mapper.ProcessDefinitionMapper; import org.apache.dolphinscheduler.dao.mapper.ProjectMapper; import org.apache.dolphinscheduler.dao.mapper.ScheduleMapper; import org.apache.dolphinscheduler.dao.mapper.TaskInstanceMapper; import org.apache.dolphinscheduler.dao.utils.DagHelper; import org.apache.dolphinscheduler.service.permission.PermissionCheck; import org.apache.dolphinscheduler.service.process.ProcessService; import java.io.BufferedOutputStream; import java.io.IOException; import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,836
[Bug][API] verifyProcessDefinitionName error message
![image](https://user-images.githubusercontent.com/39816903/94387399-9ad2a280-017c-11eb-8e46-53722fc7cbe4.png)
https://github.com/apache/dolphinscheduler/issues/3836
https://github.com/apache/dolphinscheduler/pull/3908
d32300ba5b33ec17092ae3ba7dd6502f0f709554
13030502fd27863827ce9a2e3ec905c5a359170b
"2020-09-28T03:21:57Z"
java
"2020-10-15T06:09:28Z"
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
import java.util.Date; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Objects; import java.util.Optional; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; import java.util.stream.Collectors; import javax.servlet.ServletOutputStream; import javax.servlet.http.HttpServletResponse; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.MediaType; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.multipart.MultipartFile; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.node.ArrayNode; import com.fasterxml.jackson.databind.node.ObjectNode; /** * process definition service impl */ @Service
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,836
[Bug][API] verifyProcessDefinitionName error message
![image](https://user-images.githubusercontent.com/39816903/94387399-9ad2a280-017c-11eb-8e46-53722fc7cbe4.png)
https://github.com/apache/dolphinscheduler/issues/3836
https://github.com/apache/dolphinscheduler/pull/3908
d32300ba5b33ec17092ae3ba7dd6502f0f709554
13030502fd27863827ce9a2e3ec905c5a359170b
"2020-09-28T03:21:57Z"
java
"2020-10-15T06:09:28Z"
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
public class ProcessDefinitionServiceImpl extends BaseService implements ProcessDefinitionService { private static final Logger logger = LoggerFactory.getLogger(ProcessDefinitionServiceImpl.class); private static final String PROCESSDEFINITIONID = "processDefinitionId"; private static final String RELEASESTATE = "releaseState"; private static final String TASKS = "tasks"; @Autowired private ProjectMapper projectMapper; @Autowired private ProjectService projectService; @Autowired private ProcessDefinitionVersionService processDefinitionVersionService; @Autowired private ProcessDefinitionMapper processDefineMapper; @Autowired
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,836
[Bug][API] verifyProcessDefinitionName error message
![image](https://user-images.githubusercontent.com/39816903/94387399-9ad2a280-017c-11eb-8e46-53722fc7cbe4.png)
https://github.com/apache/dolphinscheduler/issues/3836
https://github.com/apache/dolphinscheduler/pull/3908
d32300ba5b33ec17092ae3ba7dd6502f0f709554
13030502fd27863827ce9a2e3ec905c5a359170b
"2020-09-28T03:21:57Z"
java
"2020-10-15T06:09:28Z"
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
private ProcessInstanceService processInstanceService; @Autowired private TaskInstanceMapper taskInstanceMapper; @Autowired private ScheduleMapper scheduleMapper; @Autowired private ProcessService processService; /** * create process definition * * @param loginUser login user * @param projectName project name * @param name process definition name * @param processDefinitionJson process definition json * @param desc description * @param locations locations for nodes * @param connects connects for nodes * @return create result code * @throws JsonProcessingException JsonProcessingException */ public Map<String, Object> createProcessDefinition(User loginUser, String projectName, String name, String processDefinitionJson, String desc, String locations, String connects) throws JsonProcessingException { Map<String, Object> result = new HashMap<>(); Project project = projectMapper.queryByName(projectName);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,836
[Bug][API] verifyProcessDefinitionName error message
![image](https://user-images.githubusercontent.com/39816903/94387399-9ad2a280-017c-11eb-8e46-53722fc7cbe4.png)
https://github.com/apache/dolphinscheduler/issues/3836
https://github.com/apache/dolphinscheduler/pull/3908
d32300ba5b33ec17092ae3ba7dd6502f0f709554
13030502fd27863827ce9a2e3ec905c5a359170b
"2020-09-28T03:21:57Z"
java
"2020-10-15T06:09:28Z"
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
Map<String, Object> checkResult = projectService.checkProjectAndAuth(loginUser, project, projectName); Status resultStatus = (Status) checkResult.get(Constants.STATUS); if (resultStatus != Status.SUCCESS) { return checkResult; } ProcessDefinition processDefine = new ProcessDefinition(); Date now = new Date(); ProcessData processData = JSONUtils.parseObject(processDefinitionJson, ProcessData.class); Map<String, Object> checkProcessJson = checkProcessNodeList(processData, processDefinitionJson); if (checkProcessJson.get(Constants.STATUS) != Status.SUCCESS) { return checkProcessJson; } processDefine.setName(name); processDefine.setReleaseState(ReleaseState.OFFLINE); processDefine.setProjectId(project.getId()); processDefine.setUserId(loginUser.getId()); processDefine.setProcessDefinitionJson(processDefinitionJson); processDefine.setDescription(desc); processDefine.setLocations(locations); processDefine.setConnects(connects); processDefine.setTimeout(processData.getTimeout()); processDefine.setTenantId(processData.getTenantId()); processDefine.setModifyBy(loginUser.getUserName()); processDefine.setResourceIds(getResourceIds(processData)); List<Property> globalParamsList = processData.getGlobalParams(); if (CollectionUtils.isNotEmpty(globalParamsList)) { Set<Property> globalParamsSet = new HashSet<>(globalParamsList); globalParamsList = new ArrayList<>(globalParamsSet); processDefine.setGlobalParamList(globalParamsList);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,836
[Bug][API] verifyProcessDefinitionName error message
![image](https://user-images.githubusercontent.com/39816903/94387399-9ad2a280-017c-11eb-8e46-53722fc7cbe4.png)
https://github.com/apache/dolphinscheduler/issues/3836
https://github.com/apache/dolphinscheduler/pull/3908
d32300ba5b33ec17092ae3ba7dd6502f0f709554
13030502fd27863827ce9a2e3ec905c5a359170b
"2020-09-28T03:21:57Z"
java
"2020-10-15T06:09:28Z"
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
} processDefine.setCreateTime(now); processDefine.setUpdateTime(now); processDefine.setFlag(Flag.YES); processDefineMapper.insert(processDefine); long version = processDefinitionVersionService.addProcessDefinitionVersion(processDefine); processDefine.setVersion(version); processDefineMapper.updateVersionByProcessDefinitionId(processDefine.getId(), version); result.put(Constants.DATA_LIST, processDefineMapper.selectById(processDefine.getId())); putMsg(result, Status.SUCCESS); result.put("processDefinitionId", processDefine.getId()); return result; } /** * get resource ids * * @param processData process data * @return resource ids */ private String getResourceIds(ProcessData processData) { return Optional.ofNullable(processData.getTasks()) .orElse(Collections.emptyList()) .stream() .map(taskNode -> TaskParametersUtils.getParameters(taskNode.getType(), taskNode.getParams())) .filter(Objects::nonNull) .flatMap(parameters -> parameters.getResourceFilesList().stream()) .map(ResourceInfo::getId)
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,836
[Bug][API] verifyProcessDefinitionName error message
![image](https://user-images.githubusercontent.com/39816903/94387399-9ad2a280-017c-11eb-8e46-53722fc7cbe4.png)
https://github.com/apache/dolphinscheduler/issues/3836
https://github.com/apache/dolphinscheduler/pull/3908
d32300ba5b33ec17092ae3ba7dd6502f0f709554
13030502fd27863827ce9a2e3ec905c5a359170b
"2020-09-28T03:21:57Z"
java
"2020-10-15T06:09:28Z"
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
.distinct() .map(Objects::toString) .collect(Collectors.joining(",")); } /** * query process definition list * * @param loginUser login user * @param projectName project name * @return definition list */ public Map<String, Object> queryProcessDefinitionList(User loginUser, String projectName) { HashMap<String, Object> result = new HashMap<>(); Project project = projectMapper.queryByName(projectName); Map<String, Object> checkResult = projectService.checkProjectAndAuth(loginUser, project, projectName); Status resultStatus = (Status) checkResult.get(Constants.STATUS); if (resultStatus != Status.SUCCESS) { return checkResult; } List<ProcessDefinition> resourceList = processDefineMapper.queryAllDefinitionList(project.getId()); result.put(Constants.DATA_LIST, resourceList); putMsg(result, Status.SUCCESS); return result; } /** * query process definition list paging * * @param loginUser login user * @param projectName project name * @param searchVal search value
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,836
[Bug][API] verifyProcessDefinitionName error message
![image](https://user-images.githubusercontent.com/39816903/94387399-9ad2a280-017c-11eb-8e46-53722fc7cbe4.png)
https://github.com/apache/dolphinscheduler/issues/3836
https://github.com/apache/dolphinscheduler/pull/3908
d32300ba5b33ec17092ae3ba7dd6502f0f709554
13030502fd27863827ce9a2e3ec905c5a359170b
"2020-09-28T03:21:57Z"
java
"2020-10-15T06:09:28Z"
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
* @param pageNo page number * @param pageSize page size * @param userId user id * @return process definition page */ public Map<String, Object> queryProcessDefinitionListPaging(User loginUser, String projectName, String searchVal, Integer pageNo, Integer pageSize, Integer userId) { Map<String, Object> result = new HashMap<>(); Project project = projectMapper.queryByName(projectName); Map<String, Object> checkResult = projectService.checkProjectAndAuth(loginUser, project, projectName); Status resultStatus = (Status) checkResult.get(Constants.STATUS); if (resultStatus != Status.SUCCESS) { return checkResult; } Page<ProcessDefinition> page = new Page<>(pageNo, pageSize); IPage<ProcessDefinition> processDefinitionIPage = processDefineMapper.queryDefineListPaging( page, searchVal, userId, project.getId(), isAdmin(loginUser)); PageInfo<ProcessDefinition> pageInfo = new PageInfo<>(pageNo, pageSize); pageInfo.setTotalCount((int) processDefinitionIPage.getTotal()); pageInfo.setLists(processDefinitionIPage.getRecords()); result.put(Constants.DATA_LIST, pageInfo); putMsg(result, Status.SUCCESS); return result; } /** * query datail of process definition * * @param loginUser login user * @param projectName project name * @param processId process definition id * @return process definition detail
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,836
[Bug][API] verifyProcessDefinitionName error message
![image](https://user-images.githubusercontent.com/39816903/94387399-9ad2a280-017c-11eb-8e46-53722fc7cbe4.png)
https://github.com/apache/dolphinscheduler/issues/3836
https://github.com/apache/dolphinscheduler/pull/3908
d32300ba5b33ec17092ae3ba7dd6502f0f709554
13030502fd27863827ce9a2e3ec905c5a359170b
"2020-09-28T03:21:57Z"
java
"2020-10-15T06:09:28Z"
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
*/ public Map<String, Object> queryProcessDefinitionById(User loginUser, String projectName, Integer processId) { Map<String, Object> result = new HashMap<>(); Project project = projectMapper.queryByName(projectName); Map<String, Object> checkResult = projectService.checkProjectAndAuth(loginUser, project, projectName); Status resultStatus = (Status) checkResult.get(Constants.STATUS); if (resultStatus != Status.SUCCESS) { return checkResult; } ProcessDefinition processDefinition = processDefineMapper.selectById(processId); if (processDefinition == null) { putMsg(result, Status.PROCESS_INSTANCE_NOT_EXIST, processId); } else { result.put(Constants.DATA_LIST, processDefinition); putMsg(result, Status.SUCCESS); } return result; } /** * update process definition * * @param loginUser login user * @param projectName project name * @param name process definition name * @param id process definition id * @param processDefinitionJson process definition json * @param desc description * @param locations locations for nodes * @param connects connects for nodes * @return update result code
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,836
[Bug][API] verifyProcessDefinitionName error message
![image](https://user-images.githubusercontent.com/39816903/94387399-9ad2a280-017c-11eb-8e46-53722fc7cbe4.png)
https://github.com/apache/dolphinscheduler/issues/3836
https://github.com/apache/dolphinscheduler/pull/3908
d32300ba5b33ec17092ae3ba7dd6502f0f709554
13030502fd27863827ce9a2e3ec905c5a359170b
"2020-09-28T03:21:57Z"
java
"2020-10-15T06:09:28Z"
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
*/ public Map<String, Object> updateProcessDefinition(User loginUser, String projectName, int id, String name, String processDefinitionJson, String desc, String locations, String connects) { Map<String, Object> result = new HashMap<>(); Project project = projectMapper.queryByName(projectName); Map<String, Object> checkResult = projectService.checkProjectAndAuth(loginUser, project, projectName); Status resultStatus = (Status) checkResult.get(Constants.STATUS); if (resultStatus != Status.SUCCESS) { return checkResult; } ProcessData processData = JSONUtils.parseObject(processDefinitionJson, ProcessData.class); Map<String, Object> checkProcessJson = checkProcessNodeList(processData, processDefinitionJson); if ((checkProcessJson.get(Constants.STATUS) != Status.SUCCESS)) { return checkProcessJson; } ProcessDefinition processDefine = processService.findProcessDefineById(id); if (processDefine == null) { putMsg(result, Status.PROCESS_DEFINE_NOT_EXIST, id); return result; } else if (processDefine.getReleaseState() == ReleaseState.ONLINE) { putMsg(result, Status.PROCESS_DEFINE_NOT_ALLOWED_EDIT, processDefine.getName()); return result; } else { putMsg(result, Status.SUCCESS); } Date now = new Date(); processDefine.setId(id);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
3,836
[Bug][API] verifyProcessDefinitionName error message
![image](https://user-images.githubusercontent.com/39816903/94387399-9ad2a280-017c-11eb-8e46-53722fc7cbe4.png)
https://github.com/apache/dolphinscheduler/issues/3836
https://github.com/apache/dolphinscheduler/pull/3908
d32300ba5b33ec17092ae3ba7dd6502f0f709554
13030502fd27863827ce9a2e3ec905c5a359170b
"2020-09-28T03:21:57Z"
java
"2020-10-15T06:09:28Z"
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
processDefine.setName(name); processDefine.setReleaseState(ReleaseState.OFFLINE); processDefine.setProjectId(project.getId()); processDefine.setProcessDefinitionJson(processDefinitionJson); processDefine.setDescription(desc); processDefine.setLocations(locations); processDefine.setConnects(connects); processDefine.setTimeout(processData.getTimeout()); processDefine.setTenantId(processData.getTenantId()); processDefine.setModifyBy(loginUser.getUserName()); processDefine.setResourceIds(getResourceIds(processData)); List<Property> globalParamsList = new ArrayList<>(); if (CollectionUtils.isNotEmpty(processData.getGlobalParams())) { Set<Property> userDefParamsSet = new HashSet<>(processData.getGlobalParams()); globalParamsList = new ArrayList<>(userDefParamsSet); } processDefine.setGlobalParamList(globalParamsList); processDefine.setUpdateTime(now); processDefine.setFlag(Flag.YES); long version = processDefinitionVersionService.addProcessDefinitionVersion(processDefine); processDefine.setVersion(version); if (processDefineMapper.updateById(processDefine) > 0) { putMsg(result, Status.SUCCESS); result.put(Constants.DATA_LIST, processDefineMapper.queryByDefineId(id)); } else { putMsg(result, Status.UPDATE_PROCESS_DEFINITION_ERROR); } return result;