tree.go ×9

Frontier kind: Code frontier

unlabeled · c_f4100360ec50

263 tests · 2204 LOC · 82 files · introduces 0 tests · 19 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
9 ranges19 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
388 ranges2204 lines · 82 files · Browse complete extent
All tests (intent)
263 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: 19 introduced LOC across 9 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/chasm/tree.go 19 introduced LOC · 9 ranges

Open complete file

1721
1722 if n.subtreeIsDirty {
1723 > if err := n.closeTransactionForceUpdateVisibility(immutableContext, rootLifecycleChanged); err != nil { tree.go
1724 return NodesMutation{}, err
1725 }
1845 immutableContext Context,
1846 rootLifecycleChanged bool,
1847 > ) error { tree.go
1848 > if n.deleteAfterClose {
1849 return nil
1850 }
2022 // so we skip validation only for nodes with no dirty node anywhere in their lineage.
2023 if node.subtreeIsDirty {
2024 > // Ensure this node's component value is hydrated before cleaning up tasks. tree.go
2025 > if err := node.prepareComponentValue(taskValidationContext); err != nil {
2026 return err
2027 }
2028
2029 > cleanedUp, err := node.closeTransactionCleanupInvalidTasks(taskValidationContext) tree.go
2030 > if err != nil {
2031 return err
2032 }
2033
2034 > if cleanedUp { tree.go
2035 // add the current node to UpdatedNodes map if it's not already there
2036 encodedPath, err := node.getEncodedPath()
2164 func (n *Node) closeTransactionCleanupInvalidTasks(
2165 validateContext Context,
2166 > ) (bool, error) { tree.go
2167 > // Validate existing tasks and remove invalid ones.
2168 > var validationErr error
2169 > cleanedUp := false
2170 > deleteFunc := func(existingTask *persistencespb.ChasmComponentAttributes_Task) bool {
2171 existingTaskInstance, err := n.deserializeComponentTask(existingTask)
2172 if err != nil {
2196 }
2197
2198 > componentAttr := n.serializedNode.Metadata.GetComponentAttributes() tree.go
2199 > componentAttr.SideEffectTasks = slices.DeleteFunc(componentAttr.SideEffectTasks, deleteFunc)
2200 > if validationErr != nil {
2201 return false, validationErr
2202 }
2203 > componentAttr.PureTasks = slices.DeleteFunc(componentAttr.PureTasks, deleteFunc) tree.go
2204 > if validationErr != nil {
2205 return false, validationErr
2206 }
2207 > return cleanedUp, nil tree.go
2208 }
2209