apache/dolphinscheduler · error · ServiceException
10107
10107
Error message
update workflow definition error
What it means
Thrown when processService.saveWorkflowDefine returns a version <= 0, meaning the updated workflow definition row (including its new log version) failed to persist. This is the generic 'workflow update failed' signal from the definition save step of updateDagDefine.
Source
Thrown at dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/WorkflowDefinitionServiceImpl.java:751
}
} else {
isChange = true;
}
if (!isChange) {
log.info(
"workflow definition does not need to be updated because there is no change, projectCode:{}, workflowDefinitionCode:{}, workflowDefinitionVersion:{}.",
workflowDefinition.getProjectCode(), workflowDefinition.getCode(), workflowDefinition.getVersion());
return workflowDefinition;
}
log.info(
"workflow definition needs to be updated, projectCode:{}, workflowDefinitionCode:{}, workflowDefinitionVersion:{}.",
workflowDefinition.getProjectCode(), workflowDefinition.getCode(), workflowDefinition.getVersion());
workflowDefinition.setUpdateTime(new Date());
int insertVersion =
processService.saveWorkflowDefine(loginUser, workflowDefinition, Boolean.TRUE, Boolean.TRUE);
if (insertVersion <= 0) {
log.error("Update workflow definition error, workflowDefinitionCode:{}.", workflowDefinition.getCode());
throw new ServiceException(Status.UPDATE_WORKFLOW_DEFINITION_ERROR);
}
log.info(
"Update workflow definition complete, workflowDefinitionCode:{}, workflowDefinitionVersion:{}.",
workflowDefinition.getCode(), insertVersion);
workflowDefinition.setVersion(insertVersion);
taskUsedInOtherTaskValid(loginUser, workflowDefinition, taskRelationList);
int insertResult = processService.saveTaskRelation(loginUser, workflowDefinition.getProjectCode(),
workflowDefinition.getCode(), insertVersion, taskRelationList, taskDefinitionLogs, Boolean.TRUE);
if (insertResult != Constants.EXIT_CODE_SUCCESS) {
log.error(
"Update workflow task relations error, projectCode:{}, workflowDefinitionCode:{}, workflowDefinitionVersion:{}.",
workflowDefinition.getProjectCode(), workflowDefinition.getCode(), insertVersion);
throw new ServiceException(Status.UPDATE_WORKFLOW_DEFINITION_ERROR);
}
log.info(
"Update workflow task relations complete, projectCode:{}, workflowDefinitionCode:{}, workflowDefinitionVersion:{}.",
workflowDefinition.getProjectCode(), workflowDefinition.getCode(), insertVersion);View on GitHub (pinned to 02eac45a1b)
Solutions
- Check DolphinScheduler server logs and DB health for the root cause of saveWorkflowDefine failure
- Retry the update after confirming the database is reachable
- Verify the definition fields (name, timeouts, locations) satisfy DB constraints
- Re-run the update once the transient DB issue is resolved
Defensive patterns
Strategy: retry
Validate before calling
// pre-check DB connectivity and constraint-sensitive fields before update boolean dbUp = checkDatabaseHealth();
Try / catch
try { ... } catch (ServiceException e) { if (e.getCode() == 10107) { /* log and retry with backoff */ } } Prevention
- Monitor DolphinScheduler DB health
- Keep definition payloads within DB limits
- Retry transient DB failures with backoff
When it happens
Trigger: updateWorkflowDefinition or batch update where the DB insert/update of the definition fails — DB constraint violation, connection failure, or invalid definition state.
Common situations: Database connectivity issues, unique key conflicts, oversized definition payloads, DB under transaction failure after task save succeeded.
Related errors
AI-assisted analysis of apache/dolphinscheduler@02eac45a1b (2026-09-06).
Data as JSON: /api/errors/c50a3e091833755f.
Report an issue: GitHub.