tree.go ×5

Frontier kind: Code frontier

unlabeled · c_ff099828f231

169 tests · 2541 LOC · 91 files · introduces 0 tests · 26 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
5 ranges26 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
475 ranges2541 lines · 91 files · Browse complete extent
All tests (intent)
169 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: 26 introduced LOC across 5 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/chasm/tree.go 26 introduced LOC · 5 ranges

Open complete file

2088 }
2089
2090 > if firstPureTask == nil || tree.go
2091 > comparePureTasks(pureTasks[0], firstPureTask) < 0 {
2092 > firstPureTask = pureTasks[0]
2093 > firstPureTaskNode = node
2094 > }
2095 }
2096
2352 }
2353
2354 > firstPureTaskScheduledTime := firstPureTask.ScheduledTime.AsTime() tree.go
2355 > n.backend.DeleteCHASMPureTasks(firstPureTaskScheduledTime)
2356 >
2357 > if firstPureTask.PhysicalTaskStatus == physicalTaskStatusCreated {
2358 return nil
2359 }
2360
2361 > n.backend.AddTasks(&tasks.ChasmTaskPure{ tree.go
2362 > WorkflowKey: n.backend.GetWorkflowKey(),
2363 > VisibilityTimestamp: firstPureTaskScheduledTime,
2364 > ArchetypeID: archetypeID,
2365 > })
2366 >
2367 > // We need to persist the task status change as well, so add the node
2368 > // to the list of updated nodes.
2369 > // However, since task status is a cluster local field, we don't really
2370 > // update LastUpdateVersionedTransition for this node, and the change won't be replicated.
2371 > firstPureTask.PhysicalTaskStatus = physicalTaskStatusCreated
2372 > encodedPath, err := firstTaskNode.getEncodedPath()
2373 > if err != nil {
2374 return err
2375 }
2376 > n.systemMutation.UpdatedNodes[encodedPath] = firstTaskNode.serializedNode tree.go
2377 > return nil
2378 }
2379
2477 // System mutation are most likely to be empty, so we reuse existing ones if possible.
2478 if len(n.systemMutation.UpdatedNodes) != 0 {
2479 > n.systemMutation.UpdatedNodes = make(map[string]*persistencespb.ChasmNode) tree.go
2480 > }
2481 if len(n.systemMutation.DeletedNodes) != 0 {
2482 n.systemMutation.DeletedNodes = make(map[string]struct{})