util.go ×17

Frontier kind: Code frontier

unlabeled · c_804e5602da65

17 tests · 5007 LOC · 186 files · introduces 0 tests · 177 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
17 ranges177 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
933 ranges5007 lines · 186 files · Browse complete extent
All tests (intent)
17 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: 177 introduced LOC across 17 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/common/persistence/cassandra/util.go 177 introduced LOC · 17 ranges

Open complete file

15 shardID int32,
16 workflowMutation *p.InternalWorkflowMutation,
17 > ) error { util.go
18 >
19 > // TODO update all call sites to update LastUpdatetime
20 > // cqlNowTimestampMillis := p.UnixMilliseconds(time.Now().UTC())
21 >
22 > namespaceID := workflowMutation.NamespaceID
23 > workflowID := workflowMutation.WorkflowID
24 > runID := workflowMutation.RunID
25 >
26 > if err := updateExecution(
27 > batch,
28 > shardID,
29 > namespaceID,
30 > workflowID,
31 > runID,
32 > workflowMutation.ExecutionInfoBlob,
33 > workflowMutation.ExecutionState,
34 > workflowMutation.ExecutionStateBlob,
35 > workflowMutation.NextEventID,
36 > workflowMutation.Condition,
37 > workflowMutation.DBRecordVersion,
38 > workflowMutation.Checksum,
39 > ); err != nil {
40 return err
41 }
42
43 > if err := updateActivityInfos( util.go
44 > batch,
45 > workflowMutation.UpsertActivityInfos,
46 > workflowMutation.DeleteActivityInfos,
47 > shardID,
48 > namespaceID,
49 > workflowID,
50 > runID,
51 > ); err != nil {
52 return err
53 }
54
55 > if err := updateTimerInfos( util.go
56 > batch,
57 > workflowMutation.UpsertTimerInfos,
58 > workflowMutation.DeleteTimerInfos,
59 > shardID,
60 > namespaceID,
61 > workflowID,
62 > runID,
63 > ); err != nil {
64 return err
65 }
66
67 > if err := updateChildExecutionInfos( util.go
68 > batch,
69 > workflowMutation.UpsertChildExecutionInfos,
70 > workflowMutation.DeleteChildExecutionInfos,
71 > shardID,
72 > namespaceID,
73 > workflowID,
74 > runID,
75 > ); err != nil {
76 return err
77 }
78
79 > if err := updateRequestCancelInfos( util.go
80 > batch,
81 > workflowMutation.UpsertRequestCancelInfos,
82 > workflowMutation.DeleteRequestCancelInfos,
83 > shardID,
84 > namespaceID,
85 > workflowID,
86 > runID,
87 > ); err != nil {
88 return err
89 }
90
91 > if err := updateSignalInfos( util.go
92 > batch,
93 > workflowMutation.UpsertSignalInfos,
94 > workflowMutation.DeleteSignalInfos,
95 > shardID,
96 > namespaceID,
97 > workflowID,
98 > runID,
99 > ); err != nil {
100 return err
101 }
102
103 > if err := updateChasmNodes( util.go
104 > batch,
105 > workflowMutation.UpsertChasmNodes,
106 > workflowMutation.DeleteChasmNodes,
107 > shardID,
108 > namespaceID,
109 > workflowID,
110 > runID,
111 > ); err != nil {
112 return err
113 }
114
115 > updateSignalsRequested( util.go
116 > batch,
117 > workflowMutation.UpsertSignalRequestedIDs,
118 > workflowMutation.DeleteSignalRequestedIDs,
119 > shardID,
120 > namespaceID,
121 > workflowID,
122 > runID,
123 > )
124 >
125 > updateBufferedEvents(
126 > batch,
127 > workflowMutation.NewBufferedEvents,
128 > workflowMutation.ClearBufferedEvents,
129 > shardID,
130 > namespaceID,
131 > workflowID,
132 > runID,
133 > )
134 >
135 > // transfer / replication / timer tasks
136 > return applyTasks(
137 > batch,
138 > shardID,
139 > workflowMutation.Tasks,
140 > )
141 }
142
633
634 for deleteID := range deleteIDs {
635 > batch.Query(templateDeleteActivityInfoQuery, util.go
636 > deleteID,
637 > shardID,
638 > rowTypeExecution,
639 > namespaceID,
640 > workflowID,
641 > runID,
642 > defaultVisibilityTimestamp,
643 > rowTypeExecutionTaskID)
644 > }
645 return nil
646 }
715
716 for deleteInfoID := range deleteInfos {
717 > batch.Query(templateDeleteTimerInfoQuery, util.go
718 > deleteInfoID,
719 > shardID,
720 > rowTypeExecution,
721 > namespaceID,
722 > workflowID,
723 > runID,
724 > defaultVisibilityTimestamp,
725 > rowTypeExecutionTaskID)
726 > }
727
728 return nil
781
782 for deleteID := range deleteIDs {
783 > batch.Query(templateDeleteChildExecutionInfoQuery, util.go
784 > deleteID,
785 > shardID,
786 > rowTypeExecution,
787 > namespaceID,
788 > workflowID,
789 > runID,
790 > defaultVisibilityTimestamp,
791 > rowTypeExecutionTaskID)
792 > }
793 return nil
794 }
846
847 for deleteID := range deleteIDs {
848 > batch.Query(templateDeleteRequestCancelInfoQuery, util.go
849 > deleteID,
850 > shardID,
851 > rowTypeExecution,
852 > namespaceID,
853 > workflowID,
854 > runID,
855 > defaultVisibilityTimestamp,
856 > rowTypeExecutionTaskID)
857 > }
858 return nil
859 }
911
912 for deleteID := range deleteIDs {
913 > batch.Query(templateDeleteSignalInfoQuery, util.go
914 > deleteID,
915 > shardID,
916 > rowTypeExecution,
917 > namespaceID,
918 > workflowID,
919 > runID,
920 > defaultVisibilityTimestamp,
921 > rowTypeExecutionTaskID)
922 > }
923 return nil
924 }
990 ) error {
991 for deletePath := range deleteNodes {
992 > batch.Query(templateDeleteChasmNodeQuery, util.go
993 > deletePath,
994 > shardID,
995 > rowTypeExecution,
996 > namespaceID,
997 > workflowID,
998 > runID,
999 > defaultVisibilityTimestamp,
1000 > rowTypeExecutionTaskID)
1001 > }
1002
1003 for upsertPath, node := range upsertNodes {
1041
1042 if len(deleteSignalReqIDs) > 0 {
1043 > batch.Query(templateDeleteWorkflowExecutionSignalRequestedQuery, util.go
1044 > convert.StringSetToSlice(deleteSignalReqIDs),
1045 > shardID,
1046 > rowTypeExecution,
1047 > namespaceID,
1048 > workflowID,
1049 > runID,
1050 > defaultVisibilityTimestamp,
1051 > rowTypeExecutionTaskID)
1052 > }
1053 }
1054
1081 workflowID string,
1082 runID string,
1083 > ) { util.go
1084 >
1085 > if clearBufferedEvents {
1086 batch.Query(templateDeleteBufferedEventsQuery,
1087 shardID,
1092 defaultVisibilityTimestamp,
1093 rowTypeExecutionTaskID)
1094 > } else if newBufferedEvents != nil { util.go
1095 values := make(map[string]any)
1096 values["encoding_type"] = newBufferedEvents.EncodingType.String()