Skip to content

Commit c6fcb5a

Browse files
committed
refine design of TimeSkippingConfig
1 parent 37603e2 commit c6fcb5a

1 file changed

Lines changed: 14 additions & 18 deletions

File tree

temporal/api/workflow/v1/message.proto

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -594,32 +594,28 @@ message TimeSkippingConfig {
594594
// Enables or disables time skipping for this workflow execution.
595595
bool enabled = 1;
596596

597-
// By default, the time skipping configuration is propagated to transitively related workflows.
598-
// If set, transitively related workflows will be started with time skipping disabled.
599-
bool disable_propagation = 2;
597+
reserved 2;
598+
reserved "disable_propagation";
599+
600+
// By default, the time skipping configuration (enabled and bound) is propagated to child workflows
601+
// with the same value as the parent workflow.
602+
// If set, child workflows will be started with time skipping disabled.
603+
// Regardless of this field, the start time of the child workflow uses the parent's virtual time.
604+
bool disable_child_workflow_propagation = 3;
600605

601606
// Optional bound that limits how long time skipping remains active.
602607
// Once the bound is reached, time skipping is automatically disabled.
603608
// It can later be re-enabled via UpdateWorkflowExecutionOptions.
604609
//
605-
// This is particularly useful in testing scenarios where workflows
610+
// This is useful in testing scenarios where workflows
606611
// are expected to receive signals, updates, or other events while
607612
// timers are in progress.
608613
//
609-
// The bound is propagated to transitively related workflows differently
610-
// depending on the type and semantics of the related workflow:
611-
// - Child workflows: the bound is propagated with the same value as the
612-
// parent workflow, and the child begins execution at the parent's virtual
613-
// time. If the bound is duration-based, each child calculates its skipped
614-
// duration independently from its own start.
615-
//
616-
// - Continue-as-new workflows: the bound is propagated with the same value
617-
// as the previous workflow. If the bound is duration-based, the
618-
// continue-as-new workflow shares the accumulated duration with the
619-
// previous workflow.
620-
//
621-
// - Reset workflows: the entire TimeSkippingConfig is restored to the value
622-
// it had at the event this workflow was reset to.
614+
// The bound usually manages the lifecycle of one workflow execution,
615+
// for example: the bound of parent workflow only affects the parent workflow itself,
616+
// and if propagated to child workflow, the bound of child workflow only affects the child workflow itself.
617+
// But for continue-as-new workflows, they are treated combined as one workflow execution,
618+
// so the bound of continue-as-new workflow affects the all of the workflow executions.
623619
oneof bound {
624620

625621
// Maximum total virtual time that can be skipped.

0 commit comments

Comments
 (0)