visibility_queue_task_executor.go ×7

Frontier kind: Code frontier

unlabeled · c_141bf46bc6f7

7 tests · 6877 LOC · 221 files · introduces 0 tests · 39 LOC · 3 files

Introduces — evidence that enters the hierarchy at this concept

Code
9 ranges39 lines · 3 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
1385 ranges6877 lines · 221 files · Browse complete extent
All tests (intent)
7 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 9 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/service/history/visibility_queue_task_executor.go 34 introduced LOC · 7 ranges

Open complete file

107 case *tasks.StartExecutionVisibilityTask:
108 err = t.processStartExecution(ctx, task)
109 > case *tasks.UpsertExecutionVisibilityTask: visibility_queue_task_executor.go
110 > err = t.processUpsertExecution(ctx, task)
111 case *tasks.CloseExecutionVisibilityTask:
112 err = t.processCloseExecution(ctx, task)
189 ctx context.Context,
190 task *tasks.UpsertExecutionVisibilityTask,
191 > ) (retError error) { visibility_queue_task_executor.go
192 > ctx, cancel := context.WithTimeout(ctx, taskTimeout)
193 > defer cancel()
194 >
195 > namespaceEntry, err := t.shardContext.GetNamespaceRegistry().
196 > GetNamespaceByID(namespace.ID(task.GetNamespaceID()))
197 > if err != nil {
198 return err
199 }
200
201 > weContext, release, err := getWorkflowExecutionContextForTask(ctx, t.shardContext, t.cache, task) visibility_queue_task_executor.go
202 > if err != nil {
203 return err
204 }
205 > defer func() { release(retError) }() visibility_queue_task_executor.go
206
207 > mutableState, err := weContext.LoadMutableState(ctx, t.shardContext) visibility_queue_task_executor.go
208 > if err != nil {
209 return err
210 }
211 > if mutableState == nil || !mutableState.IsWorkflowExecutionRunning() { visibility_queue_task_executor.go
212 return nil
213 }
214
215 > requestBase := t.getVisibilityRequestBase( visibility_queue_task_executor.go
216 > task,
217 > namespaceEntry,
218 > mutableState,
219 > mutableState.GetExecutionInfo().Memo,
220 > mutableState.GetExecutionInfo().SearchAttributes,
221 > )
222 >
223 > // NOTE: do not access anything related mutable state after this lock release
224 > // release the context lock since we no longer need mutable state and
225 > // the rest of logic is making RPC call, which takes time.
226 > release(nil)
227 >
228 > return t.visibilityMgr.UpsertWorkflowExecution(
229 > ctx,
230 > &manager.UpsertWorkflowExecutionRequest{
231 > VisibilityRequestBase: requestBase,
232 > },
233 > )
234 }
235
go.temporal.io/server/service/history/tasks/upsert_visibility_task.go 3 introduced LOC · 1 range

Open complete file

22 }
23
24 > func (t *UpsertExecutionVisibilityTask) GetTaskID() int64 { upsert_visibility_task.go
25 > return t.TaskID
26 > }
27
28 func (t *UpsertExecutionVisibilityTask) SetTaskID(id int64) {
go.temporal.io/server/service/history/queues/metrics.go 2 introduced LOC · 1 range

Open complete file

160 case *tasks.StartExecutionVisibilityTask:
161 return metrics.TaskTypeVisibilityTaskStartExecution
162 > case *tasks.UpsertExecutionVisibilityTask: metrics.go
163 > return metrics.TaskTypeVisibilityTaskUpsertExecution
164 case *tasks.CloseExecutionVisibilityTask:
165 return metrics.TaskTypeVisibilityTaskCloseExecution