mutable_state_impl.go ×6

Frontier kind: Code frontier

unlabeled · c_e19d991cd50d

18 tests · 6865 LOC · 231 files · introduces 0 tests · 30 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
6 ranges30 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
1285 ranges6865 lines · 231 files · Browse complete extent
All tests (intent)
18 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: 30 introduced LOC across 6 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/service/history/workflow/mutable_state_impl.go 30 introduced LOC · 6 ranges

Open complete file

6415 header *commonpb.Header,
6416 clock *clockspb.VectorClock,
6417 > ) (*historypb.HistoryEvent, error) { mutable_state_impl.go
6418 > opTag := tag.WorkflowActionChildWorkflowStarted
6419 > if err := ms.checkMutability(opTag); err != nil {
6420 return nil, err
6421 }
6422
6423 > ci, ok := ms.GetChildExecutionInfo(initiatedID) mutable_state_impl.go
6424 > if !ok || ci.StartedEventId != common.EmptyEventID {
6425 ms.logWarn(mutableStateInvalidHistoryActionMsg, opTag,
6426 tag.WorkflowEventID(ms.GetNextEventID()),
6431 }
6432
6433 > event := ms.hBuilder.AddChildWorkflowExecutionStartedEvent( mutable_state_impl.go
6434 > initiatedID,
6435 > namespace.Name(ci.GetNamespace()),
6436 > namespace.ID(ci.GetNamespaceId()),
6437 > execution,
6438 > workflowType,
6439 > header,
6440 > )
6441 > if err := ms.ApplyChildWorkflowExecutionStartedEvent(event, clock); err != nil {
6442 return nil, err
6443 }
6444 > return event, nil mutable_state_impl.go
6445 }
6446
6448 event *historypb.HistoryEvent,
6449 clock *clockspb.VectorClock,
6450 > ) error { mutable_state_impl.go
6451 > attributes := event.GetChildWorkflowExecutionStartedEventAttributes()
6452 > initiatedID := attributes.GetInitiatedEventId()
6453 >
6454 > ci, ok := ms.GetChildExecutionInfo(initiatedID)
6455 > if !ok {
6456 ms.logError(
6457 fmt.Sprintf("unable to find child workflow event ID: %v in mutable state", initiatedID),
6461 }
6462
6463 > ms.approximateSize -= ci.Size() mutable_state_impl.go
6464 >
6465 > ci.StartedEventId = event.GetEventId()
6466 > ci.StartedRunId = attributes.GetWorkflowExecution().GetRunId()
6467 > ci.Clock = clock
6468 > ms.updateChildExecutionInfos[ci.InitiatedEventId] = ci
6469 > ms.approximateSize += ci.Size()
6470 >
6471 > return nil
6472 }
6473