When running a simple workflow that splits the execution into two (or multiple) ‘threads’, the last thread that executes doesn’t receive the data from the other thread’s execution.
In my example, the Set Node 2 does not have access to the output of ‘Set Node 1’, even though Set Node 1 ran before Set Node 2.
The ‘Wait’ node was added just for visualization purposes to check if the Set Node 1 thread was executed before the Set Node 2 thread.
As illustrated, the Set Node 2 can only use the input from the ‘Wait’ node, and not ‘Set Node 1’. This used to work in previous n8n versions, so I’m not sure if it’s a feature or a bug.
The order is not guaranteed and depends on the Execution Order mode. If you need the results of the “Set Node 1” in the “Set Node 2”, run “Set node 2” after “Set Node 1” as they are not running in parallel anyways.
Thanks @moosa and @jabbson for your suggestions. Replacing the Wait node with a Merge one solves the issue, but as I mentioned in my question, this used to work fine for a long time, and Set Node 1 always ran before Set Node 2; it wasn’t random. So my question is: has something changed recently, and is this the default behaviour or something that needs to be fixed by n8n?