case <-workerShutdownCh:
return
s.processTaskQueue(queue, workerShutdownCh)
}
}
Frontier kind: Code frontier
unlabeled · c_deec487f6c52
7 tests · 1813 LOC · 71 files · introduces 0 tests · 33 LOC · 1 file
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.
Every exact file and test below is linked only from the concept that introduces it.
go.temporal.io/server/common/circuitbreaker/TestTSCBWithDynamicSettingsgo.temporal.io/server/common/dynamicconfig/TestDeepCopy_OtherReferenceTypes_Nilgo.temporal.io/server/service/matching/configs/TestQuotasSuite/TestAPIPrioritiesOrderedgo.temporal.io/server/service/matching/configs/TestQuotasSuite/TestAPIToPriorityMappingEvery collected test enters the hierarchy at exactly one concept.
No tests are introduced at this concept. Its intent tests are introduced by other concepts.
Every collected source range enters the hierarchy at exactly one concept.
1 file ranked by introduced lines: 33 introduced LOC across 7 ranges. Expand a file to inspect source; the > gutter marks introduced lines.
case <-workerShutdownCh:
return
s.processTaskQueue(queue, workerShutdownCh)
}
}
queue SequentialTaskQueue[T],
workerShutdownCh <-chan struct{},
for {
select {
case <-s.shutdownChan:
s.drainTasks()
s.queueChan <- queue
return
// NOTE: implicit assumption
// 1. a queue is owned by a coroutine
// 2. a coroutine will remove a task from its queue then execute the task; this coroutine will ack / nack / reschedule the task at the end
// 3. queue will be deleted once queue is empty
//
// for batched tasks, if task is state
// ack: behavior is same as normal task
// nack: batched task will be broken into original tasks, and synchronously added to queue (so queue is not empty)
// reschedule: behavior is same as normal task
if !queue.IsEmpty() {
s.executeTask(queue)
} else {
deleted := s.queues.RemoveIf(queue.ID(), func(key any, value any) bool {
return value.(SequentialTaskQueue[T]).IsEmpty()
// TODO: change this function to process all available tasks in the queue.
func (s *SequentialScheduler[T]) executeTask(queue SequentialTaskQueue[T]) {
sequential_scheduler.go
var panicErr error
defer log.CapturePanic(s.logger, &panicErr)
shouldRetry := true
task := queue.Remove()
operation := func() (retErr error) {
var executePanic error
defer func() {
if executePanic != nil {
retErr = executePanic
shouldRetry = false // do not retry if panic
}
}()
if err := task.Execute(); err != nil {
return task.HandleErr(err)
}
return nil
}
return !s.isStopped() && shouldRetry && task.IsRetryableError(err)
}
if err := backoff.ThrottleRetry(operation, task.RetryPolicy(), isRetryable); err != nil {
sequential_scheduler.go
if s.isStopped() {
task.Abort()