this Executable,
that Executable,
return this.GetVisibilityTime().Before(that.GetVisibilityTime())
}
func (q *memoryScheduledQueue) Start() {
Frontier kind: Joint frontier
unlabeled · c_b91d2c01ae92
3 tests · 2984 LOC · 142 files · introduces 1 test · 52 LOC · 3 files
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/persistence/client/TestQuotasSuite/TestAPITypeCallOriginPriorityOverrideMappinggo.temporal.io/server/common/persistence/client/TestQuotasSuite/TestBackgroundTypeAPIPriorityOverrideMappinggo.temporal.io/server/common/persistence/client/TestQuotasSuite/TestCallerTypeDefaultPriorityMappinggo.temporal.io/server/common/persistence/client/TestQuotasSuite/TestRequestPrioritiesOrderedgo.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.
1 test introduced at this concept.
Every collected source range enters the hierarchy at exactly one concept.
3 files ranked by introduced lines: 52 introduced LOC across 12 ranges. Expand a file to inspect source; the > gutter marks introduced lines.
this Executable,
that Executable,
return this.GetVisibilityTime().Before(that.GetVisibilityTime())
}
func (q *memoryScheduledQueue) Start() {
}
q.newTaskCh <- task
}
//nolint:revive // cognitive complexity
case <-q.shutdownCh:
return
var nextTaskTime time.Time
if !q.taskQueue.IsEmpty() {
nextTaskTime = q.taskQueue.Peek().GetVisibilityTime()
}
q.taskQueue.Add(newTask)
// If there is no timer set OR new time is earlier than the current one, then timer needs to be set to the new time.
if nextTaskTime.IsZero() || newTask.GetVisibilityTime().Before(nextTaskTime) {
// But before reset if timer is there it needs to be stopped.
if !nextTaskTime.IsZero() {
if !q.nextTaskTimer.Stop() {
// Drain timer channel to prevent timer firing.
<-q.nextTaskTimer.C
}
}
q.nextTaskTimer.Reset(newTask.GetVisibilityTime().Sub(q.timeSource.Now()))
memory_scheduled_queue.go
}
case <-q.nextTaskTimer.C:
taskToExecute := q.taskQueue.Remove()
// Skip tasks which are already canceled. Majority of the tasks in the queue should be cancelled already.
nextTask := q.purgeCanceledTasks()
if nextTask != nil {
q.nextTaskTimer.Reset(nextTask.GetVisibilityTime().Sub(q.timeSource.Now()))
}
// If current taskToExecute is also cancelled don't submit it to scheduler.
continue
}
// For scheduler metrics to work properly.
if !q.scheduler.TrySubmit(taskToExecute) {
// If all workers are busy then put the task back to the queue.
// Must be done in a separate goroutine to avoid deadlock.
}
}
func (q *memoryScheduledQueue) purgeCanceledTasks() (nextTask Executable) {
memory_scheduled_queue.go
if !q.taskQueue.IsEmpty() {
nextTask = q.taskQueue.Peek()
}
for nextTask != nil {
if nextTask.State() != ctasks.TaskStateCancelled {
return
}
// Remove canceled task from queue.
q.taskQueue.Remove()
executable Executable,
workflowTaskTimeoutTask *tasks.WorkflowTaskTimeoutTask,
return &speculativeWorkflowTaskTimeoutExecutable{
Executable: executable,
workflowTaskTimeoutTask: workflowTaskTimeoutTask,
}
}
// ctasks.Task interface overrides.
}
func (e *speculativeWorkflowTaskTimeoutExecutable) State() ctasks.State {
speculative_workflow_task_timeout_executable.go
return e.workflowTaskTimeoutTask.State()
}
d.state.Store(uint32(ctasks.TaskStateCancelled))
}
return ctasks.State(d.state.Load())
}
func (d *WorkflowTaskTimeoutTask) String() string {