backfiller_tasks.go ×7

Frontier kind: Code frontier

unlabeled · c_54e1fb313dd3

8 tests · 5220 LOC · 170 files · introduces 0 tests · 34 LOC · 4 files

Introduces — evidence that enters the hierarchy at this concept

Code
11 ranges34 lines · 4 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
1191 ranges5220 lines · 170 files · Browse complete extent
All tests (intent)
8 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.

4 files ranked by introduced lines: 34 introduced LOC across 11 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/chasm/lib/scheduler/backfiller_tasks.go 23 introduced LOC · 7 ranges

Open complete file

55 attrs chasm.TaskInvocation,
56 _ *schedulerpb.BackfillerTask,
57 > ) (bool, error) { backfiller_tasks.go
58 > if backfiller.Scheduler.Get(ctx).WorkflowMigration != nil {
59 return false, nil
60 }
61 > valid, err := validateTaskHighWaterMark(backfiller.GetLastProcessedTime(), attrs.ScheduledTime) backfiller_tasks.go
62 > if err != nil {
63 return false, err
64 }
65 > if !valid { backfiller_tasks.go
66 newTaggedMetricsHandler(b.metricsHandler, backfiller.Scheduler.Get(ctx)).
67 Counter(metrics.ScheduleBackfillerTask.Name()).
68 Record(1, metrics.OutcomeTag(outcomeInvalidated), metrics.ReasonTag(backfillerInvalidatedStaleHWM))
69 }
70 > return valid, nil backfiller_tasks.go
71 }
72
76 _ chasm.TaskAttributes,
77 _ *schedulerpb.BackfillerTask,
78 > ) error { backfiller_tasks.go
79 > defer func() { backfiller.Attempt++ }()
80
81 > scheduler := backfiller.Scheduler.Get(ctx) backfiller_tasks.go
82 > logger := newTaggedLogger(b.baseLogger, scheduler)
83 > metricsHandler := newTaggedMetricsHandler(b.metricsHandler, scheduler)
84 > metricsHandler.Counter(metrics.ScheduleBackfillerTask.Name()).Record(1, metrics.OutcomeTag(outcomeFired), metrics.ReasonTag(reasonNone))
85 >
86 > invoker := scheduler.Invoker.Get(ctx)
87 >
88 > backfiller.getOrCreateEventLog(ctx).LogEvent(ctx, "backfillerTask executed")
89 >
90 > // If the buffer is already full, don't move the watermark at all, just back off
91 > // and retry.
92 > tweakables := b.config.Tweakables(scheduler.Namespace)
93 > limit, err := b.allowedBufferedStarts(ctx, scheduler, invoker, tweakables)
94 > if err != nil {
95 return err
96 }
97 > if limit <= 0 { backfiller_tasks.go
98 // Buffer is full, back off and retry later. Unlike the generator, the
99 // backfiller doesn't drop actions - it will retry after backoff.
go.temporal.io/server/chasm/lib/scheduler/gen/schedulerpb/v1/message.pb.go 4 introduced LOC · 1 range

Open complete file

423 }
424
425 > func (x *BackfillerState) GetBackfillId() string { message.pb.go
426 > if x != nil {
427 > return x.BackfillId
428 > }
429 return ""
430 }
go.temporal.io/server/chasm/tree.go 4 introduced LOC · 2 ranges

Open complete file

563 // Only Component nodes need to be validated.
564 if !n.isComponent() {
565 > return nil tree.go
566 > }
567
568 // Hydrate the component so we can access its LifecycleState.
695 componentAttr := n.serializedNode.GetMetadata().GetComponentAttributes()
696 if componentAttr == nil {
697 > return false tree.go
698 > }
699 componentTypeID := componentAttr.GetTypeId()
700 if componentTypeID == CallbackComponentID ||
go.temporal.io/server/chasm/lib/scheduler/backfiller.go 3 introduced LOC · 1 range

Open complete file

70 }
71
72 > func (b *Backfiller) LifecycleState(ctx chasm.Context) chasm.LifecycleState { backfiller.go
73 > return chasm.LifecycleStateRunning
74 > }
75
76 func (b *Backfiller) RequestType() BackfillRequestType {