state_rebuilder.go ×4

Frontier kind: Joint frontier

unlabeled · c_68a402c8919e

1 test · 6102 LOC · 213 files · introduces 1 test · 32 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
6 ranges32 lines · 2 files
Tests
1 test

Contains — complete concept membership

All code (extent)
1147 ranges6102 lines · 213 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.

2 files ranked by introduced lines: 32 introduced LOC across 6 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/service/history/ndc/state_rebuilder.go 27 introduced LOC · 4 ranges

Open complete file

111 targetBranchToken []byte,
112 requestID string,
113 > ) (historyi.MutableState, RebuildStats, error) { state_rebuilder.go
114 > rebuiltMutableState, lastTxnId, err := r.buildMutableStateFromEvent(
115 > ctx,
116 > now,
117 > baseWorkflowIdentifier,
118 > baseBranchToken,
119 > baseLastEventID,
120 > baseLastEventVersion,
121 > targetWorkflowIdentifier,
122 > targetBranchToken,
123 > requestID,
124 > )
125 > if err != nil {
126 return nil, RebuildStats{}, err
127 }
128
129 // close rebuilt mutable state transaction clearing all generated tasks, etc.
130 > _, _, err = rebuiltMutableState.CloseTransactionAsSnapshot(ctx, historyi.TransactionPolicyPassive) state_rebuilder.go
131 > if err != nil {
132 return nil, RebuildStats{}, err
133 }
134
135 > rebuiltMutableState.GetExecutionInfo().LastFirstEventTxnId = lastTxnId state_rebuilder.go
136 >
137 > // refresh tasks to be generated
138 > // TODO: ideally the executionTimeoutTimerTaskStatus field should be carried over
139 > // from the base run. However, RefreshTasks always resets that field and
140 > // force regenerates the execution timeout timer task.
141 > if err := r.taskRefresher.Refresh(ctx, rebuiltMutableState, false); err != nil {
142 return nil, RebuildStats{}, err
143 }
144
145 > return rebuiltMutableState, RebuildStats{ state_rebuilder.go
146 > HistorySize: r.rebuiltHistorySize,
147 > ExternalPayloadSize: r.rebuiltExternalPayloadSize,
148 > ExternalPayloadCount: r.rebuiltExternalPayloadCount,
149 > }, nil
150 }
151
go.temporal.io/server/service/history/workflow/mutable_state_impl.go 5 introduced LOC · 2 ranges

Open complete file

8490 }
8491 return nil, nil
8492 > case historyi.TransactionPolicyPassive: mutable_state_impl.go
8493 > return nil, nil
8494 default:
8495 panic(fmt.Sprintf("unknown transaction policy: %v", transactionPolicy))
8623 ) error {
8624 if transactionPolicy == historyi.TransactionPolicyPassive {
8625 > // already handled in mutable state. mutable_state_impl.go
8626 > return nil
8627 > }
8628
8629 currentVersionHistory, err := versionhistory.GetCurrentVersionHistory(ms.executionInfo.VersionHistories)