transaction_manager_new_workflow.go ×3

Frontier kind: Joint frontier

unlabeled · c_31e5f4697092

1 test · 2851 LOC · 139 files · introduces 1 test · 37 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
5 ranges37 lines · 2 files
Tests
1 test

Contains — complete concept membership

All code (extent)
429 ranges2851 lines · 139 files · Browse complete extent
All tests (intent)
1 testBrowse 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.

1 test introduced at this concept.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

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

go.temporal.io/server/service/history/ndc/transaction_manager_new_workflow.go 25 introduced LOC · 3 ranges

Open complete file

118 // target workflow is newer than current workflow
119 if !currentWorkflow.GetMutableState().IsWorkflowExecutionRunning() {
120 > // current workflow is completed transaction_manager_new_workflow.go
121 > // proceed to create workflow
122 > return r.executeTransaction(
123 > ctx,
124 > nDCTransactionPolicyCreateAsCurrent,
125 > currentWorkflow,
126 > targetWorkflow,
127 > )
128 > }
129
130 // current workflow is still running, need to suppress the current workflow
153 // target workflow to be created as current
154 if currentWorkflow != nil {
155 > // current workflow exists, need to do compare and swap transaction_manager_new_workflow.go
156 > createMode := persistence.CreateWorkflowModeUpdateCurrent
157 > prevRunID := currentWorkflow.GetMutableState().GetExecutionState().GetRunId()
158 > prevLastWriteVersion, _, err := currentWorkflow.GetVectorClock()
159 > if err != nil {
160 return err
161 }
162 > return targetWorkflow.GetContext().CreateWorkflowExecution( transaction_manager_new_workflow.go
163 > ctx,
164 > r.shardContext,
165 > createMode,
166 > prevRunID,
167 > prevLastWriteVersion,
168 > targetWorkflow.GetMutableState(),
169 > targetWorkflowSnapshot,
170 > targetWorkflowEventsSeq,
171 > historyi.TransactionPolicyPassive,
172 > )
173 }
174
go.temporal.io/server/service/history/ndc/workflow_mock.go 12 introduced LOC · 2 ranges

Open complete file

100
101 // GetVectorClock mocks base method.
102 > func (m *MockWorkflow) GetVectorClock() (int64, int64, error) { workflow_mock.go
103 > m.ctrl.T.Helper()
104 > ret := m.ctrl.Call(m, "GetVectorClock")
105 > ret0, _ := ret[0].(int64)
106 > ret1, _ := ret[1].(int64)
107 > ret2, _ := ret[2].(error)
108 > return ret0, ret1, ret2
109 > }
110
111 // GetVectorClock indicates an expected call of GetVectorClock.
112 > func (mr *MockWorkflowMockRecorder) GetVectorClock() *gomock.Call { workflow_mock.go
113 > mr.mock.ctrl.T.Helper()
114 > return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetVectorClock", reflect.TypeOf((*MockWorkflow)(nil).GetVectorClock))
115 > }
116
117 // HappensAfter mocks base method.