mutable_state_impl.go ×7

Frontier kind: Joint frontier

unlabeled · c_cb3a764ff26b

1 test · 6378 LOC · 214 files · introduces 1 test · 35 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
7 ranges35 lines · 1 files
Tests
1 test

Contains — complete concept membership

All code (extent)
1201 ranges6378 lines · 214 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.

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

go.temporal.io/server/service/history/workflow/mutable_state_impl.go 35 introduced LOC · 7 ranges

Open complete file

918 startTime, closeTime, links,
919 )
920 > case enumspb.EVENT_TYPE_WORKFLOW_EXECUTION_CANCELED: mutable_state_impl.go
921 > return nexusCompleteOperationFailure(
922 > &failurepb.Failure{
923 > Message: "operation canceled",
924 > FailureInfo: &failurepb.Failure_CanceledFailureInfo{
925 > CanceledFailureInfo: &failurepb.CanceledFailureInfo{
926 > Details: ce.GetWorkflowExecutionCanceledEventAttributes().GetDetails(),
927 > },
928 > },
929 > },
930 > nexus.OperationStateCanceled, "operation canceled",
931 > startTime, closeTime, links,
932 > )
933 case enumspb.EVENT_TYPE_WORKFLOW_EXECUTION_TERMINATED:
934 return nexusCompleteOperationFailure(
5007 workflowTaskCompletedEventID int64,
5008 command *commandpb.CancelWorkflowExecutionCommandAttributes,
5009 > ) (*historypb.HistoryEvent, error) { mutable_state_impl.go
5010 > opTag := tag.WorkflowActionWorkflowCanceled
5011 > if err := ms.checkMutability(opTag); err != nil {
5012 return nil, err
5013 }
5014
5015 > event, batchID := ms.hBuilder.AddWorkflowExecutionCanceledEvent(workflowTaskCompletedEventID, command) mutable_state_impl.go
5016 > if err := ms.ApplyWorkflowExecutionCanceledEvent(batchID, event); err != nil {
5017 return nil, err
5018 }
5019 // TODO merge active & passive task generation
5020 > if err := ms.taskGenerator.GenerateWorkflowCloseTasks( mutable_state_impl.go
5021 > event.GetEventTime().AsTime(),
5022 > false,
5023 > false, // skipCloseTransferTask
5024 > ); err != nil {
5025 return nil, err
5026 }
5027 > return event, nil mutable_state_impl.go
5028 }
5029
5031 batchID int64,
5032 event *historypb.HistoryEvent,
5033 > ) error { mutable_state_impl.go
5034 > if _, err := ms.UpdateWorkflowStateStatus(
5035 > enumsspb.WORKFLOW_EXECUTION_STATE_COMPLETED,
5036 > enumspb.WORKFLOW_EXECUTION_STATUS_CANCELED,
5037 > ); err != nil {
5038 return err
5039 }
5040 > ms.executionInfo.CompletionEventBatchId = batchID // Used when completion event needs to be loaded from database mutable_state_impl.go
5041 > ms.executionInfo.NewExecutionRunId = ""
5042 > ms.executionInfo.CloseTime = event.GetEventTime()
5043 > ms.ClearStickyTaskQueue()
5044 > ms.writeEventToCache(event)
5045 > return ms.processCloseCallbacks()
5046 }
5047