You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by "Zzih96 (via GitHub)" <gi...@apache.org> on 2025/12/24 02:00:45 UTC
[PR] [Fix-17817] [Master]add workflow timeout [dolphinscheduler]
Zzih96 opened a new pull request, #17819:
URL: https://github.com/apache/dolphinscheduler/pull/17819
<!--Thanks very much for contributing to Apache DolphinScheduler, we are happy that you want to help us improve DolphinScheduler! -->
## Purpose of the pull request
fix https://github.com/apache/dolphinscheduler/issues/17817
## Brief change log
<!--*(for example:)*
- *Add maven-checkstyle-plugin to root pom.xml*
-->
## Verify this pull request
<!--*(Please pick either of the following options)*-->
This pull request is code cleanup without any test coverage.
*(or)*
This pull request is already covered by existing tests, such as *(please describe tests)*.
(or)
This change added tests and can be verified as follows:
<!--*(example:)*
- *Added dolphinscheduler-dao tests for end-to-end.*
- *Added CronUtilsTest to verify the change.*
- *Manually verified the change by testing locally.* -->
(or)
## Pull Request Notice
[Pull Request Notice](https://github.com/apache/dolphinscheduler/blob/dev/docs/docs/en/contribute/join/pull-request.md)
If your pull request contains incompatible change, you should also add it to `docs/docs/en/guide/upgrade/incompatible.md`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix-17817] [Master] Fix workflow timeout alerts failed [dolphinscheduler]
Posted by "SbloodyS (via GitHub)" <gi...@apache.org>.
SbloodyS closed pull request #17819: [Fix-17817] [Master] Fix workflow timeout alerts failed
URL: https://github.com/apache/dolphinscheduler/pull/17819
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix-17817] [Master] Fix workflow timeout alerts failed [dolphinscheduler]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #17819:
URL: https://github.com/apache/dolphinscheduler/pull/17819#issuecomment-3768052965
Please retry analysis of this Pull-Request directly on SonarQube Cloud
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix-17817] [Master] Fix workflow timeout alerts failed [dolphinscheduler]
Posted by "Zzih96 (via GitHub)" <gi...@apache.org>.
Zzih96 commented on code in PR #17819:
URL: https://github.com/apache/dolphinscheduler/pull/17819#discussion_r2675572636
##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/workflow/lifecycle/event/WorkflowTimeoutLifecycleEvent.java:
##########
Review Comment:
I think it shouldn't be 0, but I need to double-check.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix-17817] [Master] Fix workflow timeout alerts failed [dolphinscheduler]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #17819:
URL: https://github.com/apache/dolphinscheduler/pull/17819#issuecomment-3768052529
## [](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=17819) **Quality Gate failed**
Failed conditions
 [50.2% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=17819&metric=new_coverage&view=list) (required ≥ 60%)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=17819)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix-17817] [Master] Fix workflow timeout alerts failed [dolphinscheduler]
