mutable_state_impl.go ×6

Frontier kind: Code frontier

unlabeled · c_43c6ab2bc5b8

3 tests · 6126 LOC · 210 files · introduces 0 tests · 26 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
6 ranges26 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
1129 ranges6126 lines · 210 files · Browse complete extent
All tests (intent)
3 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.

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

go.temporal.io/server/service/history/workflow/mutable_state_impl.go 26 introduced LOC · 6 ranges

Open complete file

4873 command *commandpb.FailWorkflowExecutionCommandAttributes,
4874 newExecutionRunID string,
4875 > ) (*historypb.HistoryEvent, error) { mutable_state_impl.go
4876 > opTag := tag.WorkflowActionWorkflowFailed
4877 > if err := ms.checkMutability(opTag); err != nil {
4878 return nil, err
4879 }
4880
4881 > event, batchID := ms.hBuilder.AddFailWorkflowEvent(workflowTaskCompletedEventID, retryState, command, newExecutionRunID) mutable_state_impl.go
4882 > if err := ms.ApplyWorkflowExecutionFailedEvent(batchID, event); err != nil {
4883 return nil, err
4884 }
4885 // TODO merge active & passive task generation
4886 > if err := ms.taskGenerator.GenerateWorkflowCloseTasks( mutable_state_impl.go
4887 > event.GetEventTime().AsTime(),
4888 > false,
4889 > false, // skipCloseTransferTask
4890 > ); err != nil {
4891 return nil, err
4892 }
4893 > return event, nil mutable_state_impl.go
4894 }
4895
4897 batchID int64,
4898 event *historypb.HistoryEvent,
4899 > ) error { mutable_state_impl.go
4900 > if _, err := ms.UpdateWorkflowStateStatus(
4901 > enumsspb.WORKFLOW_EXECUTION_STATE_COMPLETED,
4902 > enumspb.WORKFLOW_EXECUTION_STATUS_FAILED,
4903 > ); err != nil {
4904 return err
4905 }
4906 > ms.executionInfo.CompletionEventBatchId = batchID // Used when completion event needs to be loaded from database mutable_state_impl.go
4907 > ms.executionInfo.NewExecutionRunId = event.GetWorkflowExecutionFailedEventAttributes().GetNewExecutionRunId()
4908 > ms.executionInfo.CloseTime = event.GetEventTime()
4909 > ms.ClearStickyTaskQueue()
4910 > ms.writeEventToCache(event)
4911 >
4912 > attrs := event.GetWorkflowExecutionFailedEventAttributes()
4913 > if attrs.RetryState != enumspb.RETRY_STATE_IN_PROGRESS {
4914 > return ms.processCloseCallbacks()
4915 > }
4916 // Workflow-level callbacks are inherited by the retry run, but update callbacks
4917 // must fire now because the update was aborted on the old run.