workflow_state_replicator.go ×8

Frontier kind: Code frontier

unlabeled · c_bd63afb7e7e2

8 tests · 4309 LOC · 197 files · introduces 0 tests · 20 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
8 ranges20 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
645 ranges4309 lines · 197 files · Browse complete extent
All tests (intent)
8 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: 20 introduced LOC across 8 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/service/history/ndc/workflow_state_replicator.go 20 introduced LOC · 8 ranges

Open complete file

1258 }
1259
1260 > index, isNewBranch, err := r.getBranchToAppend( workflow_state_replicator.go
1261 > ctx,
1262 > wfCtx,
1263 > localMutableState,
1264 > sourceVersionHistory,
1265 > isNewMutableState)
1266 > if err != nil {
1267 return nil, err
1268 }
1269 > localVersionHistories.CurrentVersionHistoryIndex = index workflow_state_replicator.go
1270 > var newBranchToken []byte
1271 > if isNewBranch {
1272 newBranchToken = localVersionHistories.Histories[index].BranchToken
1273 }
1274 > versionHistoryToAppend, err := versionhistory.GetVersionHistory(localVersionHistories, index) workflow_state_replicator.go
1275 > if err != nil {
1276 return newBranchToken, err
1277 }
1278 > var localLastItem *historyspb.VersionHistoryItem workflow_state_replicator.go
1279 > if isNewMutableState {
1280 localLastItem = &historyspb.VersionHistoryItem{
1281 EventId: 0,
1282 Version: 0,
1283 }
1285 localLastItem, err = versionhistory.GetLastVersionHistoryItem(versionHistoryToAppend)
1286 if err != nil {
1289 }
1290
1291 > sourceLastItem, err := versionhistory.GetLastVersionHistoryItem(sourceVersionHistory) workflow_state_replicator.go
1292 > if err != nil {
1293 return newBranchToken, err
1294 }
1295 > if versionhistory.IsEqualVersionHistoryItem(localLastItem, sourceLastItem) { workflow_state_replicator.go
1296 localMutableState.SetHistoryBuilder(historybuilder.NewImmutableForUpdateNextEventID(sourceLastItem))
1297 return newBranchToken, nil
1518 sourceVersionHistory *historyspb.VersionHistory,
1519 isNewMutableState bool,
1520 > ) (int32, bool, error) { workflow_state_replicator.go
1521 > if isNewMutableState {
1522 return 0, true, nil
1523 }