task_generator.go ×7

Frontier kind: Joint frontier

unlabeled · c_5211252596d5

1 test · 3105 LOC · 145 files · introduces 1 test · 16 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
7 ranges16 lines · 1 files
Tests
1 test

Contains — complete concept membership

All code (extent)
533 ranges3105 lines · 145 files · Browse complete extent
All tests (intent)
1 testBrowse 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.

1 test introduced at this concept.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

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

go.temporal.io/server/service/history/workflow/task_generator.go 16 introduced LOC · 7 ranges

Open complete file

304 for _, op := range opLog {
305 switch transitionOp := op.(type) {
306 > case hsm.DeleteOperation: task_generator.go
307 > deleteStateMachineTimersByPath(r.mutableState.GetExecutionInfo(), transitionOp.Path())
308 case hsm.TransitionOperation:
309 node, err := tree.Child(transitionOp.Path())
997 }
998
999 > func deleteStateMachineTimersByPath(execInfo *persistencespb.WorkflowExecutionInfo, path []hsm.Key) { task_generator.go
1000 > trimmedTimers := make([]*persistencespb.StateMachineTimerGroup, 0, len(execInfo.StateMachineTimers))
1001 >
1002 > for _, group := range execInfo.StateMachineTimers {
1003 > trimmedInfos := make([]*persistencespb.StateMachineTaskInfo, 0, len(group.Infos))
1004 > for _, info := range group.GetInfos() {
1005 > if !isPathAffectedByDelete(path, info.GetRef().GetPath()) {
1006 trimmedInfos = append(trimmedInfos, info)
1007 }
1008 }
1009 > if len(trimmedInfos) > 0 { task_generator.go
1010 trimmedTimers = append(trimmedTimers, &persistencespb.StateMachineTimerGroup{
1011 Infos: trimmedInfos,
1015 }
1016 }
1017 > execInfo.StateMachineTimers = trimmedTimers task_generator.go
1018 }
1019
1020 > func isPathAffectedByDelete(deletePath []hsm.Key, timerPath []*persistencespb.StateMachineKey) bool { task_generator.go
1021 > if len(deletePath) > len(timerPath) {
1022 return false
1023 }
1024 > for i := range deletePath { task_generator.go
1025 > if deletePath[i].Type != timerPath[i].GetType() || deletePath[i].ID != timerPath[i].GetId() {
1026 return false
1027 }
1028 }
1029 > return true task_generator.go
1030 }
1031