transaction_impl.go ×8

Frontier kind: Code frontier

unlabeled · c_258ebd4dc785

141 tests · 3317 LOC · 146 files · introduces 0 tests · 74 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
8 ranges74 lines · 1 files
Tests
0 tests

Contains — complete concept membership

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

go.temporal.io/server/service/history/workflow/transaction_impl.go 74 introduced LOC · 8 ranges

Open complete file

203 }
204
205 > if err := NotifyNewHistoryMutationEvent(engine, currentWorkflowMutation); err != nil { transaction_impl.go
206 t.logger.Error("unable to notify workflow mutation", tag.Error(err))
207 }
208 > if err := NotifyNewHistorySnapshotEvent(engine, newWorkflowSnapshot); err != nil { transaction_impl.go
209 t.logger.Error("unable to notify workflow creation", tag.Error(err))
210 }
211 > updateHistorySizeDiff := int64(resp.UpdateMutableStateStats.HistoryStatistics.SizeDiff) transaction_impl.go
212 > newHistorySizeDiff := int64(0)
213 > if resp.NewMutableStateStats != nil {
214 newHistorySizeDiff = int64(resp.NewMutableStateStats.HistoryStatistics.SizeDiff)
215 }
216 > return updateHistorySizeDiff, newHistorySizeDiff, nil transaction_impl.go
217 }
218
530 }
531
532 > if namespaceEntry, err := shardContext.GetNamespaceRegistry().GetNamespaceByID( transaction_impl.go
533 > namespace.ID(request.UpdateWorkflowMutation.ExecutionInfo.NamespaceId),
534 > ); err == nil {
535 > emitMutationMetrics(
536 > shardContext,
537 > namespaceEntry,
538 > request.ArchetypeID,
539 > &resp.UpdateMutableStateStats,
540 > resp.NewMutableStateStats,
541 > )
542 >
543 > emitCompletionMetrics(
544 > shardContext,
545 > namespaceEntry,
546 > mutationToCompletionMetric(
547 > namespaceState(shardContext.GetClusterMetadata(), &updateWorkflowFailoverVersion),
548 > &request.UpdateWorkflowMutation,
549 > request.UpdateWorkflowEvents,
550 > isWorkflow,
551 > ),
552 > snapshotToCompletionMetric(
553 > namespaceState(shardContext.GetClusterMetadata(), newWorkflowFailoverVersion),
554 > request.NewWorkflowSnapshot,
555 > request.NewWorkflowEvents,
556 > isWorkflow,
557 > ),
558 > )
559 > }
560
561 > return resp, nil transaction_impl.go
562 }
563
667 }
668
669 > executionInfo := workflowMutation.ExecutionInfo transaction_impl.go
670 > executionState := workflowMutation.ExecutionState
671 >
672 > namespaceID := executionInfo.NamespaceId
673 > workflowID := executionInfo.WorkflowId
674 > runID := executionState.RunId
675 > workflowState := executionState.State
676 > workflowStatus := executionState.Status
677 > lastFirstEventID := executionInfo.LastFirstEventId
678 > lastFirstEventTxnID := executionInfo.LastFirstEventTxnId
679 > lastWorkflowTaskStartEventID := executionInfo.LastCompletedWorkflowTaskStartedEventId
680 > nextEventID := workflowMutation.NextEventID
681 >
682 > engine.NotifyNewHistoryEvent(events.NewNotification(
683 > namespaceID,
684 > &commonpb.WorkflowExecution{
685 > WorkflowId: workflowID,
686 > RunId: runID,
687 > },
688 > lastFirstEventID,
689 > lastFirstEventTxnID,
690 > nextEventID,
691 > lastWorkflowTaskStartEventID,
692 > workflowState,
693 > workflowStatus,
694 > executionInfo.VersionHistories,
695 > executionInfo.TransitionHistory,
696 > ))
697 > return nil
698 }
699
779 }
780
781 > return completionMetric{ transaction_impl.go
782 > shouldRecord: wroteEvents(eventsSeq),
783 > isWorkflow: isWorkflow,
784 > taskQueue: workflowMutation.ExecutionInfo.TaskQueue,
785 > namespaceState: namespaceState,
786 > workflowTypeName: workflowMutation.ExecutionInfo.WorkflowTypeName,
787 > status: workflowMutation.ExecutionState.Status,
788 > startTime: workflowMutation.ExecutionState.StartTime,
789 > closeTime: workflowMutation.ExecutionInfo.CloseTime,
790 > }
791 }
792