context_impl.go ×6

Frontier kind: Code frontier

unlabeled · c_5f5a661f074f

9 tests · 4179 LOC · 178 files · introduces 0 tests · 35 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
8 ranges35 lines · 2 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
664 ranges4179 lines · 178 files · Browse complete extent
All tests (intent)
9 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: 35 introduced LOC across 8 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/service/history/shard/context_impl.go 25 introduced LOC · 6 ranges

Open complete file

823 ctx context.Context,
824 request *persistence.AddHistoryTasksRequest,
825 > ) error { context_impl.go
826 >
827 > // do not try to get namespace cache within shard lock
828 > namespaceID := namespace.ID(request.NamespaceID)
829 > namespaceEntry, err := s.GetNamespaceRegistry().GetNamespaceByID(namespaceID)
830 > if err != nil {
831 return err
832 }
833
834 > s.wLock() context_impl.go
835 >
836 > // timeout check should be done within the shard lock, in case of shard lock contention
837 > ctx, cancel, err := s.newDetachedContext(ctx)
838 > if err != nil {
839 s.wUnlock()
840 return err
841 }
842 > defer cancel() context_impl.go
843 >
844 > if err := s.errorByState(); err != nil {
845 s.wUnlock()
846 return err
847 }
848 > if err := s.errorByNamespaceStateLocked(namespaceEntry.Name(), request.WorkflowID); err != nil { context_impl.go
849 s.wUnlock()
850 return err
851 }
852
853 > requestCompletionFn, err := s.taskKeyManager.setAndTrackTaskKeys( context_impl.go
854 > request.Tasks,
855 > )
856 > if err != nil {
857 s.wUnlock()
858 return err
859 }
860
861 > request.RangeID = s.getRangeIDLocked() context_impl.go
862 > s.wUnlock()
863 >
864 > err = s.executionManager.AddHistoryTasks(ctx, request)
865 > requestCompletionFn(err)
866 > return s.handleWriteError(request.RangeID, err)
867 }
868
go.temporal.io/server/common/persistence/data_interfaces_mock.go 10 introduced LOC · 2 ranges

Open complete file

172
173 // AddHistoryTasks mocks base method.
174 > func (m *MockExecutionManager) AddHistoryTasks(ctx context.Context, request *AddHistoryTasksRequest) error { data_interfaces_mock.go
175 > m.ctrl.T.Helper()
176 > ret := m.ctrl.Call(m, "AddHistoryTasks", ctx, request)
177 > ret0, _ := ret[0].(error)
178 > return ret0
179 > }
180
181 // AddHistoryTasks indicates an expected call of AddHistoryTasks.
182 > func (mr *MockExecutionManagerMockRecorder) AddHistoryTasks(ctx, request any) *gomock.Call { data_interfaces_mock.go
183 > mr.mock.ctrl.T.Helper()
184 > return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddHistoryTasks", reflect.TypeOf((*MockExecutionManager)(nil).AddHistoryTasks), ctx, request)
185 > }
186
187 // AppendHistoryNodes mocks base method.