execution_state_map.go ×8

Frontier kind: Code frontier

unlabeled · c_0a58a5358213

258 tests · 4403 LOC · 172 files · introduces 0 tests · 90 LOC · 4 files

Introduces — evidence that enters the hierarchy at this concept

Code
14 ranges90 lines · 4 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
822 ranges4403 lines · 172 files · Browse complete extent
All tests (intent)
258 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: 90 introduced LOC across 14 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/common/persistence/sql/execution_state_map.go 69 introduced LOC · 8 ranges

Open complete file

117
118 if len(timerInfos) > 0 {
119 > rows := make([]sqlplugin.TimerInfoMapsRow, 0, len(timerInfos)) execution_state_map.go
120 > for timerID, blob := range timerInfos {
121 > rows = append(rows, sqlplugin.TimerInfoMapsRow{
122 > ShardID: shardID,
123 > NamespaceID: namespaceID,
124 > WorkflowID: workflowID,
125 > RunID: runID,
126 > TimerID: timerID,
127 > Data: blob.Data,
128 > DataEncoding: blob.EncodingType.String(),
129 > })
130 > }
131 > if _, err := tx.ReplaceIntoTimerInfoMaps(ctx, rows); err != nil {
132 return serviceerror.NewUnavailablef("Failed to update timer info. Failed to execute update query. Error: %v", err)
133 }
206
207 if len(childExecutionInfos) > 0 {
208 > rows := make([]sqlplugin.ChildExecutionInfoMapsRow, 0, len(childExecutionInfos)) execution_state_map.go
209 > for initiatedID, blob := range childExecutionInfos {
210 > rows = append(rows, sqlplugin.ChildExecutionInfoMapsRow{
211 > ShardID: shardID,
212 > NamespaceID: namespaceID,
213 > WorkflowID: workflowID,
214 > RunID: runID,
215 > InitiatedID: initiatedID,
216 > Data: blob.Data,
217 > DataEncoding: blob.EncodingType.String(),
218 > })
219 > }
220 > if _, err := tx.ReplaceIntoChildExecutionInfoMaps(ctx, rows); err != nil {
221 return serviceerror.NewUnavailablef("Failed to update child execution info. Failed to execute update query. Error: %v", err)
222 }
296
297 if len(requestCancelInfos) > 0 {
298 > rows := make([]sqlplugin.RequestCancelInfoMapsRow, 0, len(requestCancelInfos)) execution_state_map.go
299 > for initiatedID, blob := range requestCancelInfos {
300 > rows = append(rows, sqlplugin.RequestCancelInfoMapsRow{
301 > ShardID: shardID,
302 > NamespaceID: namespaceID,
303 > WorkflowID: workflowID,
304 > RunID: runID,
305 > InitiatedID: initiatedID,
306 > Data: blob.Data,
307 > DataEncoding: blob.EncodingType.String(),
308 > })
309 > }
310
311 > if _, err := tx.ReplaceIntoRequestCancelInfoMaps(ctx, rows); err != nil { execution_state_map.go
312 return serviceerror.NewUnavailablef("Failed to update request cancel info. Failed to execute update query. Error: %v", err)
313 }
387
388 if len(signalInfos) > 0 {
389 > rows := make([]sqlplugin.SignalInfoMapsRow, 0, len(signalInfos)) execution_state_map.go
390 > for initiatedId, blob := range signalInfos {
391 > rows = append(rows, sqlplugin.SignalInfoMapsRow{
392 > ShardID: shardID,
393 > NamespaceID: namespaceID,
394 > WorkflowID: workflowID,
395 > RunID: runID,
396 > InitiatedID: initiatedId,
397 > Data: blob.Data,
398 > DataEncoding: blob.EncodingType.String(),
399 > })
400 > }
401
402 > if _, err := tx.ReplaceIntoSignalInfoMaps(ctx, rows); err != nil { execution_state_map.go
403 return serviceerror.NewUnavailablef("Failed to update signal info. Failed to execute update query. Error: %v", err)
404 }
477 ) error {
478 if len(chasmNodes) > 0 {
479 > rows := make([]sqlplugin.ChasmNodeMapsRow, 0, len(chasmNodes)) execution_state_map.go
480 > for path, node := range chasmNodes {
481 > row := sqlplugin.ChasmNodeMapsRow{
482 > ShardID: shardID,
483 > NamespaceID: namespaceID,
484 > WorkflowID: workflowID,
485 > RunID: runID,
486 > ChasmPath: path,
487 > Metadata: node.Metadata.Data,
488 > MetadataEncoding: node.Metadata.EncodingType.String(),
489 > }
490 > if node.Data != nil {
491 > row.Data = node.Data.Data
492 > row.DataEncoding = node.Data.EncodingType.String()
493 > }
494 > rows = append(rows, row)
495 }
496 > if _, err := tx.ReplaceIntoChasmNodeMaps(ctx, rows); err != nil { execution_state_map.go
497 return serviceerror.NewUnavailablef("Failed to update CHASM nodes. Failed to execute update query. Error: %v", err)
498 }
go.temporal.io/server/common/persistence/sql/execution_state_non_map.go 11 introduced LOC · 1 range

Open complete file

25
26 if len(signalRequestedIDs) > 0 {
27 > rows := make([]sqlplugin.SignalsRequestedSetsRow, 0, len(signalRequestedIDs)) execution_state_non_map.go
28 > for signalRequestedID := range signalRequestedIDs {
29 > rows = append(rows, sqlplugin.SignalsRequestedSetsRow{
30 > ShardID: shardID,
31 > NamespaceID: namespaceID,
32 > WorkflowID: workflowID,
33 > RunID: runID,
34 > SignalID: signalRequestedID,
35 > })
36 > }
37 > if _, err := tx.ReplaceIntoSignalsRequestedSets(ctx, rows); err != nil {
38 return serviceerror.NewUnavailablef("Failed to update signals requested. Failed to execute update query. Error: %v", err)
39 }
go.temporal.io/server/common/persistence/sql/execution_util.go 8 introduced LOC · 4 ranges

Open complete file

798
799 if len(transferTasks) == 0 {
800 > return nil execution_util.go
801 > }
802
803 transferTasksRows := make([]sqlplugin.TransferTasksRow, 0, len(transferTasks))
835
836 if len(timerTasks) == 0 {
837 > return nil execution_util.go
838 > }
839
840 timerTasksRows := make([]sqlplugin.TimerTasksRow, 0, len(timerTasks))
872
873 if len(replicationTasks) == 0 {
874 > return nil execution_util.go
875 > }
876
877 replicationTasksRows := make([]sqlplugin.ReplicationTasksRow, 0, len(replicationTasks))
909
910 if len(visibilityTasks) == 0 {
911 > return nil execution_util.go
912 > }
913
914 visibilityTasksRows := make([]sqlplugin.VisibilityTasksRow, 0, len(visibilityTasks))
go.temporal.io/server/common/persistence/sql/execution.go 2 introduced LOC · 1 range

Open complete file

747 func getStartTimeFromState(state *persistencespb.WorkflowExecutionState) *time.Time {
748 if state == nil || state.StartTime == nil {
749 > return nil execution.go
750 > }
751 startTime := state.StartTime.AsTime()
752 return &startTime