Guide / Every rule
Every parallel instance writes the same result collection
The check code/lost-update, in the group Diagrams and code.
Why it matters
A parallel multi-instance step that sets an output collection without an output element has each instance write the same collection, so only the last one that finishes is left.
How to fix it
Set an output element, or collect the results in one instance after the join.
Where you see it
The Problems tab lists it under Code. In a terminal, penstock code reports it with the file and line. This check is part of Penstock Pro, and Team in a pipeline.
Rule details
| Id | code/lost-update |
| Group | Diagrams and code |
| Level | Advice: it works, and reads or runs better without it |
Read more: Code links. All rules: Every rule.