workflow_task_state_machine.go ×5

Frontier kind: Code frontier

unlabeled · c_9e2f950a7701

3 tests · 8039 LOC · 231 files · introduces 0 tests · 30 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
7 ranges30 lines · 2 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
1690 ranges8039 lines · 231 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.

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

go.temporal.io/server/service/history/workflow/workflow_task_state_machine.go 26 introduced LOC · 5 ranges

Open complete file

258 }
259
260 > func (m *workflowTaskStateMachine) ApplyWorkflowTaskTimedOutEvent(timeoutType enumspb.TimeoutType) error { workflow_task_state_machine.go
261 > // Do not increment workflow task attempt in the case of sticky timeout to prevent creating next workflow task as transient.
262 > incrementAttempt := timeoutType != enumspb.TIMEOUT_TYPE_SCHEDULE_TO_START
263 >
264 > return m.failWorkflowTask(incrementAttempt)
265 > }
266
267 func (m *workflowTaskStateMachine) AddWorkflowTaskScheduleToStartTimeoutEvent(
972 func (m *workflowTaskStateMachine) AddWorkflowTaskTimedOutEvent(
973 workflowTask *historyi.WorkflowTaskInfo,
974 > ) (*historypb.HistoryEvent, error) { workflow_task_state_machine.go
975 >
976 > if workflowTask.Type == enumsspb.WORKFLOW_TASK_TYPE_SPECULATIVE {
977 m.ms.RemoveSpeculativeWorkflowTaskTimeoutTask()
978
1001 }
1002
1003 > var event *historypb.HistoryEvent workflow_task_state_machine.go
1004 > // Avoid creating WorkflowTaskTimedOut history event when workflow task is transient.
1005 > if !m.ms.IsTransientWorkflowTask() {
1006 > timeoutType := enumspb.TIMEOUT_TYPE_START_TO_CLOSE
1007 > event = m.ms.hBuilder.AddWorkflowTaskTimedOutEvent(
1008 > workflowTask.ScheduledEventID,
1009 > workflowTask.StartedEventID,
1010 > timeoutType,
1011 > )
1012 >
1013 > m.ms.executionInfo.LastWorkflowTaskFailure = &persistencespb.WorkflowExecutionInfo_LastWorkflowTaskTimedOutType{
1014 > LastWorkflowTaskTimedOutType: timeoutType,
1015 > }
1016 >
1017 > }
1018
1019 > if err := m.ApplyWorkflowTaskTimedOutEvent(enumspb.TIMEOUT_TYPE_START_TO_CLOSE); err != nil { workflow_task_state_machine.go
1020 return nil, err
1021 }
1022 > return event, nil workflow_task_state_machine.go
1023 }
1024
go.temporal.io/server/service/history/workflow/mutable_state_impl.go 4 introduced LOC · 2 ranges

Open complete file

4131 func (ms *MutableStateImpl) AddWorkflowTaskTimedOutEvent(
4132 workflowTask *historyi.WorkflowTaskInfo,
4133 > ) (*historypb.HistoryEvent, error) { mutable_state_impl.go
4134 > opTag := tag.WorkflowActionWorkflowTaskTimedOut
4135 > if err := ms.checkMutability(opTag); err != nil {
4136 return nil, err
4137 }
4138 > return ms.workflowTaskManager.AddWorkflowTaskTimedOutEvent(workflowTask) mutable_state_impl.go
4139 }
4140