transfer_queue_standby_task_executor.go ×10

Frontier kind: Code frontier

unlabeled · c_ca5f1490f0b7

17 tests · 5039 LOC · 210 files · introduces 0 tests · 36 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
10 ranges36 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
801 ranges5039 lines · 210 files · Browse complete extent
All tests (intent)
17 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.

1 file ranked by introduced lines: 36 introduced LOC across 10 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/service/history/transfer_queue_standby_task_executor.go 36 introduced LOC · 10 ranges

Open complete file

78 ctx context.Context,
79 executable queues.Executable,
80 > ) queues.ExecuteResponse { transfer_queue_standby_task_executor.go
81 > task := executable.GetTask()
82 > taskType := queues.GetStandbyTransferTaskTypeTagValue(task, t.shardContext.ChasmRegistry())
83 > metricsTags := []metrics.Tag{
84 > getNamespaceTagByID(t.shardContext.GetNamespaceRegistry(), task.GetNamespaceID()),
85 > metrics.TaskTypeTag(taskType),
86 > metrics.OperationTag(taskType), // for backward compatibility
87 > }
88 >
89 > var err error
90 > switch task := task.(type) {
91 case *tasks.ActivityTask:
92 err = t.processActivityTask(ctx, task)
114 }
115
116 > return queues.ExecuteResponse{ transfer_queue_standby_task_executor.go
117 > ExecutionMetricTags: metricsTags,
118 > ExecutedAsActive: false,
119 > ExecutionErr: err,
120 > }
121 }
122
566 actionFn standbyActionFn,
567 postActionFn standbyPostActionFn,
568 > ) (retError error) { transfer_queue_standby_task_executor.go
569 > ctx, cancel := context.WithTimeout(ctx, taskTimeout)
570 > defer cancel()
571 >
572 > nsRecord, err := t.shardContext.GetNamespaceRegistry().GetNamespaceByID(namespace.ID(taskInfo.GetNamespaceID()))
573 > if err != nil {
574 return err
575 }
576 > if !nsRecord.IsOnCluster(t.clusterName) { transfer_queue_standby_task_executor.go
577 // namespace is not replicated to local cluster, ignore corresponding tasks
578 return nil
579 }
580
581 > weContext, release, err := getWorkflowExecutionContextForTask(ctx, t.shardContext, t.cache, taskInfo) transfer_queue_standby_task_executor.go
582 > if err != nil {
583 return err
584 }
586 > var verificationErr *verificationErr
587 > switch {
588 case retError == consts.ErrTaskRetry,
589 errors.Is(retError, consts.ErrStaleReference),
595 }()
596
597 > mutableState, err := loadMutableStateForTransferTask(ctx, t.shardContext, weContext, taskInfo, t.metricHandler, t.logger) transfer_queue_standby_task_executor.go
598 > if err != nil || mutableState == nil {
599 return err
600 }
601
602 > if !processTaskIfClosed && !mutableState.IsWorkflowExecutionRunning() { transfer_queue_standby_task_executor.go
603 // workflow already finished, no need to process transfer task.
604 return nil
605 }
606
607 > postActionInfo, err := actionFn(ctx, weContext, mutableState, release) transfer_queue_standby_task_executor.go
608 > if err != nil {
609 return err
610 }
666 // Only test code sets t.clusterName to be non-current cluster name
667 // and advance the time by setting calling shardContext.SetCurrentTime.
668 > func (t *transferQueueStandbyTaskExecutor) getCurrentTime() time.Time { transfer_queue_standby_task_executor.go
669 > return t.shardContext.GetCurrentTime(t.clusterName)
670 > }
671
672 func (e *verificationErr) Error() string {