chasm_task_util.go ×3

Frontier kind: Code frontier

unlabeled · c_e68fcc6ba98a

6 tests · 4804 LOC · 204 files · introduces 0 tests · 39 LOC · 3 files

Introduces — evidence that enters the hierarchy at this concept

Code
6 ranges39 lines · 3 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
753 ranges4804 lines · 204 files · Browse complete extent
All tests (intent)
6 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.

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

go.temporal.io/server/service/history/chasm_task_util.go 26 introduced LOC · 3 ranges

Open complete file

100 clientBean client.Bean,
101 namespaceRegistry namespace.Registry,
102 > ) error { chasm_task_util.go
103 > if !executionExistsOnSource(
104 > ctx,
105 > taskWorkflowKey(task),
106 > getTaskArchetypeID(task),
107 > logger,
108 > clusterName,
109 > clientBean,
110 > namespaceRegistry,
111 > registry,
112 > ) {
113 return nil
114 }
115
116 > executionKey := chasm.ExecutionKey{ chasm_task_util.go
117 > NamespaceID: task.NamespaceID,
118 > BusinessID: task.WorkflowID,
119 > RunID: task.RunID,
120 > }
121 >
122 > validate := func(backend chasm.NodeBackend, _ chasm.Context, _ chasm.Component) error {
123 if backend.GetExecutionState().State == enumsspb.WORKFLOW_EXECUTION_STATE_ZOMBIE {
124 return consts.ErrWorkflowZombie
134 }
135
136 > engineCtx := chasm.NewEngineContext(ctx, engine) chasm_task_util.go
137 > err := tree.ExecuteSideEffectDiscardTask(
138 > engineCtx,
139 > executionKey,
140 > task,
141 > validate,
142 > )
143 > if errors.Is(err, chasm.ErrTaskDiscarded) {
144 logger.Warn("Discarding standby CHASM task due to task being pending for too long.", tag.Task(task))
145 return consts.ErrTaskDiscarded
go.temporal.io/server/service/history/interfaces/chasm_tree_mock.go 10 introduced LOC · 2 ranges

Open complete file

176
177 // ExecuteSideEffectDiscardTask mocks base method.
178 > func (m *MockChasmTree) ExecuteSideEffectDiscardTask(ctx context.Context, executionKey chasm.ExecutionKey, task *tasks.ChasmTask, validate func(chasm.NodeBackend, chasm.Context, chasm.Component) error) error { chasm_tree_mock.go
179 > m.ctrl.T.Helper()
180 > ret := m.ctrl.Call(m, "ExecuteSideEffectDiscardTask", ctx, executionKey, task, validate)
181 > ret0, _ := ret[0].(error)
182 > return ret0
183 > }
184
185 // ExecuteSideEffectDiscardTask indicates an expected call of ExecuteSideEffectDiscardTask.
186 > func (mr *MockChasmTreeMockRecorder) ExecuteSideEffectDiscardTask(ctx, executionKey, task, validate any) *gomock.Call { chasm_tree_mock.go
187 > mr.mock.ctrl.T.Helper()
188 > return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExecuteSideEffectDiscardTask", reflect.TypeOf((*MockChasmTree)(nil).ExecuteSideEffectDiscardTask), ctx, executionKey, task, validate)
189 > }
190
191 // ExecuteSideEffectTask mocks base method.
go.temporal.io/server/chasm/library.go 3 introduced LOC · 1 range

Open complete file

30 )
31
32 > func (UnimplementedLibrary) Components() []*RegistrableComponent { library.go
33 > return nil
34 > }
35
36 func (UnimplementedLibrary) Tasks() []*RegistrableTask {