-
Notifications
You must be signed in to change notification settings - Fork 95
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
As described in https://community.temporal.io/t/implement-sliding-window-batching-in-python/15959/2
the code https://github.com/temporalio/samples-python/blob/main/batch_sliding_window/sliding_window_workflow.py#L111-L120
child_handle = await workflow.start_child_workflow(
RecordProcessorWorkflow.run,
record,
id=child_id,
id_reuse_policy=WorkflowIDReusePolicy.ALLOW_DUPLICATE,
parent_close_policy=workflow.ParentClosePolicy.ABANDON,
)
self.children_started_by_this_run.append(child_handle)
self.current_records.add(record.id)
completes the workflow task with the await, and it could happen that the started child finishes, and send a completion signal, before the record.id is added to self.current_records. Then, the signal handler will ignore
the notification...
The proposed solution is to add the record.id before starting the child workflow, as described in the link.
Minimal Reproduction
make the child workflows finish immediately without sleep...
Environment/Versions
- OS and processor: [e.g. M1 Mac, x86 Windows, Linux]
- Temporal Version: [e.g. 1.14.0?] and/or SDK version
- Are you using Docker or Kubernetes or building Temporal from source?
Additional context
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working