execution_manager.go ×15

Frontier kind: Code frontier

unlabeled · c_baf4dac7403f

292 tests · 2174 LOC · 93 files · introduces 0 tests · 46 LOC · 3 files

Introduces — evidence that enters the hierarchy at this concept

Code
19 ranges46 lines · 3 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
385 ranges2174 lines · 93 files · Browse complete extent
All tests (intent)
292 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.

3 files ranked by introduced lines: 46 introduced LOC across 19 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

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

Open complete file

585 func (m *executionManagerImpl) DeserializeBufferedEvents( // unexport
586 blobs []*commonpb.DataBlob,
587 > ) ([]*historypb.HistoryEvent, error) { execution_manager.go
588 >
589 > events := make([]*historypb.HistoryEvent, 0)
590 > for _, b := range blobs {
591 if b == nil {
592 // Should not happen, log and discard to prevent callers from consuming
601 events = append(events, history...)
602 }
603 > return events, nil execution_manager.go
604 }
605
1142 }
1143
1144 > func (m *executionManagerImpl) toWorkflowMutableState(internState *InternalWorkflowMutableState) (*persistencespb.WorkflowMutableState, error) { execution_manager.go
1145 > state := &persistencespb.WorkflowMutableState{
1146 > ActivityInfos: make(map[int64]*persistencespb.ActivityInfo),
1147 > TimerInfos: make(map[string]*persistencespb.TimerInfo),
1148 > ChildExecutionInfos: make(map[int64]*persistencespb.ChildExecutionInfo),
1149 > RequestCancelInfos: make(map[int64]*persistencespb.RequestCancelInfo),
1150 > SignalInfos: make(map[int64]*persistencespb.SignalInfo),
1151 > ChasmNodes: make(map[string]*persistencespb.ChasmNode),
1152 > SignalRequestedIds: internState.SignalRequestedIDs,
1153 > NextEventId: internState.NextEventID,
1154 > BufferedEvents: make([]*historypb.HistoryEvent, len(internState.BufferedEvents)),
1155 > }
1156 > for key, blob := range internState.ActivityInfos {
1157 info, err := m.serializer.ActivityInfoFromBlob(blob)
1158 if err != nil {
1161 state.ActivityInfos[key] = info
1162 }
1163 > for key, blob := range internState.TimerInfos { execution_manager.go
1164 info, err := m.serializer.TimerInfoFromBlob(blob)
1165 if err != nil {
1168 state.TimerInfos[key] = info
1169 }
1170 > for key, blob := range internState.ChildExecutionInfos { execution_manager.go
1171 info, err := m.serializer.ChildExecutionInfoFromBlob(blob)
1172 if err != nil {
1175 state.ChildExecutionInfos[key] = info
1176 }
1177 > for key, blob := range internState.RequestCancelInfos { execution_manager.go
1178 info, err := m.serializer.RequestCancelInfoFromBlob(blob)
1179 if err != nil {
1182 state.RequestCancelInfos[key] = info
1183 }
1184 > for key, blob := range internState.SignalInfos { execution_manager.go
1185 info, err := m.serializer.SignalInfoFromBlob(blob)
1186 if err != nil {
1189 state.SignalInfos[key] = info
1190 }
1191 > for key, internal := range internState.ChasmNodes { execution_manager.go
1192 var node *persistencespb.ChasmNode
1193 var err error
1204 state.ChasmNodes[key] = node
1205 }
1206 > var err error execution_manager.go
1207 > state.ExecutionInfo, err = m.serializer.WorkflowExecutionInfoFromBlob(internState.ExecutionInfo)
1208 > if err != nil {
1209 return nil, err
1210 }
1211 > if state.ExecutionInfo.AutoResetPoints == nil { execution_manager.go
1212 // TODO: check if we need this?
1213 state.ExecutionInfo.AutoResetPoints = &workflowpb.ResetPoints{}
1214 }
1215 > state.ExecutionState, err = m.serializer.WorkflowExecutionStateFromBlob(internState.ExecutionState) execution_manager.go
1216 > if err != nil {
1217 return nil, err
1218 }
1219 > state.BufferedEvents, err = m.DeserializeBufferedEvents(internState.BufferedEvents) execution_manager.go
1220 > if err != nil {
1221 return nil, err
1222 }
1223 > if internState.Checksum != nil { execution_manager.go
1224 state.Checksum, err = m.serializer.ChecksumFromBlob(internState.Checksum)
1225 }
1226 > if err != nil { execution_manager.go
1227 return nil, err
1228 }
1229
1230 > return state, nil execution_manager.go
1231 }
1232
go.temporal.io/server/api/persistence/v1/executions.pb.go 6 introduced LOC · 1 range

Open complete file

380 }
381
382 > func (x *WorkflowExecutionInfo) Reset() { executions.pb.go
383 > *x = WorkflowExecutionInfo{}
384 > mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[1]
385 > ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
386 > ms.StoreMessageInfo(mi)
387 > }
388
389 func (x *WorkflowExecutionInfo) String() string {
go.temporal.io/server/common/persistence/serialization/serializer.go 6 introduced LOC · 3 ranges

Open complete file

437 }
438
439 > func (t *serializerImpl) WorkflowExecutionInfoFromBlob(data *commonpb.DataBlob) (*persistencespb.WorkflowExecutionInfo, error) { serializer.go
440 > result := &persistencespb.WorkflowExecutionInfo{}
441 > err := Decode(data, result)
442 > if err != nil {
443 return nil, err
444 }
445 // Proto serialization replaces empty maps with nils, ensure this map is never nil.
446 > if result.SubStateMachinesByType == nil { serializer.go
447 result.SubStateMachinesByType = make(map[string]*persistencespb.StateMachineMap)
448 }
449 > return result, nil serializer.go
450 }
451