execution_manager.go ×15

Frontier kind: Code frontier

unlabeled · c_107b00bdf1bd

319 tests · 3285 LOC · 156 files · introduces 0 tests · 48 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
15 ranges48 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
561 ranges3285 lines · 156 files · Browse complete extent
All tests (intent)
319 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: 48 introduced LOC across 15 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/common/persistence/execution_manager.go 48 introduced LOC · 15 ranges

Open complete file

752 func (m *executionManagerImpl) SerializeWorkflowSnapshot( // unexport
753 input *WorkflowSnapshot,
754 > ) (*InternalWorkflowSnapshot, error) { execution_manager.go
755 > serializedTasks, err := serializeTasks(m.serializer, input.Tasks)
756 > if err != nil {
757 return nil, err
758 }
759
760 > result := &InternalWorkflowSnapshot{ execution_manager.go
761 > NamespaceID: input.ExecutionInfo.GetNamespaceId(),
762 > WorkflowID: input.ExecutionInfo.GetWorkflowId(),
763 > RunID: input.ExecutionState.GetRunId(),
764 >
765 > ActivityInfos: make(map[int64]*commonpb.DataBlob, len(input.ActivityInfos)),
766 > TimerInfos: make(map[string]*commonpb.DataBlob, len(input.TimerInfos)),
767 > ChildExecutionInfos: make(map[int64]*commonpb.DataBlob, len(input.ChildExecutionInfos)),
768 > RequestCancelInfos: make(map[int64]*commonpb.DataBlob, len(input.RequestCancelInfos)),
769 > SignalInfos: make(map[int64]*commonpb.DataBlob, len(input.SignalInfos)),
770 > ChasmNodes: make(map[string]InternalChasmNode, len(input.ChasmNodes)),
771 >
772 > ExecutionInfo: input.ExecutionInfo,
773 > ExecutionState: input.ExecutionState,
774 > SignalRequestedIDs: make(map[string]struct{}),
775 >
776 > Tasks: serializedTasks,
777 >
778 > Condition: input.Condition,
779 > DBRecordVersion: input.DBRecordVersion,
780 > NextEventID: input.NextEventID,
781 > }
782 >
783 > result.ExecutionInfoBlob, err = m.serializer.WorkflowExecutionInfoToBlob(input.ExecutionInfo)
784 > if err != nil {
785 return nil, err
786 }
787 > result.ExecutionStateBlob, err = m.serializer.WorkflowExecutionStateToBlob(input.ExecutionState) execution_manager.go
788 > if err != nil {
789 return nil, err
790 }
791 > result.LastWriteVersion, err = getCurrentBranchLastWriteVersion(input.ExecutionInfo.VersionHistories, input.ExecutionInfo.TransitionHistory) execution_manager.go
792 > if err != nil {
793 return nil, err
794 }
795
796 > for key, info := range input.ActivityInfos { execution_manager.go
797 blob, err := m.serializer.ActivityInfoToBlob(info)
798 if err != nil {
801 result.ActivityInfos[key] = blob
802 }
803 > for key, info := range input.TimerInfos { execution_manager.go
804 blob, err := m.serializer.TimerInfoToBlob(info)
805 if err != nil {
808 result.TimerInfos[key] = blob
809 }
810 > for key, info := range input.ChildExecutionInfos { execution_manager.go
811 blob, err := m.serializer.ChildExecutionInfoToBlob(info)
812 if err != nil {
815 result.ChildExecutionInfos[key] = blob
816 }
817 > for key, info := range input.RequestCancelInfos { execution_manager.go
818 blob, err := m.serializer.RequestCancelInfoToBlob(info)
819 if err != nil {
822 result.RequestCancelInfos[key] = blob
823 }
824 > for key, info := range input.SignalInfos { execution_manager.go
825 blob, err := m.serializer.SignalInfoToBlob(info)
826 if err != nil {
829 result.SignalInfos[key] = blob
830 }
831 > for key := range input.SignalRequestedIDs { execution_manager.go
832 result.SignalRequestedIDs[key] = struct{}{}
833 }
834 > nodeMap, err := m.makeInternalChasmNodeMap(input.ChasmNodes) execution_manager.go
835 > if err != nil {
836 return nil, err
837 }
838 > result.ChasmNodes = nodeMap execution_manager.go
839 >
840 > result.Checksum, err = m.serializer.ChecksumToBlob(input.Checksum)
841 > if err != nil {
842 return nil, err
843 }
844
845 > return result, nil execution_manager.go
846 }
847
1269 return common.EmptyVersion, nil
1270 }
1271 > versionHistory, err := versionhistory.GetCurrentVersionHistory(versionHistories) execution_manager.go
1272 > if err != nil {
1273 return 0, err
1274 }
1275
1276 > if !versionhistory.IsEmptyVersionHistory(versionHistory) { execution_manager.go
1277 versionHistoryItem, err := versionhistory.GetLastVersionHistoryItem(versionHistory)
1278 if err != nil {