workflow_task_state_machine.go ×3

Frontier kind: Code frontier

unlabeled · c_55ef887e843e

207 tests · 4742 LOC · 174 files · introduces 0 tests · 21 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
4 ranges21 lines · 2 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
819 ranges4742 lines · 174 files · Browse complete extent
All tests (intent)
207 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: 21 introduced LOC across 4 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/service/history/workflow/workflow_task_state_machine.go 19 introduced LOC · 3 ranges

Open complete file

1023 }
1024
1025 > func (m *workflowTaskStateMachine) recordTimeoutTasksForDeletion(workflowTask *historyi.WorkflowTaskInfo) { workflow_task_state_machine.go
1026 > // Record persisted workflow task timeout tasks for deletion after successful persistence update.
1027 > if task := workflowTask.ScheduleToStartTimeoutTask; task != nil {
1028 key := task.GetKey()
1029 if key.FireTime.Sub(workflowTask.ScheduledTime) < maxWorkflowTaskTimeoutToDelete {
1031 }
1032 }
1033 > if task := workflowTask.StartToCloseTimeoutTask; task != nil { workflow_task_state_machine.go
1034 key := task.GetKey()
1035 if key.FireTime.Sub(workflowTask.StartedTime) < maxWorkflowTaskTimeoutToDelete {
1131 ) {
1132 if m.HasStartedWorkflowTask() && workflowTask.StartedEventID == common.EmptyEventID {
1133 > // reset the flag whenever started workflow task closes, there could be three cases: workflow_task_state_machine.go
1134 > // 1. workflow task completed:
1135 > // a. workflow task contains close workflow command, the fact that workflow task
1136 > // completes successfully means workflow will also close and the value of the
1137 > // flag doesn't matter.
1138 > // b. workflow task doesn't contain close workflow command, then by definition,
1139 > // workflow is not trying to close, so unset the flag.
1140 > // 2. workflow task timedout: we don't know if workflow is trying to close or not,
1141 > // reset the flag to be safe. It's possible that workflow task is trying to signal
1142 > // itself within a local activity when this flag is set, which may result in timeout.
1143 > // reset the flag will allow the workflow to proceed.
1144 > // 3. workflow failed: always reset the flag here. If failure is due to unhandled command,
1145 > // AddWorkflowTaskFailedEvent will set the flag.
1146 > m.ms.workflowCloseAttempted = false
1147 > }
1148
1149 m.ms.executionInfo.WorkflowTaskVersion = workflowTask.Version
go.temporal.io/server/api/enums/v1/workflow_task_type.pb.go 2 introduced LOC · 1 range

Open complete file

58 func (x WorkflowTaskType) String() string {
59 switch x {
60 > case WORKFLOW_TASK_TYPE_UNSPECIFIED: workflow_task_type.pb.go
61 > return "Unspecified"
62 case WORKFLOW_TASK_TYPE_NORMAL:
63 return "Normal"