visibility_queue_task_executor.go ×10

Frontier kind: Code frontier

unlabeled · c_2e990b9a9665

12 tests · 8016 LOC · 233 files · introduces 0 tests · 47 LOC · 4 files

Introduces — evidence that enters the hierarchy at this concept

Code
17 ranges47 lines · 4 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
1704 ranges8016 lines · 233 files · Browse complete extent
All tests (intent)
12 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.

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

go.temporal.io/server/service/history/visibility_queue_task_executor.go 32 introduced LOC · 10 ranges

Open complete file

109 case *tasks.UpsertExecutionVisibilityTask:
110 err = t.processUpsertExecution(ctx, task)
111 > case *tasks.CloseExecutionVisibilityTask: visibility_queue_task_executor.go
112 > err = t.processCloseExecution(ctx, task)
113 case *tasks.DeleteExecutionVisibilityTask:
114 err = t.processDeleteExecution(ctx, task)
237 parentCtx context.Context,
238 task *tasks.CloseExecutionVisibilityTask,
239 > ) (retError error) { visibility_queue_task_executor.go
240 > ctx, cancel := context.WithTimeout(parentCtx, taskTimeout)
241 > defer cancel()
242 >
243 > namespaceEntry, err := t.shardContext.GetNamespaceRegistry().
244 > GetNamespaceByID(namespace.ID(task.GetNamespaceID()))
245 > if err != nil {
246 return err
247 }
248
249 > weContext, release, err := getWorkflowExecutionContextForTask(ctx, t.shardContext, t.cache, task) visibility_queue_task_executor.go
250 > if err != nil {
251 return err
252 }
253 > defer func() { release(retError) }() visibility_queue_task_executor.go
254
255 > mutableState, err := weContext.LoadMutableState(ctx, t.shardContext) visibility_queue_task_executor.go
256 > if err != nil {
257 return err
258 }
259 > if mutableState == nil || mutableState.IsWorkflowExecutionRunning() { visibility_queue_task_executor.go
260 return nil
261 }
262
263 > closeVersion, err := mutableState.GetCloseVersion() visibility_queue_task_executor.go
264 > if err != nil {
265 return err
266 }
267 > err = CheckTaskVersion(t.shardContext, t.logger, mutableState.GetNamespaceEntry(), closeVersion, task.Version, task) visibility_queue_task_executor.go
268 > if err != nil {
269 return err
270 }
271
272 > requestBase := t.getVisibilityRequestBase( visibility_queue_task_executor.go
273 > task,
274 > namespaceEntry,
275 > mutableState,
276 > mutableState.GetExecutionInfo().Memo,
277 > mutableState.GetExecutionInfo().SearchAttributes,
278 > )
279 > closedRequest, err := t.getClosedVisibilityRequest(ctx, requestBase, mutableState, namespaceEntry)
280 > if err != nil {
281 return err
282 }
285 // release the context lock since we no longer need mutable state and
286 // the rest of logic is making RPC call, which takes time.
288 >
289 > err = t.visibilityMgr.RecordWorkflowExecutionClosed(ctx, closedRequest)
290 > if err != nil {
291 return err
292 }
go.temporal.io/server/service/history/workflow/mutable_state_impl.go 7 introduced LOC · 3 ranges

Open complete file

7200 // turned off. Once created in CHASM, callbacks should always be processed as long as CHASM is enabled.
7201 if ms.ChasmEnabled() {
7202 > if err := ms.processCloseCallbacksChasm(); err != nil { mutable_state_impl.go
7203 return err
7204 }
7232
7233 // processCloseCallbacksChasm triggers "WorkflowClosed" callbacks using the CHASM implementation.
7234 > func (ms *MutableStateImpl) processCloseCallbacksChasm() error { mutable_state_impl.go
7235 > wf, _, err := ms.ChasmWorkflowComponentReadOnly(context.Background())
7236 > if err != nil {
7237 return err
7238 }
7239
7240 // Return early if there are no chasm callbacks to process.
7241 > if len(wf.Callbacks) == 0 && len(wf.Updates) == 0 { mutable_state_impl.go
7242 > return nil
7243 > }
7244
7245 // If there are callbacks to process, create a writable workflow component.
go.temporal.io/server/api/persistence/v1/executions.pb.go 6 introduced LOC · 3 ranges

Open complete file

1409 func (x *ExecutionStats) GetHistorySize() int64 {
1410 if x != nil {
1411 > return x.HistorySize executions.pb.go
1412 > }
1413 return 0
1414 }
1416 func (x *ExecutionStats) GetExternalPayloadSize() int64 {
1417 if x != nil {
1418 > return x.ExternalPayloadSize executions.pb.go
1419 > }
1420 return 0
1421 }
1423 func (x *ExecutionStats) GetExternalPayloadCount() int64 {
1424 if x != nil {
1425 > return x.ExternalPayloadCount executions.pb.go
1426 > }
1427 return 0
1428 }
go.temporal.io/server/service/history/queues/metrics.go 2 introduced LOC · 1 range

Open complete file

162 case *tasks.UpsertExecutionVisibilityTask:
163 return metrics.TaskTypeVisibilityTaskUpsertExecution
164 > case *tasks.CloseExecutionVisibilityTask: metrics.go
165 > return metrics.TaskTypeVisibilityTaskCloseExecution
166 case *tasks.DeleteExecutionVisibilityTask:
167 return metrics.TaskTypeVisibilityTaskDeleteExecution