dybyte commented on code in PR #10075:
URL: https://github.com/apache/seatunnel/pull/10075#discussion_r2610397617


##########
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/dag/physical/SubPlan.java:
##########
@@ -503,6 +509,22 @@ public void restorePipeline() {
         }
     }
 
+    public void stopPipelineWithCheckpointFallback() {
+        if (jobMaster.getCheckpointManager() == null) {
+            forceStopPipeline();
+            return;
+        }
+        if (jobMaster.getCheckpointManager().isCompletedPipeline(pipelineId)) {
+            forcePipelineFinish();
+        } else {
+            log.warn(
+                    "Failed to stop the pipeline gracefully. Falling back to 
forced stop: {}",
+                    pipelineFullName);
+            cancelCheckpointCoordinator();

Review Comment:
   Are you referring to the situation where the `CheckpointCoordinator` is 
stuck while holding a lock, and another thread is trying to access it, waiting 
indefinitely? In that case, I don't think there is a way to forcibly stop it. 
The only option I see is to set a timeout so that this code does not get stuck. 
Do you have any better suggestions?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to