execution_mutable_state.go ×10

Frontier kind: Code frontier

unlabeled · c_fe8ef140a1af

281 tests · 4041 LOC · 166 files · introduces 0 tests · 58 LOC · 4 files

Introduces — evidence that enters the hierarchy at this concept

Code
15 ranges58 lines · 4 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
754 ranges4041 lines · 166 files · Browse complete extent
All tests (intent)
281 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.

4 files ranked by introduced lines: 58 introduced LOC across 15 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/common/persistence/tests/execution_mutable_state.go 32 introduced LOC · 10 ranges

Open complete file

2769 snapshot *p.WorkflowSnapshot,
2770 mutations ...*p.WorkflowMutation,
2771 > ) (*persistencespb.WorkflowMutableState, int64) { execution_mutable_state.go
2772 > mutableState := &persistencespb.WorkflowMutableState{
2773 > ExecutionInfo: snapshot.ExecutionInfo,
2774 > ExecutionState: snapshot.ExecutionState,
2775 > NextEventId: snapshot.NextEventID,
2776 > ActivityInfos: snapshot.ActivityInfos,
2777 > TimerInfos: snapshot.TimerInfos,
2778 > ChildExecutionInfos: snapshot.ChildExecutionInfos,
2779 > RequestCancelInfos: snapshot.RequestCancelInfos,
2780 > SignalInfos: snapshot.SignalInfos,
2781 > SignalRequestedIds: convert.StringSetToSlice(snapshot.SignalRequestedIDs),
2782 > ChasmNodes: snapshot.ChasmNodes,
2783 > }
2784 > dbRecordVersion := snapshot.DBRecordVersion
2785 >
2786 > for _, mutation := range mutations {
2787 s.Equal(dbRecordVersion, mutation.DBRecordVersion-1)
2788 dbRecordVersion = mutation.DBRecordVersion
2846
2847 // need to serialize & deserialize to get rid of timezone information ...
2848 > bytes, err := proto.Marshal(mutableState) execution_mutable_state.go
2849 > s.NoError(err)
2850 > mutableState = &persistencespb.WorkflowMutableState{}
2851 > err = proto.Unmarshal(bytes, mutableState)
2852 > s.NoError(err)
2853 >
2854 > // make equal test easier
2855 > if mutableState.ActivityInfos == nil {
2856 mutableState.ActivityInfos = make(map[int64]*persistencespb.ActivityInfo)
2857 }
2858 > if mutableState.TimerInfos == nil { execution_mutable_state.go
2859 mutableState.TimerInfos = make(map[string]*persistencespb.TimerInfo)
2860 }
2861 > if mutableState.ChildExecutionInfos == nil { execution_mutable_state.go
2862 mutableState.ChildExecutionInfos = make(map[int64]*persistencespb.ChildExecutionInfo)
2863 }
2864 > if mutableState.RequestCancelInfos == nil { execution_mutable_state.go
2865 mutableState.RequestCancelInfos = make(map[int64]*persistencespb.RequestCancelInfo)
2866 }
2867 > if mutableState.SignalInfos == nil { execution_mutable_state.go
2868 mutableState.SignalInfos = make(map[int64]*persistencespb.SignalInfo)
2869 }
2870 > if mutableState.SignalRequestedIds == nil { execution_mutable_state.go
2871 mutableState.SignalRequestedIds = make([]string, 0)
2872 }
2873 > if mutableState.BufferedEvents == nil { execution_mutable_state.go
2874 mutableState.BufferedEvents = make([]*historypb.HistoryEvent, 0)
2875 }
2876 > if mutableState.ChasmNodes == nil { execution_mutable_state.go
2877 mutableState.ChasmNodes = make(map[string]*persistencespb.ChasmNode)
2878 }
2879
2880 > return mutableState, dbRecordVersion execution_mutable_state.go
2881 }
go.temporal.io/server/api/persistence/v1/executions.pb.go 15 introduced LOC · 3 ranges

Open complete file

1202 mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[2]
1203 if x != nil {
1204 > ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) executions.pb.go
1205 > if ms.LoadMessageInfo() == nil {
1206 > ms.StoreMessageInfo(mi)
1207 > }
1208 > return ms
1209 }
1210 return mi.MessageOf(x)
1271 mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[3]
1272 if x != nil {
1273 > ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) executions.pb.go
1274 > if ms.LoadMessageInfo() == nil {
1275 > ms.StoreMessageInfo(mi)
1276 > }
1277 > return ms
1278 }
1279 return mi.MessageOf(x)
1336 mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[4]
1337 if x != nil {
1338 > ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) executions.pb.go
1339 > if ms.LoadMessageInfo() == nil {
1340 > ms.StoreMessageInfo(mi)
1341 > }
1342 > return ms
1343 }
1344 return mi.MessageOf(x)
go.temporal.io/server/api/persistence/v1/workflow_mutable_state.pb.go 6 introduced LOC · 1 range

Open complete file

42 }
43
44 > func (x *WorkflowMutableState) Reset() { workflow_mutable_state.pb.go
45 > *x = WorkflowMutableState{}
46 > mi := &file_temporal_server_api_persistence_v1_workflow_mutable_state_proto_msgTypes[0]
47 > ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
48 > ms.StoreMessageInfo(mi)
49 > }
50
51 func (x *WorkflowMutableState) String() string {
go.temporal.io/server/api/workflow/v1/message.pb.go 5 introduced LOC · 1 range

Open complete file

192 mi := &file_temporal_server_api_workflow_v1_message_proto_msgTypes[2]
193 if x != nil {
194 > ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) message.pb.go
195 > if ms.LoadMessageInfo() == nil {
196 > ms.StoreMessageInfo(mi)
197 > }
198 > return ms
199 }
200 return mi.MessageOf(x)