s.Info.InvalidScheduleError = err.Error()
s.cspec = nil
s.Info.InvalidScheduleError = ""
s.cspec = cspec
}
}
Frontier kind: Code frontier
unlabeled · c_697c9bae9909
43 tests · 2712 LOC · 120 files · introduces 0 tests · 71 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/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.
2 files ranked by introduced lines: 71 introduced LOC across 13 ranges. Expand a file to inspect source; the > gutter marks introduced lines.
s.Info.InvalidScheduleError = err.Error()
s.cspec = nil
s.Info.InvalidScheduleError = ""
s.cspec = cspec
}
}
// refilled, try to refill it starting from `cacheBase` instead of `after`. This avoids having
// the cache range jump back and forth when generating a sequence of times.
// cacheBase must be before after
cacheBase = util.MinTime(cacheBase, after)
// Asking for a time before the cache, need to refill.
// Also if version changed (so we can fix a bug immediately).
if s.nextTimeCacheV2 == nil ||
after.Before(s.nextTimeCacheV2.StartTime.AsTime()) ||
SchedulerWorkflowVersion(s.nextTimeCacheV2.Version) != s.tweakables.Version {
s.fillNextTimeCacheV2(cacheBase)
}
// We may need up to three tries: the first is in the cache as it exists now,
// the second is refilled from cacheBase, and the third is if cacheBase was set
// too far in the past, we ignore it and fill the cache from after.
if res, ok := searchCache(s.nextTimeCacheV2, after); ok {
return res
}
// Otherwise refill from base
s.fillNextTimeCacheV2(cacheBase)
}
func searchCache(cache *schedulespb.NextTimeCache, after time.Time) (GetNextTimeResult, bool) {
workflow.go
// The cache covers a contiguous time range so we can do a linear search in it.
start := cache.StartTime.AsTime()
afterOffset := int64(after.Sub(start))
for i, nextOffset := range cache.NextTimes {
if nextOffset > afterOffset {
next := start.Add(time.Duration(nextOffset))
}
// Clear value so we can Get into it
s.nextTimeCacheV2 = nil
// Run this logic in a SideEffect so that we can fix bugs there without breaking
// existing schedule workflows.
val := workflow.SideEffect(s.ctx, func(ctx workflow.Context) any {
cache := &schedulespb.NextTimeCache{
Version: int64(s.tweakables.Version),
// but it might not. To be sure, check StartTime also (the field names differ between json
// and proto so json.Unmarshal will never fill in StartTime).
if val.Get(&s.nextTimeCacheV2) == nil && s.nextTimeCacheV2.GetStartTime() != nil {
workflow.go
return
}
// Try as json value
var jsonVal jsonNextTimeCacheV2
}
// Implementation using a cache to save markers + computation.
if s.hasMinVersion(NewCacheAndJitter) {
return s.getNextTimeV2(after, after)
} else if s.hasMinVersion(BatchAndCacheTimeQueries) {
return s.getNextTimeV1(after)
}
}
// A previous version would record a marker for each time which could make a workflow
// fail. With the new version, the entire time range is skipped if the workflow is paused
// or we are not going to take an action now
if s.hasMinVersion(BatchAndCacheTimeQueries) {
// Peek at paused/remaining actions state and don't bother if we're not going to
// take an action now. (Don't count as missed catchup window either.)
// Skip over entire time range if paused or no actions can be taken
if !s.canTakeScheduledAction(manual, false) {
// use end as last action time so that we don't reprocess time spent paused
return s.getNextTime(end).Next, end
} else if cw.AsDuration() < s.tweakables.MinCatchupWindow {
return s.tweakables.MinCatchupWindow
return cw.AsDuration()
}
}
}
if s.hasMinVersion(NewCacheAndJitter) {
return fmt.Sprintf("%s-%s", s.State.NamespaceId, s.State.ScheduleId)
}
}
*x = NextTimeCache{}
mi := &file_temporal_server_api_schedule_v1_message_proto_msgTypes[12]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *NextTimeCache) String() string {
func (*NextTimeCache) ProtoMessage() {}
mi := &file_temporal_server_api_schedule_v1_message_proto_msgTypes[12]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
if x != nil {
return x.StartTime
}
return nil
}