GaneshPatil7517 commented on issue #17751:
URL: 
https://github.com/apache/dolphinscheduler/issues/17751#issuecomment-3859156323

   Hi @ruanwenjun,
   
   I want to be transparent with you - yes, I am using AI assistance (GitHub 
Copilot) to help with this contribution. I am learning the codebase and using 
it as a tool to understand the architecture and implement changes. I should 
have disclosed this upfront, and I apologize.
   
   Regarding your technical concern - you're absolutely right. I hadn't fully 
considered the failover scenario:
   
   The Risk:
   1. handleCommand() commits transaction → WorkflowInstance persisted
   2. Master crashes before onStartEvent() executes
   3. New Master picks up workflow for failover
   4. WorkflowExecutionGraph was never created → State inconsistency
   
   The current design where graph creation happens inside the transaction 
ensures atomicity - either both the WorkflowInstance AND the graph state are 
persisted, or neither.
   
   Given this, I have a few questions:
   1.Should this issue be closed as "won't fix" since the current design is 
intentional for consistency?
   2. Or is there an alternative approach that could reduce transaction time 
while maintaining consistency (perhaps caching/optimizing the graph creation 
rather than deferring it)?
   I appreciate you taking the time to explain this. It helps me understand why 
the current architecture is designed this way.


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