Deploying a node (Modified Nodes) and its impact on running flows

Hello!

I have a question regarding the deployment of nodes.

Let's say I have a flow and at some point there are running instances of those flows. If I change a node that is part of this flow and deploy (using the Modified Nodes mode), what will happen to the currently running flows?

Ideally, I expect a node change to only have an impact on a flow for all further triggers, but I assume that this is not how it works now.

I have found this thread where @knolleary mentioned that deployed nodes are restarted, but I am still not sure whether it can result in the flow getting stuck.

Thanks!

Why do you ask this? Are you facing a blockage when you deploy?

I am asking because I want to understand what will happen if running instances are current at node X, and this node X is redeployed.

Hi @venomancer

All nodes that need to be restarted will be stopped. If a node is in the middle of handling a message, it will complete its work, but if the next node in the flow has been stopped then the message won't go anywhere.

There was some exploration around graceful shutdown of flows a while ago; allowing existing work to 'complete', but it didn't get far enough to make it into the core.

Thanks for answering, @knolleary

Just to confirm that my understanding is correct.
If my flow looks like A->B->C roughly, and node B is deployed, it is stopped.

If the flow is currently running node A, B gets stopped and the message is just dropped and this specific instance is "stuck" forever.

That said, if node A takes some time and node B has enough time to restart, the flow will be lucky not to get stuck.

Are the assumptions above correct?

Thanks!