service_grpc.pb.mock.go ×3

Frontier kind: Joint frontier

unlabeled · c_365dc2b54d5e

1 test · 2315 LOC · 92 files · introduces 1 test · 44 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
5 ranges44 lines · 2 files
Tests
1 test

Contains — complete concept membership

All code (extent)
385 ranges2315 lines · 92 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: 44 introduced LOC across 5 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/service/worker/deletenamespace/deleteexecutions/activities.go 31 introduced LOC · 2 ranges

Open complete file

221 metrics.DeleteExecutionsSuccessCount.With(a.metricsHandler.WithTags(metrics.NamespaceTag(params.Namespace.String()))).Record(1)
222
223 > case *serviceerror.NotFound: activities.go
224 > metrics.DeleteExecutionsNotFoundCount.With(a.metricsHandler.WithTags(metrics.NamespaceTag(params.Namespace.String()))).Record(1)
225 > logger.Info("Workflow execution exists in the visibility store but not in the main store.", tag.WorkflowID(execution.Execution.GetWorkflowId()), tag.WorkflowRunID(execution.Execution.GetRunId()))
226 > // The reasons why workflow execution doesn't exist in the main store, but exists in the visibility store might be:
227 > // 1. Someone else deleted the workflow execution after the last ListWorkflowExecutions call but before historyClient.DeleteWorkflowExecution call.
228 > // 2. Database is in inconsistent state: workflow execution was manually deleted from history store, but not from visibility store.
229 > // To avoid continuously getting this workflow execution from visibility store, it needs to be deleted directly from visibility store.
230 > s, e := a.deleteWorkflowExecutionFromVisibility(ctx, params.NamespaceID, params.Namespace, execution, logger)
231 > result.SuccessCount += s
232 > result.ErrorCount += e
233
234 default:
256 execution *workflowpb.WorkflowExecutionInfo,
257 logger log.Logger,
258 > ) (successCount int, errorCount int) { activities.go
259 >
260 > logger = log.With(logger, tag.WorkflowID(execution.Execution.GetWorkflowId()), tag.WorkflowRunID(execution.Execution.GetRunId()))
261 >
262 > logger.Info("Deleting workflow execution from visibility.")
263 > _, err := a.historyClient.DeleteWorkflowVisibilityRecord(ctx, &historyservice.DeleteWorkflowVisibilityRecordRequest{
264 > NamespaceId: nsID.String(),
265 > Execution: execution.GetExecution(),
266 > WorkflowStartTime: execution.StartTime,
267 > WorkflowCloseTime: execution.CloseTime,
268 > })
269 > switch err.(type) {
270 > case nil:
271 > // Indicates that main and visibility stores were in inconsistent state.
272 > metrics.DeleteExecutionsSuccessCount.With(a.metricsHandler.WithTags(metrics.NamespaceTag(nsName.String()))).Record(1)
273 > logger.Info("Workflow execution deleted from visibility.")
274 > return 1, 0
275 > case *serviceerror.NotFound:
276 > // Indicates that someone else deleted workflow execution.
277 > logger.Error("Workflow execution is not found in visibility store.")
278 > return 0, 0
279 default:
280 metrics.DeleteExecutionsFailureCount.With(a.metricsHandler.WithTags(metrics.NamespaceTag(nsName.String()))).Record(1)
go.temporal.io/server/api/historyservicemock/v1/service_grpc.pb.mock.go 13 introduced LOC · 3 ranges

Open complete file

225
226 // DeleteWorkflowVisibilityRecord mocks base method.
227 > func (m *MockHistoryServiceClient) DeleteWorkflowVisibilityRecord(ctx context.Context, in *historyservice.DeleteWorkflowVisibilityRecordRequest, opts ...grpc.CallOption) (*historyservice.DeleteWorkflowVisibilityRecordResponse, error) { service_grpc.pb.mock.go
228 > m.ctrl.T.Helper()
229 > varargs := []any{ctx, in}
230 > for _, a := range opts {
231 varargs = append(varargs, a)
232 }
233 > ret := m.ctrl.Call(m, "DeleteWorkflowVisibilityRecord", varargs...) service_grpc.pb.mock.go
234 > ret0, _ := ret[0].(*historyservice.DeleteWorkflowVisibilityRecordResponse)
235 > ret1, _ := ret[1].(error)
236 > return ret0, ret1
237 }
238
239 // DeleteWorkflowVisibilityRecord indicates an expected call of DeleteWorkflowVisibilityRecord.
240 > func (mr *MockHistoryServiceClientMockRecorder) DeleteWorkflowVisibilityRecord(ctx, in any, opts ...any) *gomock.Call { service_grpc.pb.mock.go
241 > mr.mock.ctrl.T.Helper()
242 > varargs := append([]any{ctx, in}, opts...)
243 > return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteWorkflowVisibilityRecord", reflect.TypeOf((*MockHistoryServiceClient)(nil).DeleteWorkflowVisibilityRecord), varargs...)
244 > }
245
246 // DescribeHistoryHost mocks base method.