Posted by "njnu-seafish (via GitHub)" <gi...@apache.org>.
njnu-seafish commented on PR #17819:
URL: https://github.com/apache/dolphinscheduler/pull/17819#issuecomment-4046408020
> In DolphinScheduler 3.4.1, when both "Timeout Alert" and "Timeout Failure" are selected in the timeout policy settings, only the alert is sent, but the task does not fail as expected. Will this be fixed later?
Task timeout fail bug is fixed by this PR: https://github.com/apache/dolphinscheduler/pull/17818
I test it as follow:
<img width="1923" height="737" alt="企业微信截图_17733185198974" src="https://github.com/user-attachments/assets/8a96cee1-d656-4c4b-a7e9-f4b1f6d45236" />
> 2026-03-12 20:24:10.819 INFO - Final Script Content:
====================
#!/bin/bash
BASEDIR=$(cd `dirname $0`; pwd)
cd $BASEDIR
source /usr/local/apache-dolphinscheduler-dev-SNAPSHOT-bin/bin/env/dolphinscheduler_env.sh
sleep 2m;
====================
2026-03-12 20:24:10.820 INFO - Executing shell command : sudo -u root -i /tmp/dolphinscheduler/exec/process/42/42.sh
2026-03-12 20:24:10.830 INFO - process start, process id is: 59604
2026-03-12 20:25:10.866 INFO - Begin killing task instance, processId: 59604
2026-03-12 20:25:12.268 INFO - prepare to parse pid, raw pid string: sudo(59604)---42.sh(59609)---sleep(59802)
2026-03-12 20:25:15.785 INFO - Sending 2 to process group: 59604 59609 59802, command: sudo -u root -i kill -2 59604 59609 59802
2026-03-12 20:25:30.036 INFO - Kill command: sudo -u root -i kill -2 59604 59609 59802, timed out, still running PIDs: 59604 59609 59802
2026-03-12 20:25:33.314 INFO - Sending 15 to process group: 59604 59609 59802, command: sudo -u root -i kill -15 59604 59609 59802
2026-03-12 20:25:34.401 ERROR - process has failure due to timeout kill, timeout value is:60, timeoutStrategy is:WARNFAILED
2026-03-12 20:25:34.404 INFO - process has killed. execute path:/tmp/dolphinscheduler/exec/process/42, processId:59604 ,exitStatusCode:-1 ,processWaitForStatus:false ,processExitValue:143
2026-03-12 20:25:37.716 INFO - Successfully killed process tree by SIGTERM, processId: 59604
2026-03-12 20:25:37.717 INFO - Process tree for task: 42 is killed or already finished, pid: 59604
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix-17817] [Master] Fix workflow timeout alerts failed [dolphinscheduler]
Posted by "Zzih96 (via GitHub)" <gi...@apache.org>.
Zzih96 commented on PR #17819:
URL: https://github.com/apache/dolphinscheduler/pull/17819#issuecomment-3728157152
@ruanwenjun I've already modified it as requested. Could you please check it again?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix-17817] [Master] Fix workflow timeout alerts failed [dolphinscheduler]
Posted by "github-advanced-security[bot] (via GitHub)" <gi...@apache.org>.
github-advanced-security[bot] commented on code in PR #17819:
URL: https://github.com/apache/dolphinscheduler/pull/17819#discussion_r2644652027
##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/workflow/lifecycle/event/WorkflowTimeoutLifecycleEvent.java:
##########
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.dolphinscheduler.server.master.engine.workflow.lifecycle.event;
+
+import static com.google.common.base.Preconditions.checkState;
+
+import org.apache.dolphinscheduler.dao.entity.WorkflowInstance;
+import org.apache.dolphinscheduler.server.master.engine.ILifecycleEventType;
+import org.apache.dolphinscheduler.server.master.engine.workflow.lifecycle.AbstractWorkflowLifecycleLifecycleEvent;
+import org.apache.dolphinscheduler.server.master.engine.workflow.lifecycle.WorkflowLifecycleEventType;
+import org.apache.dolphinscheduler.server.master.engine.workflow.runnable.IWorkflowExecutionRunnable;
+
+import java.util.concurrent.TimeUnit;
+
+import lombok.Getter;
+
+@Getter
+public class WorkflowTimeoutLifecycleEvent extends AbstractWorkflowLifecycleLifecycleEvent {
+
+ private final IWorkflowExecutionRunnable workflowExecutionRunnable;
Review Comment:
## Missing Override annotation
This method overrides [AbstractWorkflowLifecycleLifecycleEvent.getWorkflowExecutionRunnable](1); it is advisable to add an Override annotation.
[Show more details](https://github.com/apache/dolphinscheduler/security/code-scanning/5597)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix-17817] [Master] Fix workflow timeout alerts failed [dolphinscheduler]
Posted by "njnu-seafish (via GitHub)" <gi...@apache.org>.
njnu-seafish commented on code in PR #17819:
URL: https://github.com/apache/dolphinscheduler/pull/17819#discussion_r2688720148
##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/workflow/lifecycle/handler/WorkflowTimeoutLifecycleEventHandler.java:
##########
Review Comment:
> `isFinalState()` reflects the persistent final state, making it more reliable. `isAllTaskExecutionRunnableChainFinish()`, on the other hand, only reflects the task completion state in memory; it may not yet have transitioned to the final workflow state.
In my opinion, If the workflow is already in a completed state in memory, does that mean timeout handling is no longer meaningful?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix-17817] [Master] Fix workflow timeout alerts failed [dolphinscheduler]
Posted by "ruanwenjun (via GitHub)" <gi...@apache.org>.
ruanwenjun commented on code in PR #17819:
URL: https://github.com/apache/dolphinscheduler/pull/17819#discussion_r2704374485
##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/workflow/lifecycle/handler/WorkflowTimeoutLifecycleEventHandler.java:
##########
@@ -0,0 +1,77 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.dolphinscheduler.server.master.engine.workflow.lifecycle.handler;
+
+import org.apache.dolphinscheduler.dao.entity.WorkflowInstance;
+import org.apache.dolphinscheduler.server.master.engine.ILifecycleEventType;
+import org.apache.dolphinscheduler.server.master.engine.workflow.lifecycle.WorkflowLifecycleEventType;
+import org.apache.dolphinscheduler.server.master.engine.workflow.lifecycle.event.WorkflowTimeoutLifecycleEvent;
+import org.apache.dolphinscheduler.server.master.engine.workflow.runnable.IWorkflowExecutionRunnable;
+import org.apache.dolphinscheduler.server.master.engine.workflow.statemachine.IWorkflowStateAction;
+import org.apache.dolphinscheduler.service.alert.WorkflowAlertManager;
+
+import lombok.extern.slf4j.Slf4j;
+
+import org.springframework.stereotype.Component;
+
+@Slf4j
+@Component
+public class WorkflowTimeoutLifecycleEventHandler
+ extends
+ AbstractWorkflowLifecycleEventHandler<WorkflowTimeoutLifecycleEvent> {
+
+ private final WorkflowAlertManager workflowAlertManager;
+
+ public WorkflowTimeoutLifecycleEventHandler(final WorkflowAlertManager workflowAlertManager) {
+ this.workflowAlertManager = workflowAlertManager;
+ }
+
+ @Override
+ public void handle(final IWorkflowStateAction workflowStateAction,
+ final IWorkflowExecutionRunnable workflowExecutionRunnable,
+ final WorkflowTimeoutLifecycleEvent workflowTimeoutEvent) {
+ final WorkflowInstance workflowInstance = workflowExecutionRunnable.getWorkflowInstance();
+ final String workflowName = workflowExecutionRunnable.getName();
+
+ // Check if workflow is still active (not finished)
Review Comment:
```suggestion
```
##########
dolphinscheduler-master/src/test/java/org/apache/dolphinscheduler/server/master/engine/workflow/lifecycle/handler/WorkflowTimeoutLifecycleEventHandlerTest.java:
##########
@@ -0,0 +1,144 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.dolphinscheduler.server.master.engine.workflow.lifecycle.handler;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+import org.apache.dolphinscheduler.common.enums.WorkflowExecutionStatus;
+import org.apache.dolphinscheduler.dao.entity.WorkflowInstance;
+import org.apache.dolphinscheduler.server.master.engine.workflow.lifecycle.WorkflowLifecycleEventType;
+import org.apache.dolphinscheduler.server.master.engine.workflow.lifecycle.event.WorkflowTimeoutLifecycleEvent;
+import org.apache.dolphinscheduler.server.master.engine.workflow.runnable.IWorkflowExecutionRunnable;
+import org.apache.dolphinscheduler.server.master.engine.workflow.statemachine.IWorkflowStateAction;
+import org.apache.dolphinscheduler.service.alert.WorkflowAlertManager;
+
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.ExtendWith;
+import org.mockito.Mock;
+import org.mockito.junit.jupiter.MockitoExtension;
+
+@ExtendWith(MockitoExtension.class)
+class WorkflowTimeoutLifecycleEventHandlerTest {
Review Comment:
Remove this UT.
##########
dolphinscheduler-master/src/test/java/org/apache/dolphinscheduler/server/master/engine/workflow/lifecycle/handler/WorkflowStartLifecycleEventHandlerTest.java:
##########
@@ -0,0 +1,114 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.dolphinscheduler.server.master.engine.workflow.lifecycle.handler;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+import org.apache.dolphinscheduler.dao.entity.WorkflowInstance;
+import org.apache.dolphinscheduler.server.master.engine.WorkflowEventBus;
+import org.apache.dolphinscheduler.server.master.engine.workflow.lifecycle.WorkflowLifecycleEventType;
+import org.apache.dolphinscheduler.server.master.engine.workflow.lifecycle.event.WorkflowStartLifecycleEvent;
+import org.apache.dolphinscheduler.server.master.engine.workflow.lifecycle.event.WorkflowTimeoutLifecycleEvent;
+import org.apache.dolphinscheduler.server.master.engine.workflow.runnable.IWorkflowExecutionRunnable;
+import org.apache.dolphinscheduler.server.master.engine.workflow.statemachine.IWorkflowStateAction;
+
+import java.util.Date;
+
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.ExtendWith;
+import org.mockito.Mock;
+import org.mockito.junit.jupiter.MockitoExtension;
+
+@ExtendWith(MockitoExtension.class)
+class WorkflowStartLifecycleEventHandlerTest {
Review Comment:
Remove this UT.
##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/workflow/lifecycle/handler/WorkflowTimeoutLifecycleEventHandler.java:
##########
@@ -0,0 +1,77 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.dolphinscheduler.server.master.engine.workflow.lifecycle.handler;
+
+import org.apache.dolphinscheduler.dao.entity.WorkflowInstance;
+import org.apache.dolphinscheduler.server.master.engine.ILifecycleEventType;
+import org.apache.dolphinscheduler.server.master.engine.workflow.lifecycle.WorkflowLifecycleEventType;
+import org.apache.dolphinscheduler.server.master.engine.workflow.lifecycle.event.WorkflowTimeoutLifecycleEvent;
+import org.apache.dolphinscheduler.server.master.engine.workflow.runnable.IWorkflowExecutionRunnable;
+import org.apache.dolphinscheduler.server.master.engine.workflow.statemachine.IWorkflowStateAction;
+import org.apache.dolphinscheduler.service.alert.WorkflowAlertManager;
+
+import lombok.extern.slf4j.Slf4j;
+
+import org.springframework.stereotype.Component;
+
+@Slf4j
+@Component
+public class WorkflowTimeoutLifecycleEventHandler
+ extends
+ AbstractWorkflowLifecycleEventHandler<WorkflowTimeoutLifecycleEvent> {
+
+ private final WorkflowAlertManager workflowAlertManager;
+
+ public WorkflowTimeoutLifecycleEventHandler(final WorkflowAlertManager workflowAlertManager) {
+ this.workflowAlertManager = workflowAlertManager;
+ }
+
+ @Override
+ public void handle(final IWorkflowStateAction workflowStateAction,
+ final IWorkflowExecutionRunnable workflowExecutionRunnable,
+ final WorkflowTimeoutLifecycleEvent workflowTimeoutEvent) {
+ final WorkflowInstance workflowInstance = workflowExecutionRunnable.getWorkflowInstance();
+ final String workflowName = workflowExecutionRunnable.getName();
+
+ // Check if workflow is still active (not finished)
+ if (workflowInstance.getState().isFinalState()) {
+ log.info("The workflow {} has been finished with state: {}, skip timeout alert.",
+ workflowName,
+ workflowInstance.getState().name());
+ return;
+ }
+
+ // Check if warning group is configured
+ if (workflowInstance.getWarningGroupId() == null) {
+ log.info("Skipped sending timeout alert for workflow {} because warningGroupId is null.", workflowName);
+ return;
+ }
Review Comment:
```suggestion
```
If the warningGroupIf is null, don't create event.
##########
dolphinscheduler-master/src/test/java/org/apache/dolphinscheduler/server/master/engine/workflow/lifecycle/event/WorkflowTimeoutLifecycleEventTest.java:
##########
@@ -0,0 +1,135 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.dolphinscheduler.server.master.engine.workflow.lifecycle.event;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+import org.apache.dolphinscheduler.dao.entity.WorkflowInstance;
+import org.apache.dolphinscheduler.server.master.engine.workflow.lifecycle.WorkflowLifecycleEventType;
+import org.apache.dolphinscheduler.server.master.engine.workflow.runnable.IWorkflowExecutionRunnable;
+import org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteContext;
+
+import java.util.Date;
+
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.ExtendWith;
+import org.mockito.junit.jupiter.MockitoExtension;
+
+@ExtendWith(MockitoExtension.class)
+class WorkflowTimeoutLifecycleEventTest {
Review Comment:
Remove this UT.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix-17817] [Master] Fix workflow timeout alerts failed [dolphinscheduler]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #17819:
URL: https://github.com/apache/dolphinscheduler/pull/17819#issuecomment-3695291762
## [](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=17819) **Quality Gate passed**
Issues
 [1 New issue](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=17819&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=17819&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=17819&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [68.8% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=17819&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=17819&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=17819)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix-17817] [Master] Fix workflow timeout alerts failed [dolphinscheduler]
Posted by "ruanwenjun (via GitHub)" <gi...@apache.org>.
ruanwenjun commented on code in PR #17819:
URL: https://github.com/apache/dolphinscheduler/pull/17819#discussion_r2650122024
##########
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/AlertDao.java:
##########
@@ -192,9 +192,10 @@ public void sendServerStoppedAlert(String host, String serverType) {
* workflow time out alert
*
* @param workflowInstance workflowInstance
- * @param projectUser projectUser
+ * @param projectUser projectUser
+ * @param modifyBy modifyBy
*/
- public void sendWorkflowTimeoutAlert(WorkflowInstance workflowInstance, ProjectUser projectUser) {
+ public void sendWorkflowTimeoutAlert(WorkflowInstance workflowInstance, ProjectUser projectUser, String modifyBy) {
Review Comment:
Please don't change this, this PR should only fix the alert bug.
##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/workflow/lifecycle/handler/WorkflowTimeoutLifecycleEventHandler.java:
##########
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.dolphinscheduler.server.master.engine.workflow.lifecycle.handler;
+
+import org.apache.dolphinscheduler.dao.entity.WorkflowInstance;
+import org.apache.dolphinscheduler.server.master.engine.ILifecycleEventType;
+import org.apache.dolphinscheduler.server.master.engine.workflow.lifecycle.WorkflowLifecycleEventType;
+import org.apache.dolphinscheduler.server.master.engine.workflow.lifecycle.event.WorkflowTimeoutLifecycleEvent;
+import org.apache.dolphinscheduler.server.master.engine.workflow.runnable.IWorkflowExecutionRunnable;
+import org.apache.dolphinscheduler.server.master.engine.workflow.statemachine.IWorkflowStateAction;
+import org.apache.dolphinscheduler.service.alert.WorkflowAlertManager;
+
+import lombok.extern.slf4j.Slf4j;
+
+import org.springframework.stereotype.Component;
+
+@Slf4j
+@Component
+public class WorkflowTimeoutLifecycleEventHandler
+ extends
+ AbstractWorkflowLifecycleEventHandler<WorkflowTimeoutLifecycleEvent> {
+
+ private final WorkflowAlertManager workflowAlertManager;
+
+ public WorkflowTimeoutLifecycleEventHandler(final WorkflowAlertManager workflowAlertManager) {
+ this.workflowAlertManager = workflowAlertManager;
+ }
+
+ @Override
+ public void handle(final IWorkflowStateAction workflowStateAction,
+ final IWorkflowExecutionRunnable workflowExecutionRunnable,
+ final WorkflowTimeoutLifecycleEvent workflowTimeoutEvent) {
+ final WorkflowInstance workflowInstance = workflowExecutionRunnable.getWorkflowInstance();
+ final String workflowName = workflowExecutionRunnable.getName();
+
+ // Check if workflow is still active (not finished)
+ if (workflowInstance.getState().isFinalState()) {
+ log.info("The workflow {} has been finished with state: {}, skip timeout alert.",
+ workflowName,
+ workflowInstance.getState().name());
+ return;
+ }
+
+ log.info("The workflow {} has timeout, try to send a timeout alert.", workflowName);
+ doWorkflowTimeoutAlert(workflowInstance);
+ }
+
+ private void doWorkflowTimeoutAlert(final WorkflowInstance workflowInstance) {
+ // ProjectUser will be built in WorkflowAlertManager
+ workflowAlertManager.sendWorkflowTimeoutAlert(workflowInstance, null);
Review Comment:
Should fix like #17818, otherwise will throw NPE
##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/workflow/lifecycle/event/WorkflowTimeoutLifecycleEvent.java:
##########
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.dolphinscheduler.server.master.engine.workflow.lifecycle.event;
+
+import static com.google.common.base.Preconditions.checkState;
+
+import org.apache.dolphinscheduler.dao.entity.WorkflowInstance;
+import org.apache.dolphinscheduler.server.master.engine.ILifecycleEventType;
+import org.apache.dolphinscheduler.server.master.engine.workflow.lifecycle.AbstractWorkflowLifecycleLifecycleEvent;
+import org.apache.dolphinscheduler.server.master.engine.workflow.lifecycle.WorkflowLifecycleEventType;
+import org.apache.dolphinscheduler.server.master.engine.workflow.runnable.IWorkflowExecutionRunnable;
+
+import java.util.concurrent.TimeUnit;
+
+public class WorkflowTimeoutLifecycleEvent extends AbstractWorkflowLifecycleLifecycleEvent {
+
+ private final IWorkflowExecutionRunnable workflowExecutionRunnable;
+
+ protected WorkflowTimeoutLifecycleEvent(final IWorkflowExecutionRunnable workflowExecutionRunnable,
+ final long timeout) {
+ super(timeout);
+ this.workflowExecutionRunnable = workflowExecutionRunnable;
+ }
+
+ @Override
+ public IWorkflowExecutionRunnable getWorkflowExecutionRunnable() {
+ return workflowExecutionRunnable;
+ }
+
+ public static WorkflowTimeoutLifecycleEvent of(final IWorkflowExecutionRunnable workflowExecutionRunnable) {
+ final WorkflowInstance workflowInstance = workflowExecutionRunnable.getWorkflowInstance();
+ checkState(workflowInstance != null, "The workflow instance must be initialized before timeout monitoring.");
+
+ final int timeout = workflowInstance.getTimeout();
+ checkState(timeout >= 0, "The workflow timeout: %s must >=0 minutes", timeout);
+
+ // Calculate remaining time until timeout: timeout - elapsed time
+ long delayTime = TimeUnit.MINUTES.toMillis(timeout)
+ - (System.currentTimeMillis() - workflowInstance.getStartTime().getTime());
+ // Ensure delayTime is not negative (trigger immediately if already timeout)
Review Comment:
I am not clear in which case the `delayTime` might be negative, since `System.currentTimeMillis() - workflowInstance.getStartTime().getTime()` should always > 0.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix-17817] [Master] Fix workflow timeout alerts failed [dolphinscheduler]
Posted by "njnu-seafish (via GitHub)" <gi...@apache.org>.
njnu-seafish commented on PR #17819:
URL: https://github.com/apache/dolphinscheduler/pull/17819#issuecomment-4052119804
@Zzih96 @ruanwenjun This bug involves a critical feature and has been stagnant for several months. Since I actually resolved the task timeout and workflow timeout issue quite some time ago, I would like to finalize the process and get it closed.
<img width="2291" height="1258" alt="企业微信截图_1773370742381" src="https://github.com/user-attachments/assets/efdb69ee-7a01-49a4-b151-605463872c0e" />
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix-17817] [Master] Fix workflow timeout alerts failed [dolphinscheduler]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #17819:
URL: https://github.com/apache/dolphinscheduler/pull/17819#issuecomment-3728359423
## [](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=17819) **Quality Gate passed**
Issues
 [1 New issue](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=17819&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=17819&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=17819&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [78.9% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=17819&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=17819&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=17819)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix-17817] [Master] Fix workflow timeout alerts failed [dolphinscheduler]
Posted by "honkerjha (via GitHub)" <gi...@apache.org>.
honkerjha commented on PR #17819:
URL: https://github.com/apache/dolphinscheduler/pull/17819#issuecomment-4045107538
In DolphinScheduler 3.4.1, when both "Timeout Alert" and "Timeout Failure" are selected in the timeout policy settings, only the alert is sent, but the task does not fail as expected. Will this be fixed later?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix-17817] [Master] Fix workflow timeout alerts failed [dolphinscheduler]
Posted by "honkerjha (via GitHub)" <gi...@apache.org>.
honkerjha commented on PR #17819:
URL: https://github.com/apache/dolphinscheduler/pull/17819#issuecomment-4051837056
> > In DolphinScheduler 3.4.1, when both "Timeout Alert" and "Timeout Failure" are selected in the timeout policy settings, only the alert is sent, but the task does not fail as expected. Will this be fixed later?
>
> Task timeout fail bug is fixed by this PR: #17818
Has this issue been fixed in 3.4.1? I set up timeout failure for stored procedure tasks in DolphinScheduler 3.4.1, but it's not working as expected. @njnu-seafish
<img width="922" height="645" alt="image" src="https://github.com/user-attachments/assets/0aa1d218-a836-4ffc-a3e8-62ae5e11f54a" />
<img width="907" height="523" alt="image" src="https://github.com/user-attachments/assets/45de6913-686a-4fcc-82db-7746ce4bd9ee" />
<img width="617" height="818" alt="image" src="https://github.com/user-attachments/assets/e28bea02-2a5d-47fd-af55-13ff19bc66eb" />
<img width="1209" height="465" alt="image" src="https://github.com/user-attachments/assets/58b925c8-31a2-4956-bc57-f0bbb45d90bd" />
<img width="1424" height="119" alt="image" src="https://github.com/user-attachments/assets/dbcb28ce-4781-4bba-88cd-dfc180c8f2d4" />
Looking at the execution logs of the stored procedure, the following content is present:
```
2026-03-13 10:00:13.781 INFO - setSqlParamsMap: Property with paramName: value1 put in sqlParamsMap of content call aSP_test20260204(null,null,${value1}); successfully.
2026-03-13 10:01:13.783 INFO - Try to cancel this procedure task
2026-03-13 10:01:13.791 INFO - This procedure task was canceled
2026-03-13 10:02:44.029 INFO - out parameter varchar key : value1 , value : 0
```
So does the timeout failure strategy only cancel the execution of the stored procedure, rather than changing the status of this node to "failed"? I am wondering whether this is a bug or a software feature.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix-17817] [Master] Fix workflow timeout alerts failed [dolphinscheduler]
Posted by "njnu-seafish (via GitHub)" <gi...@apache.org>.
njnu-seafish commented on PR #17819:
URL: https://github.com/apache/dolphinscheduler/pull/17819#issuecomment-4052982633
> > > > > In DolphinScheduler 3.4.1, when both "Timeout Alert" and "Timeout Failure" are selected in the timeout policy settings, only the alert is sent, but the task does not fail as expected. Will this be fixed later?
> > > >
> > > >
> > > > Task timeout fail bug is fixed by this PR: #17818
> > >
> > >
> > > Has this issue been fixed in 3.4.1? I set up timeout failure for stored procedure tasks in DolphinScheduler 3.4.1, but it's not working as expected. @njnu-seafish
> > > <img alt="image" width="922" height="645" src="https://private-user-images.githubusercontent.com/26373423/562673244-0aa1d218-a836-4ffc-a3e8-62ae5e11f54a.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzMzNjk3MDMsIm5iZiI6MTc3MzM2OTQwMywicGF0aCI6Ii8yNjM3MzQyMy81NjI2NzMyNDQtMGFhMWQyMTgtYTgzNi00ZmZjLWEzZTgtNjJhZTVlMTFmNTRhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjAzMTMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwMzEzVDAyMzY0M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWEyNWJkMTBhMjMwOTdmMjJjMWVlNzNlNTU4NDI1YzI4MzZmOTEzNzRkODQ3YTI1NGM5OGY3N2RiOWFhNWE1YWEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.1031WCWE2kRtfOEih4PWyudZNLfMR1HZw0eUreZv3SE"> <img alt="image" width="907" height="523" src="https://private-user-images.githubusercontent.com/26373423/562673545-45de6913-686a-4fcc-82db-7746ce4bd9ee.png?jwt=
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzMzNjk3MDMsIm5iZiI6MTc3MzM2OTQwMywicGF0aCI6Ii8yNjM3MzQyMy81NjI2NzM1NDUtNDVkZTY5MTMtNjg2YS00ZmNjLTgyZGItNzc0NmNlNGJkOWVlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjAzMTMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwMzEzVDAyMzY0M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPThjN2IzYzhhNzQxYzQyMDhlMWNiMzk0MmE5NzI5MWIwMGQ0NDU4MzNjZjAzNTlhMDAwYjA2OTRhZjgyNjRlNzQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.XdFg4l305w3ujdgI-OCdKdCzjVvIUwoO5xkOqPAwZSY"> <img alt="image" width="629" height="779" src="https://private-user-images.githubusercontent.com/26373423/562677119-f2ab9340-524c-467e-b5b6-d93fef4d2d0f.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzMzNjk3MDMsIm5iZiI6MTc3MzM2OTQw
MywicGF0aCI6Ii8yNjM3MzQyMy81NjI2NzcxMTktZjJhYjkzNDAtNTI0Yy00NjdlLWI1YjYtZDkzZmVmNGQyZDBmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjAzMTMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwMzEzVDAyMzY0M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTE4ZGViNDU3MjEzMzBmNmZhZDNmMzc3M2U0ZjE3Y2UwZWE2NzllNDE1ZDJkYTJkZjYxZjgzZTdjMTExZjgxMzAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.9PEXlaJXAe2rmnDEua_6U97_AA_B4sNP_Zssjpm_GuI"> <img alt="image" width="1260" height="501" src="https://private-user-images.githubusercontent.com/26373423/562676166-6d8adf7f-dace-43d4-8211-b8c324f04fa6.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzMzNjk3MDMsIm5iZiI6MTc3MzM2OTQwMywicGF0aCI6Ii8yNjM3MzQyMy81NjI2NzYxNjYtNmQ4YWRmN2YtZGFjZS00M2Q0LTgyMTEtYjhjMzI0ZjA0ZmE2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFW
Q09EWUxTQTUzUFFLNFpBJTJGMjAyNjAzMTMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwMzEzVDAyMzY0M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTI3OTIyMjE1MmIxNTNjOTc5MzgzNzI5OTVjZDg4NzlkNWUyMThkZTg1YWJkNzg4YjdiMjJjMzM5NDIwYWFiNWQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.A4-zs6SmaV-zvKT96XrUWVQZ3TMnt27-KiINPkp_QfU"> <img alt="image" width="1424" height="119" src="https://private-user-images.githubusercontent.com/26373423/562673446-dbcb28ce-4781-4bba-88cd-dfc180c8f2d4.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzMzNjk3MDMsIm5iZiI6MTc3MzM2OTQwMywicGF0aCI6Ii8yNjM3MzQyMy81NjI2NzM0NDYtZGJjYjI4Y2UtNDc4MS00YmJhLTg4Y2QtZGZjMTgwYzhmMmQ0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjAzMTMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwMzEzVDAyMzY0M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWQzZmFi
MWY3Yzc3MWYwM2YzZjc0NWJhN2EwYmJhZGY1MDY5MWU2ODM3YmIyNmEzMmI1MzBlMTMxODRkMjhmNzkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.xaP_57smBl68PvelbbN0RECFUgCzWtRcdFEMzM7eqGM">
> > > Looking at the execution logs of the stored procedure, the following content is present:
> > > ```
> > > 2026-03-13 10:00:13.781 INFO - setSqlParamsMap: Property with paramName: value1 put in sqlParamsMap of content call aSP_test20260204(null,null,${value1}); successfully.
> > > 2026-03-13 10:01:13.783 INFO - Try to cancel this procedure task
> > > 2026-03-13 10:01:13.791 INFO - This procedure task was canceled
> > > 2026-03-13 10:02:44.029 INFO - out parameter varchar key : value1 , value : 0
> > > ```
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > So does the timeout failure strategy only cancel the execution of the stored procedure, rather than changing the status of this node to "failed"? I am wondering whether this is a bug or a software feature.
> >
> >
> > Other Task Type timeout is ok? The logs indicate that the timeout cancellation logic was triggered; however, it appears the stored procedure failed to cancel successfully.
>
> Other tasks work fine, but stored procedures with SLEEP cannot be stopped at all—this is likely a database-specific behavior.
Both SqlTask and ProcedureTask may fail to respond to interruption signals under certain circumstances. Specifically, the database can enter an 'uninterruptible' state where even simple SQL statements become atomic operations during specific execution phases, preventing them from responding to cancellation requests immediately.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix-17817] [Master] Fix workflow timeout alerts failed [dolphinscheduler]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #17819:
URL: https://github.com/apache/dolphinscheduler/pull/17819#issuecomment-3695292763
## [](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=17819) **Quality Gate passed**
Issues
 [1 New issue](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=17819&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=17819&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=17819&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [68.8% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=17819&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=17819&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=17819)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix-17817] [Master] Fix workflow timeout alerts failed [dolphinscheduler]
Posted by "njnu-seafish (via GitHub)" <gi...@apache.org>.
njnu-seafish commented on PR #17819:
URL: https://github.com/apache/dolphinscheduler/pull/17819#issuecomment-4052014183
> > > In DolphinScheduler 3.4.1, when both "Timeout Alert" and "Timeout Failure" are selected in the timeout policy settings, only the alert is sent, but the task does not fail as expected. Will this be fixed later?
> >
> >
> > Task timeout fail bug is fixed by this PR: #17818
>
> Has this issue been fixed in 3.4.1? I set up timeout failure for stored procedure tasks in DolphinScheduler 3.4.1, but it's not working as expected. @njnu-seafish
>
> <img alt="image" width="922" height="645" src="https://private-user-images.githubusercontent.com/26373423/562673244-0aa1d218-a836-4ffc-a3e8-62ae5e11f54a.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzMzNjk3MDMsIm5iZiI6MTc3MzM2OTQwMywicGF0aCI6Ii8yNjM3MzQyMy81NjI2NzMyNDQtMGFhMWQyMTgtYTgzNi00ZmZjLWEzZTgtNjJhZTVlMTFmNTRhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjAzMTMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwMzEzVDAyMzY0M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWEyNWJkMTBhMjMwOTdmMjJjMWVlNzNlNTU4NDI1YzI4MzZmOTEzNzRkODQ3YTI1NGM5OGY3N2RiOWFhNWE1YWEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.1031WCWE2kRtfOEih4PWyudZNLfMR1HZw0eUreZv3SE"> <img alt="image" width="907" height="523" src="https://private-user-images.githubusercontent.com/26373423/562673545-45de6913-686a-4fcc-82db-7746ce4bd9ee.png?jwt=eyJ0
eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzMzNjk3MDMsIm5iZiI6MTc3MzM2OTQwMywicGF0aCI6Ii8yNjM3MzQyMy81NjI2NzM1NDUtNDVkZTY5MTMtNjg2YS00ZmNjLTgyZGItNzc0NmNlNGJkOWVlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjAzMTMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwMzEzVDAyMzY0M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPThjN2IzYzhhNzQxYzQyMDhlMWNiMzk0MmE5NzI5MWIwMGQ0NDU4MzNjZjAzNTlhMDAwYjA2OTRhZjgyNjRlNzQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.XdFg4l305w3ujdgI-OCdKdCzjVvIUwoO5xkOqPAwZSY"> <img alt="image" width="629" height="779" src="https://private-user-images.githubusercontent.com/26373423/562677119-f2ab9340-524c-467e-b5b6-d93fef4d2d0f.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzMzNjk3MDMsIm5iZiI6MTc3MzM2OTQwMywi
cGF0aCI6Ii8yNjM3MzQyMy81NjI2NzcxMTktZjJhYjkzNDAtNTI0Yy00NjdlLWI1YjYtZDkzZmVmNGQyZDBmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjAzMTMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwMzEzVDAyMzY0M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTE4ZGViNDU3MjEzMzBmNmZhZDNmMzc3M2U0ZjE3Y2UwZWE2NzllNDE1ZDJkYTJkZjYxZjgzZTdjMTExZjgxMzAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.9PEXlaJXAe2rmnDEua_6U97_AA_B4sNP_Zssjpm_GuI"> <img alt="image" width="1260" height="501" src="https://private-user-images.githubusercontent.com/26373423/562676166-6d8adf7f-dace-43d4-8211-b8c324f04fa6.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzMzNjk3MDMsIm5iZiI6MTc3MzM2OTQwMywicGF0aCI6Ii8yNjM3MzQyMy81NjI2NzYxNjYtNmQ4YWRmN2YtZGFjZS00M2Q0LTgyMTEtYjhjMzI0ZjA0ZmE2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09E
WUxTQTUzUFFLNFpBJTJGMjAyNjAzMTMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwMzEzVDAyMzY0M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTI3OTIyMjE1MmIxNTNjOTc5MzgzNzI5OTVjZDg4NzlkNWUyMThkZTg1YWJkNzg4YjdiMjJjMzM5NDIwYWFiNWQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.A4-zs6SmaV-zvKT96XrUWVQZ3TMnt27-KiINPkp_QfU"> <img alt="image" width="1424" height="119" src="https://private-user-images.githubusercontent.com/26373423/562673446-dbcb28ce-4781-4bba-88cd-dfc180c8f2d4.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzMzNjk3MDMsIm5iZiI6MTc3MzM2OTQwMywicGF0aCI6Ii8yNjM3MzQyMy81NjI2NzM0NDYtZGJjYjI4Y2UtNDc4MS00YmJhLTg4Y2QtZGZjMTgwYzhmMmQ0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjAzMTMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwMzEzVDAyMzY0M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWQzZmFiMWY3
Yzc3MWYwM2YzZjc0NWJhN2EwYmJhZGY1MDY5MWU2ODM3YmIyNmEzMmI1MzBlMTMxODRkMjhmNzkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.xaP_57smBl68PvelbbN0RECFUgCzWtRcdFEMzM7eqGM">
> Looking at the execution logs of the stored procedure, the following content is present:
>
> ```
> 2026-03-13 10:00:13.781 INFO - setSqlParamsMap: Property with paramName: value1 put in sqlParamsMap of content call aSP_test20260204(null,null,${value1}); successfully.
> 2026-03-13 10:01:13.783 INFO - Try to cancel this procedure task
> 2026-03-13 10:01:13.791 INFO - This procedure task was canceled
> 2026-03-13 10:02:44.029 INFO - out parameter varchar key : value1 , value : 0
> ```
>
> So does the timeout failure strategy only cancel the execution of the stored procedure, rather than changing the status of this node to "failed"? I am wondering whether this is a bug or a software feature.
Other Task Type timeout is ok? The logs indicate that the timeout cancellation logic was triggered; however, it appears the stored procedure failed to cancel successfully.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix-17817] [Master] Fix workflow timeout alerts failed [dolphinscheduler]
Posted by "honkerjha (via GitHub)" <gi...@apache.org>.
honkerjha commented on PR #17819:
URL: https://github.com/apache/dolphinscheduler/pull/17819#issuecomment-4052771305
> > > > In DolphinScheduler 3.4.1, when both "Timeout Alert" and "Timeout Failure" are selected in the timeout policy settings, only the alert is sent, but the task does not fail as expected. Will this be fixed later?
> > >
> > >
> > > Task timeout fail bug is fixed by this PR: #17818
> >
> >
> > Has this issue been fixed in 3.4.1? I set up timeout failure for stored procedure tasks in DolphinScheduler 3.4.1, but it's not working as expected. @njnu-seafish
> > <img alt="image" width="922" height="645" src="https://private-user-images.githubusercontent.com/26373423/562673244-0aa1d218-a836-4ffc-a3e8-62ae5e11f54a.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzMzNjk3MDMsIm5iZiI6MTc3MzM2OTQwMywicGF0aCI6Ii8yNjM3MzQyMy81NjI2NzMyNDQtMGFhMWQyMTgtYTgzNi00ZmZjLWEzZTgtNjJhZTVlMTFmNTRhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjAzMTMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwMzEzVDAyMzY0M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWEyNWJkMTBhMjMwOTdmMjJjMWVlNzNlNTU4NDI1YzI4MzZmOTEzNzRkODQ3YTI1NGM5OGY3N2RiOWFhNWE1YWEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.1031WCWE2kRtfOEih4PWyudZNLfMR1HZw0eUreZv3SE"> <img alt="image" width="907" height="523" src="https://private-user-images.githubusercontent.com/26373423/562673545-45de6913-686a-4fcc-82db-7746ce4bd9ee.png?jwt=ey
J0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzMzNjk3MDMsIm5iZiI6MTc3MzM2OTQwMywicGF0aCI6Ii8yNjM3MzQyMy81NjI2NzM1NDUtNDVkZTY5MTMtNjg2YS00ZmNjLTgyZGItNzc0NmNlNGJkOWVlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjAzMTMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwMzEzVDAyMzY0M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPThjN2IzYzhhNzQxYzQyMDhlMWNiMzk0MmE5NzI5MWIwMGQ0NDU4MzNjZjAzNTlhMDAwYjA2OTRhZjgyNjRlNzQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.XdFg4l305w3ujdgI-OCdKdCzjVvIUwoO5xkOqPAwZSY"> <img alt="image" width="629" height="779" src="https://private-user-images.githubusercontent.com/26373423/562677119-f2ab9340-524c-467e-b5b6-d93fef4d2d0f.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzMzNjk3MDMsIm5iZiI6MTc3MzM2OTQwMy
wicGF0aCI6Ii8yNjM3MzQyMy81NjI2NzcxMTktZjJhYjkzNDAtNTI0Yy00NjdlLWI1YjYtZDkzZmVmNGQyZDBmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjAzMTMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwMzEzVDAyMzY0M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTE4ZGViNDU3MjEzMzBmNmZhZDNmMzc3M2U0ZjE3Y2UwZWE2NzllNDE1ZDJkYTJkZjYxZjgzZTdjMTExZjgxMzAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.9PEXlaJXAe2rmnDEua_6U97_AA_B4sNP_Zssjpm_GuI"> <img alt="image" width="1260" height="501" src="https://private-user-images.githubusercontent.com/26373423/562676166-6d8adf7f-dace-43d4-8211-b8c324f04fa6.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzMzNjk3MDMsIm5iZiI6MTc3MzM2OTQwMywicGF0aCI6Ii8yNjM3MzQyMy81NjI2NzYxNjYtNmQ4YWRmN2YtZGFjZS00M2Q0LTgyMTEtYjhjMzI0ZjA0ZmE2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ0
9EWUxTQTUzUFFLNFpBJTJGMjAyNjAzMTMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwMzEzVDAyMzY0M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTI3OTIyMjE1MmIxNTNjOTc5MzgzNzI5OTVjZDg4NzlkNWUyMThkZTg1YWJkNzg4YjdiMjJjMzM5NDIwYWFiNWQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.A4-zs6SmaV-zvKT96XrUWVQZ3TMnt27-KiINPkp_QfU"> <img alt="image" width="1424" height="119" src="https://private-user-images.githubusercontent.com/26373423/562673446-dbcb28ce-4781-4bba-88cd-dfc180c8f2d4.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzMzNjk3MDMsIm5iZiI6MTc3MzM2OTQwMywicGF0aCI6Ii8yNjM3MzQyMy81NjI2NzM0NDYtZGJjYjI4Y2UtNDc4MS00YmJhLTg4Y2QtZGZjMTgwYzhmMmQ0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjAzMTMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwMzEzVDAyMzY0M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWQzZmFiMW
Y3Yzc3MWYwM2YzZjc0NWJhN2EwYmJhZGY1MDY5MWU2ODM3YmIyNmEzMmI1MzBlMTMxODRkMjhmNzkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.xaP_57smBl68PvelbbN0RECFUgCzWtRcdFEMzM7eqGM">
> > Looking at the execution logs of the stored procedure, the following content is present:
> > ```
> > 2026-03-13 10:00:13.781 INFO - setSqlParamsMap: Property with paramName: value1 put in sqlParamsMap of content call aSP_test20260204(null,null,${value1}); successfully.
> > 2026-03-13 10:01:13.783 INFO - Try to cancel this procedure task
> > 2026-03-13 10:01:13.791 INFO - This procedure task was canceled
> > 2026-03-13 10:02:44.029 INFO - out parameter varchar key : value1 , value : 0
> > ```
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > So does the timeout failure strategy only cancel the execution of the stored procedure, rather than changing the status of this node to "failed"? I am wondering whether this is a bug or a software feature.
>
> Other Task Type timeout is ok? The logs indicate that the timeout cancellation logic was triggered; however, it appears the stored procedure failed to cancel successfully.
Other tasks work fine, but stored procedures with SLEEP cannot be stopped at all—this is likely a database-specific behavior.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix-17817] [Master] Fix workflow timeout alerts failed [dolphinscheduler]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #17819:
URL: https://github.com/apache/dolphinscheduler/pull/17819#issuecomment-3688508828
## [](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=17819) **Quality Gate passed**
Issues
 [1 New issue](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=17819&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=17819&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=17819&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [68.4% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=17819&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=17819&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=17819)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix-17817] [Master] Fix workflow timeout alerts failed [dolphinscheduler]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #17819:
URL: https://github.com/apache/dolphinscheduler/pull/17819#issuecomment-3728361498
## [](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=17819) **Quality Gate passed**
Issues
 [1 New issue](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=17819&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=17819&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=17819&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [78.9% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=17819&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=17819&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=17819)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix-17817] [Master] Fix workflow timeout alerts failed [dolphinscheduler]
Posted by "njnu-seafish (via GitHub)" <gi...@apache.org>.
njnu-seafish commented on code in PR #17819:
URL: https://github.com/apache/dolphinscheduler/pull/17819#discussion_r2675216549
##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/workflow/lifecycle/handler/WorkflowTimeoutLifecycleEventHandler.java:
##########
Review Comment:
In our environment, we've already resolved the task timeout alerts and workflow timeout alerts. Here's how I determine whether a workflow has completed:
final IWorkflowExecutionGraph workflowExecutionGraph = workflowExecutionRunnable.getWorkflowExecutionGraph();
if (workflowExecutionGraph.isAllTaskExecutionRunnableChainFinish()) {
// all the TaskExecutionRunnable chain in the graph is finish, means the workflow is already finished.
return;
}
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix-17817] [Master] Fix workflow timeout alerts failed [dolphinscheduler]
Posted by "njnu-seafish (via GitHub)" <gi...@apache.org>.
njnu-seafish commented on code in PR #17819:
URL: https://github.com/apache/dolphinscheduler/pull/17819#discussion_r2675233617
##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/workflow/lifecycle/event/WorkflowTimeoutLifecycleEvent.java:
##########
Review Comment:
Being equal to zero doesn't seem reasonable either.
final int timeout = workflowInstance.getTimeout();
checkState(timeout > 0, "The workflow timeout: %s must >0 minutes", timeout);
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix-17817] [Master] Fix workflow timeout alerts failed [dolphinscheduler]
Posted by "Zzih96 (via GitHub)" <gi...@apache.org>.
Zzih96 commented on code in PR #17819:
URL: https://github.com/apache/dolphinscheduler/pull/17819#discussion_r2675577865
##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/workflow/lifecycle/handler/WorkflowTimeoutLifecycleEventHandler.java:
##########
Review Comment:
`isFinalState()` reflects the persistent final state, making it more reliable. `isAllTaskExecutionRunnableChainFinish()`, on the other hand, only reflects the task completion state in memory; it may not yet have transitioned to the final workflow state.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org