scheduler.go ×5

Frontier kind: Code frontier

unlabeled · c_d251ee2ff627

3 tests · 5180 LOC · 170 files · introduces 0 tests · 21 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
5 ranges21 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
1176 ranges5180 lines · 170 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.

1 file ranked by introduced lines: 21 introduced LOC across 5 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

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

Open complete file

876 return nil, ErrMigrationPending
877 }
878 > if !s.validateConflictToken(req.FrontendRequest.ConflictToken) { scheduler.go
879 return nil, ErrConflictTokenMismatch
880 }
881
882 // Update custom search attributes.
883 > if req.FrontendRequest.GetSearchAttributes() != nil { scheduler.go
884 // To preserve compatibility with V1 scheduler, we do a full replacement
885 // of search attributes, dropping any that aren't a part of the update's
897
898 // Update custom memo.
899 > if req.FrontendRequest.GetMemo() != nil { scheduler.go
900 visibility := s.Visibility.Get(ctx)
901 visibility.ReplaceCustomMemo(ctx, req.FrontendRequest.GetMemo().GetFields())
902 }
903
904 > s.Schedule = req.FrontendRequest.Schedule scheduler.go
905 > s.setNullableFields()
906 >
907 > s.Info.UpdateTime = timestamppb.New(ctx.Now(s))
908 > s.updateConflictToken()
909 > s.getOrCreateEventLog(ctx).LogEvent(ctx, "updated via API")
910 >
911 > // Since the spec may have been updated, kick off the generator.
912 > s.Generator.Get(ctx).Generate(ctx)
913 >
914 > return &schedulerpb.UpdateScheduleResponse{
915 > FrontendResponse: &workflowservice.UpdateScheduleResponse{},
916 > }, nil
917 }
918
964 }
965
966 > func (s *Scheduler) validateConflictToken(token []byte) bool { scheduler.go
967 > // When unset in mutate requests, the schedule should update unconditionally.
968 > if token == nil {
969 > return true
970 > }
971
972 current := s.generateConflictToken()