timer_queue_task_executor_base.go ×8

Frontier kind: Joint frontier

unlabeled · c_05c0585019a0

2 tests · 4637 LOC · 203 files · introduces 2 tests · 51 LOC · 4 files

Introduces — evidence that enters the hierarchy at this concept

Code
12 ranges51 lines · 4 files
Tests
2 tests

Contains — complete concept membership

All code (extent)
705 ranges4637 lines · 203 files · Browse complete extent
All tests (intent)
2 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.

2 tests introduced at this concept.

Introduced code

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

4 files ranked by introduced lines: 51 introduced LOC across 12 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/service/history/timer_queue_task_executor_base.go 36 introduced LOC · 8 ranges

Open complete file

82 ctx context.Context,
83 task *tasks.DeleteHistoryEventTask,
84 > ) (retError error) { timer_queue_task_executor_base.go
85 > ctx, cancel := context.WithTimeout(ctx, taskTimeout)
86 > defer cancel()
87 >
88 > workflowExecution := &commonpb.WorkflowExecution{
89 > WorkflowId: task.GetWorkflowID(),
90 > RunId: task.GetRunID(),
91 > }
92 >
93 > if task.ArchetypeID == chasm.UnspecifiedArchetypeID {
94 task.ArchetypeID = chasm.WorkflowArchetypeID
95 }
96
97 > weContext, release, err := t.cache.GetOrCreateChasmExecution( timer_queue_task_executor_base.go
98 > ctx,
99 > t.shardContext,
100 > namespace.ID(task.GetNamespaceID()),
101 > workflowExecution,
102 > task.ArchetypeID,
103 > locks.PriorityLow,
104 > )
105 > if err != nil {
106 return err
107 }
108 > defer func() { release(retError) }() timer_queue_task_executor_base.go
109
110 // todo if we need add archetype id for loadMutableState
111 > mutableState, err := loadMutableStateForTimerTask(ctx, t.shardContext, weContext, task, t.metricsHandler, t.logger) timer_queue_task_executor_base.go
112 > switch err.(type) {
113 > case nil:
114 > if mutableState == nil {
115 return nil
116 }
123 }
124
125 > if mutableState.GetExecutionState().GetState() != enumsspb.WORKFLOW_EXECUTION_STATE_COMPLETED { timer_queue_task_executor_base.go
126 // If workflow is running then just ignore DeleteHistoryEventTask timer task.
127 // This should almost never happen because DeleteHistoryEventTask is created only for closed workflows.
130 }
131
132 > closeVersion, err := mutableState.GetCloseVersion() timer_queue_task_executor_base.go
133 > if err != nil {
134 return err
135 }
136 > if err := CheckTaskVersion(t.shardContext, t.logger, mutableState.GetNamespaceEntry(), closeVersion, task.Version, task); err != nil { timer_queue_task_executor_base.go
137 return err
138 }
139
140 > return t.deleteManager.DeleteWorkflowExecutionByRetention( timer_queue_task_executor_base.go
141 > ctx,
142 > namespace.ID(task.GetNamespaceID()),
143 > workflowExecution,
144 > weContext,
145 > mutableState,
146 > &task.ProcessStage,
147 > )
148 }
149
go.temporal.io/server/service/history/deletemanager/delete_manager_mock.go 10 introduced LOC · 2 ranges

Open complete file

74
75 // DeleteWorkflowExecutionByRetention mocks base method.
76 > func (m *MockDeleteManager) DeleteWorkflowExecutionByRetention(ctx context.Context, nsID namespace.ID, we *common.WorkflowExecution, weCtx interfaces.WorkflowContext, ms interfaces.MutableState, stage *tasks.DeleteWorkflowExecutionStage) error { delete_manager_mock.go
77 > m.ctrl.T.Helper()
78 > ret := m.ctrl.Call(m, "DeleteWorkflowExecutionByRetention", ctx, nsID, we, weCtx, ms, stage)
79 > ret0, _ := ret[0].(error)
80 > return ret0
81 > }
82
83 // DeleteWorkflowExecutionByRetention indicates an expected call of DeleteWorkflowExecutionByRetention.
84 > func (mr *MockDeleteManagerMockRecorder) DeleteWorkflowExecutionByRetention(ctx, nsID, we, weCtx, ms, stage any) *gomock.Call { delete_manager_mock.go
85 > mr.mock.ctrl.T.Helper()
86 > return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteWorkflowExecutionByRetention", reflect.TypeOf((*MockDeleteManager)(nil).DeleteWorkflowExecutionByRetention), ctx, nsID, we, weCtx, ms, stage)
87 > }
go.temporal.io/server/service/history/tasks/workflow_cleanup_timer.go 3 introduced LOC · 1 range

Open complete file

37 }
38
39 > func (a *DeleteHistoryEventTask) GetTaskID() int64 { workflow_cleanup_timer.go
40 > return a.TaskID
41 > }
42
43 func (a *DeleteHistoryEventTask) SetTaskID(id int64) {
go.temporal.io/server/service/history/queues/metrics.go 2 introduced LOC · 1 range

Open complete file

104 case *tasks.WorkflowExecutionTimeoutTask:
105 return metrics.TaskTypeTimerActiveTaskWorkflowExecutionTimeout
106 > case *tasks.DeleteHistoryEventTask: metrics.go
107 > return metrics.TaskTypeTimerActiveTaskDeleteHistoryEvent
108 case *tasks.ActivityRetryTimerTask:
109 return metrics.TaskTypeTimerActiveTaskActivityRetryTimer