resetter.go ×8

Frontier kind: Joint frontier

unlabeled · c_31e3a12a5de9

1 test · 4368 LOC · 193 files · introduces 1 test · 47 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
8 ranges47 lines · 1 files
Tests
1 test

Contains — complete concept membership

All code (extent)
653 ranges4368 lines · 193 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: 47 introduced LOC across 8 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/service/history/ndc/resetter.go 47 introduced LOC · 8 ranges

Open complete file

99 }
100
101 > resetBranchToken, err := r.getResetBranchToken(ctx, baseBranchToken, baseLastEventID) resetter.go
102 > if err != nil {
103 return nil, err
104 }
105
106 > requestID := uuid.NewString() resetter.go
107 > rebuildMutableState, rebuildStats, err := r.stateRebuilder.Rebuild(
108 > ctx,
109 > now,
110 > definition.NewWorkflowKey(
111 > r.namespaceID.String(),
112 > r.workflowID,
113 > r.baseRunID,
114 > ),
115 > baseBranchToken,
116 > baseLastEventID,
117 > new(baseLastEventVersion),
118 > definition.NewWorkflowKey(
119 > r.namespaceID.String(),
120 > r.workflowID,
121 > r.newRunID,
122 > ),
123 > resetBranchToken,
124 > requestID,
125 > )
126 > if err != nil {
127 return nil, err
128 }
129 > rebuildMutableState.AddHistorySize(rebuildStats.HistorySize) resetter.go
130 > rebuildMutableState.AddExternalPayloadSize(rebuildStats.ExternalPayloadSize)
131 > rebuildMutableState.AddExternalPayloadCount(rebuildStats.ExternalPayloadCount)
132 >
133 > if err := rebuildMutableState.RefreshExpirationTimeoutTask(ctx); err != nil {
134 return nil, err
135 }
136
137 > r.newContext.Clear() resetter.go
138 > return rebuildMutableState, nil
139 }
140
181 }
182
183 > baseVersionHistory, err := versionhistory.GetVersionHistory(baseVersionHistories, index) resetter.go
184 > if err != nil {
185 return nil, err
186 }
187 > return baseVersionHistory.GetBranchToken(), nil resetter.go
188 case *serviceerror.NotFound:
189 return nil, serviceerrors.NewRetryReplication(
206 baseBranchToken []byte,
207 baseLastEventID int64,
208 > ) ([]byte, error) { resetter.go
209 >
210 > // fork a new history branch
211 > shardID := r.shard.GetShardID()
212 > resp, err := r.executionMgr.ForkHistoryBranch(ctx, &persistence.ForkHistoryBranchRequest{
213 > ForkBranchToken: baseBranchToken,
214 > ForkNodeID: baseLastEventID + 1,
215 > Info: persistence.BuildHistoryGarbageCleanupInfo(r.namespaceID.String(), r.workflowID, r.newRunID),
216 > ShardID: shardID,
217 > NamespaceID: r.namespaceID.String(),
218 > NewRunID: r.newRunID,
219 > })
220 > if err != nil {
221 return nil, err
222 }
223
224 > return resp.NewBranchToken, nil resetter.go
225 }