workflow_resetter.go ×7

Frontier kind: Code frontier

unlabeled · c_575c244e44b5

3 tests · 2789 LOC · 140 files · introduces 0 tests · 29 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
8 ranges29 lines · 2 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
424 ranges2789 lines · 140 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: 29 introduced LOC across 8 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/service/history/ndc/workflow_resetter.go 22 introduced LOC · 7 ranges

Open complete file

969 continue
970 }
971 > attr := event.GetWorkflowExecutionUpdateAdmittedEventAttributes() workflow_resetter.go
972 > // targetBranchUpdateRegistry is a nil in a Reset case, and not nil in a conflict resolution case.
973 > // If the Update with the same UpdateId is already present in the target branch (Find returns non-nil),
974 > // it is skipped and not reapplied.
975 > if targetBranchUpdateRegistry != nil && targetBranchUpdateRegistry.Find(ctx, attr.Request.Meta.UpdateId) != nil {
976 continue
977 }
978 > if _, err := mutableState.AddWorkflowExecutionUpdateAdmittedEvent( workflow_resetter.go
979 > attr.GetRequest(),
980 > attr.Origin,
981 > ); err != nil {
982 return reappliedEvents, err
983 }
984 > reappliedEvents = append(reappliedEvents, event) workflow_resetter.go
985 case enumspb.EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_ACCEPTED:
986 if excludeUpdate || isDuplicate(event) {
987 continue
988 }
989 > attr := event.GetWorkflowExecutionUpdateAcceptedEventAttributes() workflow_resetter.go
990 > // targetBranchUpdateRegistry is a nil in a Reset case, and not nil in a conflict resolution case.
991 > // If the Update with the same UpdateId is already present in the target branch (Find returns non-nil),
992 > // it is skipped and not reapplied.
993 > if targetBranchUpdateRegistry != nil && targetBranchUpdateRegistry.Find(ctx, attr.ProtocolInstanceId) != nil {
994 continue
995 }
996 > request := attr.GetAcceptedRequest() workflow_resetter.go
997 > if request == nil {
998 // An UpdateAccepted event lacks a request payload if and only if it is preceded by an UpdateAdmitted
999 // event (these always have the payload). If an UpdateAccepted event has no preceding UpdateAdmitted
1002 continue
1003 }
1004 > if _, err := mutableState.AddWorkflowExecutionUpdateAdmittedEvent( workflow_resetter.go
1005 > request,
1006 > enumspb.UPDATE_ADMITTED_EVENT_ORIGIN_REAPPLY,
1007 > ); err != nil {
1008 return reappliedEvents, err
1009 }
1010 > reappliedEvents = append(reappliedEvents, event) workflow_resetter.go
1011 case enumspb.EVENT_TYPE_WORKFLOW_EXECUTION_CANCEL_REQUESTED:
1012 if isReset || isDuplicate(event) {
go.temporal.io/server/service/history/interfaces/mutable_state_mock.go 7 introduced LOC · 1 range

Open complete file

829
830 // AddWorkflowExecutionUpdateAdmittedEvent mocks base method.
831 > func (m *MockMutableState) AddWorkflowExecutionUpdateAdmittedEvent(request *update.Request, origin enums.UpdateAdmittedEventOrigin) (*history.HistoryEvent, error) { mutable_state_mock.go
832 > m.ctrl.T.Helper()
833 > ret := m.ctrl.Call(m, "AddWorkflowExecutionUpdateAdmittedEvent", request, origin)
834 > ret0, _ := ret[0].(*history.HistoryEvent)
835 > ret1, _ := ret[1].(error)
836 > return ret0, ret1
837 > }
838
839 // AddWorkflowExecutionUpdateAdmittedEvent indicates an expected call of AddWorkflowExecutionUpdateAdmittedEvent.