}
timer := time.NewTimer(queueMetricUpdateInterval)
defer timer.Stop()
done := s.lifecycleCtx.Done()
for {
select {
case <-done:
return
Frontier kind: Code frontier
unlabeled · c_6e3123d62bf9
29 tests · 3538 LOC · 146 files · introduces 0 tests · 45 LOC · 2 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/TestAPIToPriorityMappinggo.temporal.io/server/common/future/TestFutureSuite/TestGetWhenContextCanceledgo.temporal.io/server/common/future/TestFutureSuite/TestSetGetReady_Sequentialgo.temporal.io/server/common/future/TestFutureSuite/TestSetReadyGet_Parallelgo.temporal.io/server/common/future/TestFutureSuite/TestSetReadyGet_SequentialEvery 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.
2 files ranked by introduced lines: 45 introduced LOC across 12 ranges. Expand a file to inspect source; the > gutter marks introduced lines.
}
timer := time.NewTimer(queueMetricUpdateInterval)
defer timer.Stop()
done := s.lifecycleCtx.Done()
for {
select {
case <-done:
return
case contextRequestAcquire:
return nil // nothing to do, already acquiring
s.state = contextStateAcquired
if request.engine != nil {
// engineFuture.Set should only be called inside stateLock when state is
// Acquiring, so that other code (i.e. FinishStop) can know that after a state
s.engineFuture.Set(request.engine, nil)
}
// we should either have an engine from a previous transition, or set one now
s.contextTaggedLogger.Warn("transition to acquired but no engine set")
}
case contextRequestLost:
return nil // nothing to do, already acquiring
// notifyQueueProcessor sends notification to all queue processors for triggering a load
// NOTE: this method assumes engineFuture is already in a ready state.
// use a cancelled ctx so the method won't be blocked if engineFuture is not ready
cancelledCtx, cancel := context.WithCancel(context.Background())
cancel()
// we will get the engine when the Future is ready
engine, err := s.engineFuture.Get(cancelledCtx)
if err != nil {
s.contextTaggedLogger.Warn("tried to notify queue processor when engine is not ready")
return
}
fakeTasks := make(map[tasks.Category][]tasks.Task)
for _, category := range s.taskCategoryRegistry.GetCategories() {
fakeTasks[category] = []tasks.Task{tasks.NewFakeTask(definition.WorkflowKey{}, category, now)}
}
}
s.wLock()
if s.errorByState() != nil {
// if not in acquired state, this function will be called again
// later when shard is re-acquired.
}
s.handoverTracker.ResolvePendingTaskIDs(maxReplicationTaskID)
s.wUnlock()
s.notifyReplicationQueueProcessor(maxReplicationTaskID)
}
// we know engineFuture must be ready here, and we can notify queue processor
// to trigger a load as queue max level can be updated to a newer value
// This runs until the lifecycleCtx is cancelled, so we only need to start it once
s.queueMetricEmitter.Do(func() {
go s.monitorQueueMetrics()
})
return nil
}
}
func (t *defaultHandoverTracker) ResolvePendingTaskIDs(maxReplicationTaskID int64) {
handover_tracker.go
for _, handoverInfo := range t.handoverNamespaces {
if handoverInfo.MaxReplicationTaskID == PendingMaxReplicationTaskID {
handoverInfo.MaxReplicationTaskID = maxReplicationTaskID