execution_manager.go ×14

Frontier kind: Code frontier

unlabeled · c_9f08f6ad4795

280 tests · 4273 LOC · 166 files · introduces 0 tests · 99 LOC · 5 files

Introduces — evidence that enters the hierarchy at this concept

Code
26 ranges99 lines · 5 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
798 ranges4273 lines · 166 files · Browse complete extent
All tests (intent)
280 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.

5 files ranked by introduced lines: 99 introduced LOC across 26 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/api/persistence/v1/executions.pb.go 29 introduced LOC · 5 ranges

Open complete file

3297 }
3298
3299 > func (x *TimerInfo) Reset() { executions.pb.go
3300 > *x = TimerInfo{}
3301 > mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[18]
3302 > ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
3303 > ms.StoreMessageInfo(mi)
3304 > }
3305
3306 func (x *TimerInfo) String() string {
3390 }
3391
3392 > func (x *ChildExecutionInfo) Reset() { executions.pb.go
3393 > *x = ChildExecutionInfo{}
3394 > mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[19]
3395 > ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
3396 > ms.StoreMessageInfo(mi)
3397 > }
3398
3399 func (x *ChildExecutionInfo) String() string {
3530 }
3531
3532 > func (x *RequestCancelInfo) Reset() { executions.pb.go
3533 > *x = RequestCancelInfo{}
3534 > mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[20]
3535 > ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
3536 > ms.StoreMessageInfo(mi)
3537 > }
3538
3539 func (x *RequestCancelInfo) String() string {
3607 }
3608
3609 > func (x *SignalInfo) Reset() { executions.pb.go
3610 > *x = SignalInfo{}
3611 > mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[21]
3612 > ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
3613 > ms.StoreMessageInfo(mi)
3614 > }
3615
3616 func (x *SignalInfo) String() string {
4564 mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[40]
4565 if x != nil {
4566 > ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) executions.pb.go
4567 > if ms.LoadMessageInfo() == nil {
4568 > ms.StoreMessageInfo(mi)
4569 > }
4570 > return ms
4571 }
4572 return mi.MessageOf(x)
go.temporal.io/server/common/persistence/tests/execution_mutable_state.go 26 introduced LOC · 1 range

Open complete file

2739 snapshot *p.WorkflowSnapshot,
2740 mutations ...*p.WorkflowMutation,
2742 > resp, err := s.ExecutionManager.GetWorkflowExecution(s.Ctx, &p.GetWorkflowExecutionRequest{
2743 > ShardID: s.ShardID,
2744 > NamespaceID: snapshot.ExecutionInfo.NamespaceId,
2745 > WorkflowID: snapshot.ExecutionInfo.WorkflowId,
2746 > RunID: snapshot.ExecutionState.RunId,
2747 > ArchetypeID: archetypeID,
2748 > })
2749 > s.NoError(err)
2750 >
2751 > actualMutableState := resp.State
2752 > actualDBRecordVersion := resp.DBRecordVersion
2753 >
2754 > expectedMutableState, expectedDBRecordVersion := s.Accumulate(snapshot, mutations...)
2755 >
2756 > // need to special handling signal request IDs ...
2757 > // since ^ is slice
2758 > s.Equal(
2759 > convert.StringSliceToSet(expectedMutableState.SignalRequestedIds),
2760 > convert.StringSliceToSet(actualMutableState.SignalRequestedIds),
2761 > )
2762 > actualMutableState.SignalRequestedIds = expectedMutableState.SignalRequestedIds
2763 >
2764 > s.Equal(expectedDBRecordVersion, actualDBRecordVersion)
2765 > s.ProtoEqual(expectedMutableState, actualMutableState)
2766 > }
2767
2768 func (s *ExecutionMutableStateSuite) Accumulate(
go.temporal.io/server/common/persistence/execution_manager.go 22 introduced LOC · 14 ranges

Open complete file

1155 }
1156 for key, blob := range internState.ActivityInfos {
1157 > info, err := m.serializer.ActivityInfoFromBlob(blob) execution_manager.go
1158 > if err != nil {
1159 return nil, err
1160 }
1161 > state.ActivityInfos[key] = info execution_manager.go
1162 }
1163 for key, blob := range internState.TimerInfos {
1164 > info, err := m.serializer.TimerInfoFromBlob(blob) execution_manager.go
1165 > if err != nil {
1166 return nil, err
1167 }
1168 > state.TimerInfos[key] = info execution_manager.go
1169 }
1170 for key, blob := range internState.ChildExecutionInfos {
1171 > info, err := m.serializer.ChildExecutionInfoFromBlob(blob) execution_manager.go
1172 > if err != nil {
1173 return nil, err
1174 }
1175 > state.ChildExecutionInfos[key] = info execution_manager.go
1176 }
1177 for key, blob := range internState.RequestCancelInfos {
1178 > info, err := m.serializer.RequestCancelInfoFromBlob(blob) execution_manager.go
1179 > if err != nil {
1180 return nil, err
1181 }
1182 > state.RequestCancelInfos[key] = info execution_manager.go
1183 }
1184 for key, blob := range internState.SignalInfos {
1185 > info, err := m.serializer.SignalInfoFromBlob(blob) execution_manager.go
1186 > if err != nil {
1187 return nil, err
1188 }
1189 > state.SignalInfos[key] = info execution_manager.go
1190 }
1191 for key, internal := range internState.ChasmNodes {
1192 > var node *persistencespb.ChasmNode execution_manager.go
1193 > var err error
1194 >
1195 > if internal.CassandraBlob != nil {
1196 node, err = m.serializer.ChasmNodeFromBlob(internal.CassandraBlob)
1197 > } else { execution_manager.go
1198 node, err = m.serializer.ChasmNodeFromBlobs(internal.Metadata, internal.Data)
1199 }
1200 > if err != nil { execution_manager.go
1201 return nil, err
1202 }
1203
1204 > state.ChasmNodes[key] = node execution_manager.go
1205 }
1206 var err error
go.temporal.io/server/common/persistence/serialization/serializer.go 20 introduced LOC · 5 ranges

