Skip to content

Commit

Permalink
Merge pull request #6397 from oliver-sanders/6222
Browse files Browse the repository at this point in the history
broadcast: fix dictionary changed size during iteration error
  • Loading branch information
wxtim authored Oct 11, 2024
2 parents e7742b1 + 2cde7ae commit 8f27ae8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions changes.d/6397.fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix "dictionary changed size during iteration error" which could occur with broadcasts.
4 changes: 3 additions & 1 deletion cylc/flow/data_store_mgr.py
Original file line number Diff line number Diff line change
Expand Up @@ -2251,7 +2251,9 @@ def delta_broadcast(self):

def _generate_broadcast_node_deltas(self, node_data, node_type):
cfg = self.schd.config.cfg
for node_id, node in node_data.items():
# NOTE: node_data may change during operation so make a copy
# see https://github.com/cylc/cylc-flow/pull/6397
for node_id, node in list(node_data.items()):
tokens = Tokens(node_id)
new_runtime = runtime_from_config(
self._apply_broadcasts_to_runtime(
Expand Down

0 comments on commit 8f27ae8

Please sign in to comment.