timer_queue_standby_task_executor.go ×4

Frontier kind: Code frontier

unlabeled · c_f4ce6c489852

6 tests · 8193 LOC · 256 files · introduces 0 tests · 35 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
5 ranges35 lines · 2 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
1634 ranges8193 lines · 256 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.

2 files ranked by introduced lines: 35 introduced LOC across 5 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/service/history/timer_queue_standby_task_executor.go 33 introduced LOC · 4 ranges

Open complete file

90 case *tasks.UserTimerTask:
91 err = t.executeUserTimerTimeoutTask(ctx, task)
92 > case *tasks.ActivityTimeoutTask: timer_queue_standby_task_executor.go
93 > err = t.executeActivityTimeoutTask(ctx, task)
94 case *tasks.WorkflowTaskTimeoutTask:
95 err = t.executeWorkflowTaskTimeoutTask(ctx, task)
327 ctx context.Context,
328 timerTask *tasks.ActivityTimeoutTask,
330 > // activity heartbeat timer task is a special snowflake.
331 > // normal activity timer task on the passive side will be generated by events related to activity in history replicator,
332 > // and the standby timer processor will only need to verify whether the timer task can be safely throw away.
333 > //
334 > // activity heartbeat timer task cannot be handled in the way mentioned above.
335 > // the reason is, there is no event driving the creation of new activity heartbeat timer.
336 > // although there will be an task syncing activity from remote, the task is not an event,
337 > // and cannot attempt to recreate a new activity timer task.
338 > //
339 > // the overall solution is to attempt to generate a new activity timer task whenever the
340 > // task passed in is safe to be throw away.
341 > actionFn := func(ctx context.Context, wfContext historyi.WorkflowContext, mutableState historyi.MutableState, _ historyi.ReleaseWorkflowContextFunc) (any, error) {
342 > if !mutableState.IsWorkflowExecutionRunning() {
343 // workflow already finished, no need to process the timer
344 return nil, nil
345 }
346
347 > referenceTime := mutableState.Now() timer_queue_standby_task_executor.go
348 >
349 > timerSequence := t.getTimerSequence(mutableState)
350 > updateMutableState := false
351 > timerSequenceIDs := timerSequence.LoadAndSortActivityTimers()
352 > if len(timerSequenceIDs) > 0 {
353 timerSequenceID := timerSequenceIDs[0]
354 _, ok := mutableState.GetActivityInfo(timerSequenceID.EventID)
423 }
424
425 > return t.processTimer( timer_queue_standby_task_executor.go
426 > ctx,
427 > timerTask,
428 > actionFn,
429 > getStandbyPostActionFn(
430 > timerTask,
431 > t.getCurrentTime,
432 > t.config.StandbyTaskMissingEventsDiscardDelay(timerTask.GetType()),
433 > t.checkExecutionStillExistsOnSourceBeforeDiscard,
434 > ),
435 > )
436 }
437
go.temporal.io/server/service/history/queues/metrics.go 2 introduced LOC · 1 range

Open complete file

129 case *tasks.WorkflowTaskTimeoutTask:
130 return metrics.TaskTypeTimerStandbyTaskWorkflowTaskTimeout
131 > case *tasks.ActivityTimeoutTask: metrics.go
132 > return metrics.TaskTypeTimerStandbyTaskActivityTimeout
133 case *tasks.UserTimerTask:
134 return metrics.TaskTypeTimerStandbyTaskUserTimer