Open complete file

476 }
477
478 > func (t *serializerImpl) ActivityInfoFromBlob(data *commonpb.DataBlob) (*persistencespb.ActivityInfo, error) { serializer.go
479 > result := &persistencespb.ActivityInfo{}
480 > return result, Decode(data, result)
481 > }
482
483 func (t *serializerImpl) ChildExecutionInfoToBlob(info *persistencespb.ChildExecutionInfo) (*commonpb.DataBlob, error) {
485 }
486
487 > func (t *serializerImpl) ChildExecutionInfoFromBlob(data *commonpb.DataBlob) (*persistencespb.ChildExecutionInfo, error) { serializer.go
488 > result := &persistencespb.ChildExecutionInfo{}
489 > return result, Decode(data, result)
490 > }
491
492 func (t *serializerImpl) SignalInfoToBlob(info *persistencespb.SignalInfo) (*commonpb.DataBlob, error) {
494 }
495
496 > func (t *serializerImpl) SignalInfoFromBlob(data *commonpb.DataBlob) (*persistencespb.SignalInfo, error) { serializer.go
497 > result := &persistencespb.SignalInfo{}
498 > return result, Decode(data, result)
499 > }
500
501 func (t *serializerImpl) RequestCancelInfoToBlob(info *persistencespb.RequestCancelInfo) (*commonpb.DataBlob, error) {
503 }
504
505 > func (t *serializerImpl) RequestCancelInfoFromBlob(data *commonpb.DataBlob) (*persistencespb.RequestCancelInfo, error) { serializer.go
506 > result := &persistencespb.RequestCancelInfo{}
507 > return result, Decode(data, result)
508 > }
509
510 func (t *serializerImpl) TimerInfoToBlob(info *persistencespb.TimerInfo) (*commonpb.DataBlob, error) {
512 }
513
514 > func (t *serializerImpl) TimerInfoFromBlob(data *commonpb.DataBlob) (*persistencespb.TimerInfo, error) { serializer.go
515 > result := &persistencespb.TimerInfo{}
516 > return result, Decode(data, result)
517 > }
518
519 func (t *serializerImpl) TaskInfoToBlob(info *persistencespb.AllocatedTaskInfo) (*commonpb.DataBlob, error) {
go.temporal.io/server/common/persistence/size_util.go 2 introduced LOC · 1 range

Open complete file

67 size := 0
68 for _, str := range stringSlice {
69 > size += len(str) size_util.go
70 > }
71 return size
72 }