message.pb.go ×7

Frontier kind: Code frontier

unlabeled · c_132967089e05

3 tests · 5071 LOC · 168 files · introduces 0 tests · 65 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
12 ranges65 lines · 2 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
1150 ranges5071 lines · 168 files · Browse complete extent
All tests (intent)
3 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: 65 introduced LOC across 12 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/chasm/lib/scheduler/scheduler.go 37 introduced LOC · 5 ranges

Open complete file

273 ctx chasm.MutableContext,
274 req *schedulerpb.CreateFromMigrationStateRequest,
275 > ) (*Scheduler, error) { scheduler.go
276 > state := req.GetState()
277 >
278 > // Default to a non-nil empty result, matching NewScheduler. Migrated state
279 > // may carry no completion result (e.g. a schedule migrated before its first
280 > // action), and startWorkflow dereferences LastCompletionResult unconditionally.
281 > lastCompletion := state.GetLastCompletionResult()
282 > if lastCompletion == nil {
283 lastCompletion = &schedulerpb.LastCompletionResult{}
284 }
285
286 > sched := &Scheduler{ scheduler.go
287 > SchedulerState: state.GetSchedulerState(),
288 > cacheConflictToken: state.GetSchedulerState().GetConflictToken(),
289 > Backfillers: make(chasm.Map[string, *Backfiller]),
290 > LastCompletionResult: chasm.NewDataField(ctx, lastCompletion),
291 > EventLog: chasm.NewComponentField(ctx, NewEventLog(ctx)),
292 > }
293 > sched.setNullableFields()
294 >
295 > // These components won't start with any tasks, as stale running workflow entries
296 > // can cause immediate computation after migration to drop actions due to overlap
297 > // policy. Instead, SchedulerCallbacksTask fires both tasks after ensuring cached
298 > // running workflow state is up-to-date.
299 > sched.Invoker = chasm.NewComponentField(ctx, newInvokerWithState(ctx, state.GetInvokerState()))
300 > sched.Generator = chasm.NewComponentField(ctx, newGeneratorWithState(ctx, state.GetGeneratorState()))
301 >
302 > for backfillID, backfillerState := range state.GetBackfillers() {
303 sched.Backfillers[backfillID] = chasm.NewComponentField(ctx, newBackfillerWithState(ctx, backfillerState))
304 }
305
306 > visibility := chasm.NewVisibility(ctx) scheduler.go
307 > sched.Visibility = chasm.NewComponentField(ctx, visibility)
308 > visibility.MergeCustomSearchAttributes(ctx, state.GetSearchAttributes())
309 > visibility.MergeCustomMemo(ctx, state.GetMemo())
310 >
311 > // Defer generation until SchedulerCallbacksTask resolves stale running-workflow
312 > // state; if there are none, generate directly.
313 > if slices.ContainsFunc(state.GetInvokerState().GetBufferedStarts(), needsCallback) {
314 ctx.AddTask(sched, chasm.TaskAttributes{}, &schedulerpb.SchedulerCallbacksTask{})
315 > } else { scheduler.go
316 > sched.Generator.Get(ctx).Generate(ctx)
317 > }
318
319 > return sched, nil scheduler.go
320 }
321
go.temporal.io/server/chasm/lib/scheduler/gen/schedulerpb/v1/message.pb.go 28 introduced LOC · 7 ranges

Open complete file

124 }
125
126 > func (x *SchedulerState) GetConflictToken() int64 { message.pb.go
127 > if x != nil {
128 > return x.ConflictToken
129 > }
130 return 0
131 }
568 }
569
570 > func (x *SchedulerMigrationState) GetGeneratorState() *GeneratorState { message.pb.go
571 > if x != nil {
572 > return x.GeneratorState
573 > }
574 return nil
575 }
576
577 > func (x *SchedulerMigrationState) GetInvokerState() *InvokerState { message.pb.go
578 > if x != nil {
579 > return x.InvokerState
580 > }
581 return nil
582 }
583
584 > func (x *SchedulerMigrationState) GetBackfillers() map[string]*BackfillerState { message.pb.go
585 > if x != nil {
586 > return x.Backfillers
587 > }
588 return nil
589 }
590
591 > func (x *SchedulerMigrationState) GetLastCompletionResult() *LastCompletionResult { message.pb.go
592 > if x != nil {
593 > return x.LastCompletionResult
594 > }
595 return nil
596 }
597
598 > func (x *SchedulerMigrationState) GetSearchAttributes() map[string]*v12.Payload { message.pb.go
599 > if x != nil {
600 > return x.SearchAttributes
601 > }
602 return nil
603 }
604
605 > func (x *SchedulerMigrationState) GetMemo() map[string]*v12.Payload { message.pb.go
606 > if x != nil {
607 > return x.Memo
608 > }
609 return nil
610 }