transaction_mock.go ×3

Frontier kind: Code frontier

unlabeled · c_df174229df16

3 tests · 4182 LOC · 191 files · introduces 0 tests · 23 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
5 ranges23 lines · 2 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
605 ranges4182 lines · 191 files · Browse complete extent
All tests (intent)
3 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.

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

go.temporal.io/server/service/history/workflow/transaction_mock.go 15 introduced LOC · 3 ranges

Open complete file

39
40 // EXPECT returns an object that allows the caller to indicate expected use.
41 > func (m *MockTransaction) EXPECT() *MockTransactionMockRecorder { transaction_mock.go
42 > return m.recorder
43 > }
44
45 // ConflictResolveWorkflowExecution mocks base method.
90
91 // UpdateWorkflowExecution mocks base method.
92 > func (m *MockTransaction) UpdateWorkflowExecution(ctx context.Context, updateMode persistence.UpdateWorkflowMode, archetypeID chasm.ArchetypeID, currentWorkflowFailoverVersion int64, currentWorkflowMutation *persistence.WorkflowMutation, currentWorkflowEventsSeq []*persistence.WorkflowEvents, newWorkflowFailoverVersion *int64, newWorkflowSnapshot *persistence.WorkflowSnapshot, newWorkflowEventsSeq []*persistence.WorkflowEvents, isWorkflow bool) (int64, int64, error) { transaction_mock.go
93 > m.ctrl.T.Helper()
94 > ret := m.ctrl.Call(m, "UpdateWorkflowExecution", ctx, updateMode, archetypeID, currentWorkflowFailoverVersion, currentWorkflowMutation, currentWorkflowEventsSeq, newWorkflowFailoverVersion, newWorkflowSnapshot, newWorkflowEventsSeq, isWorkflow)
95 > ret0, _ := ret[0].(int64)
96 > ret1, _ := ret[1].(int64)
97 > ret2, _ := ret[2].(error)
98 > return ret0, ret1, ret2
99 > }
100
101 // UpdateWorkflowExecution indicates an expected call of UpdateWorkflowExecution.
102 > func (mr *MockTransactionMockRecorder) UpdateWorkflowExecution(ctx, updateMode, archetypeID, currentWorkflowFailoverVersion, currentWorkflowMutation, currentWorkflowEventsSeq, newWorkflowFailoverVersion, newWorkflowSnapshot, newWorkflowEventsSeq, isWorkflow any) *gomock.Call { transaction_mock.go
103 > mr.mock.ctrl.T.Helper()
104 > return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateWorkflowExecution", reflect.TypeOf((*MockTransaction)(nil).UpdateWorkflowExecution), ctx, updateMode, archetypeID, currentWorkflowFailoverVersion, currentWorkflowMutation, currentWorkflowEventsSeq, newWorkflowFailoverVersion, newWorkflowSnapshot, newWorkflowEventsSeq, isWorkflow)
105 > }
go.temporal.io/server/service/history/ndc/workflow_resetter.go 8 introduced LOC · 2 ranges

Open complete file

368 currentWorkflowEventsSeq []*persistence.WorkflowEvents,
369 resetWorkflow Workflow,
370 > ) error { workflow_resetter.go
371 > resetWorkflowSnapshot, resetWorkflowEventsSeq, err := resetWorkflow.GetMutableState().CloseTransactionAsSnapshot(
372 > ctx,
373 > historyi.TransactionPolicyActive,
374 > )
375 > if err != nil {
376 return err
377 }
378
379 > currentExecutionMissing := currentWorkflow == nil workflow_resetter.go
380 > if currentExecutionMissing {
381 // There is no current_executions row (the current run was deleted), so the base->reset link
382 // and the new current run cannot be committed atomically: re-establishing a missing current