transfer_queue_active_task_executor.go ×7

Frontier kind: Code frontier

unlabeled · c_565fde4559e7

2 tests · 8882 LOC · 263 files · introduces 0 tests · 57 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
10 ranges57 lines · 2 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
1810 ranges8882 lines · 263 files · Browse complete extent
All tests (intent)
2 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: 57 introduced LOC across 10 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/service/history/transfer_queue_active_task_executor.go 45 introduced LOC · 7 ranges

Open complete file

1909 }
1910
1911 > for _, childInfo := range childInfos { transfer_queue_active_task_executor.go
1912 > err := t.applyParentClosePolicy(ctx, parentExecution, childInfo)
1913 > switch err.(type) {
1914 case nil:
1915 metrics.ParentClosePolicyProcessorSuccess.With(scope).Record(1)
1930 parentExecution *commonpb.WorkflowExecution,
1931 childInfo *persistencespb.ChildExecutionInfo,
1933 > switch childInfo.ParentClosePolicy {
1934 case enumspb.PARENT_CLOSE_POLICY_ABANDON:
1935 // noop
1936 return nil
1937
1938 > case enumspb.PARENT_CLOSE_POLICY_TERMINATE: transfer_queue_active_task_executor.go
1939 > childNamespaceID := namespace.ID(childInfo.GetNamespaceId())
1940 > if childNamespaceID.IsEmpty() {
1941 // TODO (alex): Remove after childInfo.NamespaceId is back filled. Backward compatibility: old childInfo doesn't have NamespaceId set.
1942 // TODO (alex): consider reverse lookup of namespace name from ID but namespace name is not actually used.
1947 }
1948 }
1949 > _, err := t.historyRawClient.TerminateWorkflowExecution(ctx, &historyservice.TerminateWorkflowExecutionRequest{ transfer_queue_active_task_executor.go
1950 > NamespaceId: childNamespaceID.String(),
1951 > TerminateRequest: &workflowservice.TerminateWorkflowExecutionRequest{
1952 > Namespace: childInfo.GetNamespace(),
1953 > WorkflowExecution: &commonpb.WorkflowExecution{
1954 > WorkflowId: childInfo.GetStartedWorkflowId(),
1955 > },
1956 > // Include StartedRunID as FirstExecutionRunID on the request to allow child to be terminated across runs.
1957 > // If the child does continue as new it still propagates the RunID of first execution.
1958 > FirstExecutionRunId: childInfo.GetStartedRunId(),
1959 > Reason: "by parent close policy",
1960 > Identity: consts.IdentityHistoryService,
1961 > },
1962 > ExternalWorkflowExecution: parentExecution,
1963 > ChildWorkflowOnly: true,
1964 > })
1965 > return err
1966
1967 > case enumspb.PARENT_CLOSE_POLICY_REQUEST_CANCEL: transfer_queue_active_task_executor.go
1968 > childNamespaceID := namespace.ID(childInfo.GetNamespaceId())
1969 > if childNamespaceID.IsEmpty() {
1970 // TODO (alex): Remove after childInfo.NamespaceId is back filled. Backward compatibility: old childInfo doesn't have NamespaceId set.
1971 // TODO (alex): consider reverse lookup of namespace name from ID but namespace name is not actually used.
1977 }
1978
1979 > _, err := t.historyRawClient.RequestCancelWorkflowExecution(ctx, &historyservice.RequestCancelWorkflowExecutionRequest{ transfer_queue_active_task_executor.go
1980 > NamespaceId: childNamespaceID.String(),
1981 > CancelRequest: &workflowservice.RequestCancelWorkflowExecutionRequest{
1982 > Namespace: childInfo.GetNamespace(),
1983 > WorkflowExecution: &commonpb.WorkflowExecution{
1984 > WorkflowId: childInfo.GetStartedWorkflowId(),
1985 > },
1986 > // Include StartedRunID as FirstExecutionRunID on the request to allow child to be canceled across runs.
1987 > // If the child does continue as new it still propagates the RunID of first execution.
1988 > FirstExecutionRunId: childInfo.GetStartedRunId(),
1989 > Identity: consts.IdentityHistoryService,
1990 > },
1991 > ExternalWorkflowExecution: parentExecution,
1992 > ChildWorkflowOnly: true,
1993 > })
1994 > return err
1995
1996 default:
go.temporal.io/server/api/historyservice/v1/request_response.pb.go 12 introduced LOC · 3 ranges

Open complete file

3248 }
3249
3250 > func (x *TerminateWorkflowExecutionRequest) GetExternalWorkflowExecution() *v14.WorkflowExecution { request_response.pb.go
3251 > if x != nil {
3252 > return x.ExternalWorkflowExecution
3253 > }
3254 return nil
3255 }
3256
3257 > func (x *TerminateWorkflowExecutionRequest) GetChildWorkflowOnly() bool { request_response.pb.go
3258 > if x != nil {
3259 > return x.ChildWorkflowOnly
3260 > }
3261 return false
3262 }
3552 }
3553
3554 > func (x *RequestCancelWorkflowExecutionRequest) GetExternalWorkflowExecution() *v14.WorkflowExecution { request_response.pb.go
3555 > if x != nil {
3556 > return x.ExternalWorkflowExecution
3557 > }
3558 return nil
3559 }