transfer_queue_active_task_executor.go ×6

Frontier kind: Code frontier

unlabeled · c_696beba10471

5 tests · 10027 LOC · 267 files · introduces 0 tests · 90 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
7 ranges90 lines · 2 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
2144 ranges10027 lines · 267 files · Browse complete extent
All tests (intent)
5 testsBrowse complete intent

Neighbourhood graph

The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.

Introduced files, introduced tests, and structurally relevant concept specialization

In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.

Native relationship evidence

Every exact file and test below is linked only from the concept that introduces it.

Introduced tests

Every collected test enters the hierarchy at exactly one concept.

No tests are introduced at this concept. Its intent tests are introduced by other concepts.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

2 files ranked by introduced lines: 90 introduced LOC across 7 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/service/history/transfer_queue_active_task_executor.go 86 introduced LOC · 6 ranges

Open complete file

1078 // 3. There was a running workflow that is not related to the current run.
1079 // In all these cases it's ok to proceed to start a new instance of child (below) and accept the result of that operation.
1081 > // child was started after reset-point (or the parent is not in reset run). We need to first check if this child was recorded at the time of reset.
1082 > if resetChildInfo, ok := mutableState.GetExecutionInfo().GetChildrenInitializedPostResetPoint()[resetChildID]; ok {
1083 shouldTerminateAndStartChild = resetChildInfo.ShouldTerminateAndStart
1084 }
1085 }
1086
1087 > executionInfo := mutableState.GetExecutionInfo() transfer_queue_active_task_executor.go
1088 > rootExecutionInfo := &workflowspb.RootExecutionInfo{
1089 > Execution: &commonpb.WorkflowExecution{
1090 > WorkflowId: executionInfo.RootWorkflowId,
1091 > RunId: executionInfo.RootRunId,
1092 > },
1093 > }
1094 >
1095 > childRunID, childClock, err := t.startWorkflow(
1096 > ctx,
1097 > task,
1098 > parentNamespaceName,
1099 > targetNamespaceName,
1100 > namespace.ID(targetNamespaceID),
1101 > childInfo.CreateRequestId,
1102 > attributes,
1103 > sourceVersionStamp,
1104 > rootExecutionInfo,
1105 > inheritedBuildID,
1106 > initiatedEvent.GetUserMetadata(),
1107 > shouldTerminateAndStartChild,
1108 > inheritedVersioningOverride,
1109 > inheritedPinnedVersion,
1110 > priorities.Merge(mutableState.GetExecutionInfo().Priority, attributes.Priority),
1111 > inheritedAutoUpgradeInfo,
1112 > )
1113 > if err != nil {
1114 t.logger.Debug("Failed to start child workflow execution", tag.Error(err))
1115 var failedCause enumspb.StartChildWorkflowExecutionFailedCause
1689 priority *commonpb.Priority,
1690 inheritedAutoUpgradeInfo *deploymentpb.InheritedAutoUpgradeInfo,
1691 > ) (string, *clockspb.VectorClock, error) { transfer_queue_active_task_executor.go
1692 > versioningOverride := inheritedVersioningOverride
1693 > if attributes.GetVersioningOverride() != nil {
1694 versioningOverride = attributes.GetVersioningOverride()
1695 }
1696
1697 > startRequest := &workflowservice.StartWorkflowExecutionRequest{ transfer_queue_active_task_executor.go
1698 > Namespace: targetNamespace.String(),
1699 > WorkflowId: attributes.WorkflowId,
1700 > WorkflowType: attributes.WorkflowType,
1701 > TaskQueue: attributes.TaskQueue,
1702 > Input: attributes.Input,
1703 > Header: attributes.Header,
1704 > WorkflowExecutionTimeout: attributes.WorkflowExecutionTimeout,
1705 > WorkflowRunTimeout: attributes.WorkflowRunTimeout,
1706 > WorkflowTaskTimeout: attributes.WorkflowTaskTimeout,
1707 >
1708 > // Use the same request ID to dedupe StartWorkflowExecution calls
1709 > RequestId: childRequestID,
1710 > WorkflowIdReusePolicy: attributes.WorkflowIdReusePolicy,
1711 > WorkflowIdConflictPolicy: enumspb.WORKFLOW_ID_CONFLICT_POLICY_FAIL,
1712 > RetryPolicy: attributes.RetryPolicy,
1713 > CronSchedule: attributes.CronSchedule,
1714 > Memo: attributes.Memo,
1715 > SearchAttributes: attributes.SearchAttributes,
1716 > UserMetadata: userMetadata,
1717 > VersioningOverride: versioningOverride,
1718 > Priority: priority,
1719 > TimeSkippingConfig: attributes.GetTimeSkippingConfig(),
1720 > }
1721 >
1722 > request := common.CreateHistoryStartWorkflowRequest(
1723 > targetNamespaceID.String(),
1724 > startRequest,
1725 > &workflowspb.ParentExecutionInfo{
1726 > NamespaceId: task.NamespaceID,
1727 > Namespace: namespace.String(),
1728 > Execution: &commonpb.WorkflowExecution{
1729 > WorkflowId: task.WorkflowID,
1730 > RunId: task.RunID,
1731 > },
1732 > InitiatedId: task.InitiatedEventID,
1733 > InitiatedVersion: task.Version,
1734 > Clock: vclock.NewVectorClock(t.shardContext.GetClusterMetadata().GetClusterID(), t.shardContext.GetShardID(), task.TaskID),
1735 > },
1736 > rootExecutionInfo,
1737 > t.shardContext.GetTimeSource().Now(),
1738 > )
1739 >
1740 > request.SourceVersionStamp = sourceVersionStamp
1741 > request.InheritedBuildId = inheritedBuildId
1742 > request.InheritedPinnedVersion = inheritedPinnedVersion
1743 > request.TimeSkippingStatePropagation = attributes.GetTimeSkippingStatePropagation()
1744 >
1745 > // Only set the AutoUpgrade info if the Pinned version is not set.
1746 > if request.InheritedPinnedVersion == nil {
1747 request.InheritedAutoUpgradeInfo = inheritedAutoUpgradeInfo
1748 }
1749
1750 > if shouldTerminateAndStartChild { transfer_queue_active_task_executor.go
1751 request.StartRequest.WorkflowIdReusePolicy = enumspb.WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE
1752 request.StartRequest.WorkflowIdConflictPolicy = enumspb.WORKFLOW_ID_CONFLICT_POLICY_TERMINATE_EXISTING
go.temporal.io/server/api/persistence/v1/executions.pb.go 4 introduced LOC · 1 range

Open complete file

1068 }
1069
1070 > func (x *WorkflowExecutionInfo) GetChildrenInitializedPostResetPoint() map[string]*ResetChildInfo { executions.pb.go
1071 > if x != nil {
1072 > return x.ChildrenInitializedPostResetPoint
1073 > }
1074 return nil
1075 }