dill21yu commented on issue #17057:
URL: 
https://github.com/apache/dolphinscheduler/issues/17057#issuecomment-3869885702

   Could you please clarify whether this proposal is feasible? @ruanwenjun 
   Move cycle detection  to workflow publish API layer
   
   <img width="597" height="345" alt="Image" 
src="https://github.com/user-attachments/assets/4a6d2158-9a20-449d-a93a-e8711d669866";
 />
   
   <img width="1225" height="219" alt="Image" 
src="https://github.com/user-attachments/assets/b2aaa9e6-6028-4fec-97ba-b68080d788e3";
 />
   
   <img width="587" height="296" alt="Image" 
src="https://github.com/user-attachments/assets/adefea32-d361-41ca-a3d9-f66fbd05c98a";
 />
   
   1. Data Preparation Phase
   Retrieve workflow metadata and all task nodes
   Parse dependency relationships
   2. Graph Construction Phase
   Build directed graph for current workflow
   Locate and fetch all related sub-workflow task nodes
   Merge data into a complete directed graph
   3. Cycle Detection Core Algorithm
   Implement Kahn's Algorithm for topological sorting
   Efficiently detect cycles in the directed graph
   4. Result Processing
   If cycles found: Return detailed cycle node information
   If no cycles: Proceed with workflow publishing
   


-- 
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