Skip to content

Commit a164030

Browse files
committed
Fix DAG clone mutations affecting original instances
The previous Arc<RwLock<Node<T>>> implementation allowed modifications to DAG clones to mutate the original instances through shared references, causing duplicate tasks to appear in workflows. Replace with immutable Arc<Node<T>> design where cloning creates truly independent DAG instances. Node values use Arc<T> for efficient sharing without requiring T: Clone on all operations. It does introduce the trade-off that the DAG needs to be re-built on concatenation in order to replace the existing tail node, however, as long as plans don't get too large, this should not introduce too much overhead Change-type: patch
1 parent ca0977f commit a164030

File tree

1 file changed

+341
-107
lines changed

1 file changed

+341
-107
lines changed

0 commit comments

Comments
 (0)