transfer_queue_active_task_executor.go ×8

Frontier kind: Joint frontier

unlabeled · c_91c95868635d

1 test · 9459 LOC · 261 files · introduces 1 test · 42 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
9 ranges42 lines · 2 files
Tests
1 test

Contains — complete concept membership

All code (extent)
2019 ranges9459 lines · 261 files · Browse complete extent
All tests (intent)
1 testBrowse 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.

1 test introduced at this concept.

Introduced code

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

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

go.temporal.io/server/service/history/transfer_queue_active_task_executor.go 35 introduced LOC · 8 ranges

Open complete file

1047 baseWorkflowInfo := mutableState.GetBaseWorkflowInfo()
1048 if mutableState.IsResetRun() && baseWorkflowInfo != nil && baseWorkflowInfo.LowestCommonAncestorEventId >= childInfo.InitiatedEventId { // child was started before the reset point.
1049 > childRunID, childFirstRunID, err := t.verifyChildWorkflow(ctx, mutableState, targetNamespaceEntry, attributes.WorkflowId) transfer_queue_active_task_executor.go
1050 > if err != nil {
1051 return err
1052 }
1053 > if childRunID != "" { transfer_queue_active_task_executor.go
1054 > childExecution := &commonpb.WorkflowExecution{
1055 > WorkflowId: childInfo.StartedWorkflowId,
1056 > RunId: childRunID,
1057 > }
1058 > childClock := childInfo.Clock
1059 > // Child execution is successfully started, record ChildExecutionStartedEvent in parent execution
1060 > err = t.recordChildExecutionStarted(ctx, task, weContext, attributes, childFirstRunID, childClock)
1061 > if err != nil {
1062 return err
1063 }
1065 // release the context lock since we no longer need mutable state and
1066 // the rest of logic is making RPC call, which takes time.
1068 >
1069 > parentClock, err := t.shardContext.NewVectorClock()
1070 > if err != nil {
1071 return err
1072 }
1073 > return t.createFirstWorkflowTask(ctx, targetNamespaceID.String(), childExecution, parentClock, childClock) transfer_queue_active_task_executor.go
1074 }
1075 // now if there was no child found after reset then it could mean one of the following.
1182 childNamespace *namespace.Namespace,
1183 childWorkflowID string,
1184 > ) (childID, firstRunID string, retError error) { transfer_queue_active_task_executor.go
1185 > childDescribeReq := &historyservice.DescribeWorkflowExecutionRequest{
1186 > NamespaceId: childNamespace.ID().String(),
1187 > Request: &workflowservice.DescribeWorkflowExecutionRequest{
1188 > Namespace: childNamespace.Name().String(),
1189 > Execution: &commonpb.WorkflowExecution{
1190 > WorkflowId: childWorkflowID,
1191 > },
1192 > },
1193 > }
1194 > response, err := t.historyRawClient.DescribeWorkflowExecution(ctx, childDescribeReq)
1195 > if err != nil {
1196 // It's not an error if the child is not found. Return empty childID so that the child is created.
1197 if common.IsNotFoundError(err) {
1201 }
1202
1203 > if response.WorkflowExecutionInfo.ParentExecution == nil { transfer_queue_active_task_executor.go
1204 // The child doesn't have a parent. Maybe it was started by some client.
1205 return "", "", nil
1206 }
1207 // Verify if the WorkflowIDs match first.
1208 > if response.WorkflowExecutionInfo.ParentExecution.WorkflowId != mutableState.GetExecutionInfo().WorkflowId { transfer_queue_active_task_executor.go
1209 return "", "", nil
1210 }
1211
1212 > childsParentRunID := response.WorkflowExecutionInfo.ParentExecution.RunId transfer_queue_active_task_executor.go
1213 > // Check if the child's parent was the base run for the current run.
1214 > if childsParentRunID == mutableState.GetExecutionInfo().OriginalExecutionRunId {
1215 > return response.WorkflowExecutionInfo.Execution.RunId, response.WorkflowExecutionInfo.FirstRunId, nil
1216 > }
1217
1218 // load the child's parent mutable state.
go.temporal.io/server/service/history/workflow/mutable_state_impl.go 7 introduced LOC · 1 range

Open complete file

1082 baseRunLowestCommonAncestorEventID int64,
1083 baseRunLowestCommonAncestorEventVersion int64,
1085 > ms.executionInfo.BaseExecutionInfo = &workflowspb.BaseExecutionInfo{
1086 > RunId: baseRunID,
1087 > LowestCommonAncestorEventId: baseRunLowestCommonAncestorEventID,
1088 > LowestCommonAncestorEventVersion: baseRunLowestCommonAncestorEventVersion,
1089 > }
1090 > }
1091
1092 func (ms *MutableStateImpl) UpdateResetRunID(runID string) {