From 89bbca2251bbaa6df0733c595304ea3c49ec60da Mon Sep 17 00:00:00 2001 From: Amogh-Bharadwaj Date: Fri, 24 Nov 2023 19:49:56 +0530 Subject: [PATCH] remove search attributes --- flow/cmd/handler.go | 3 --- flow/workflows/cdc_flow.go | 14 +------------- flow/workflows/qrep_flow.go | 3 --- 3 files changed, 1 insertion(+), 19 deletions(-) diff --git a/flow/cmd/handler.go b/flow/cmd/handler.go index c021404073..13ce8115b1 100644 --- a/flow/cmd/handler.go +++ b/flow/cmd/handler.go @@ -309,9 +309,6 @@ func (h *FlowRequestHandler) ShutdownFlow( workflowOptions := client.StartWorkflowOptions{ ID: workflowID, TaskQueue: shared.PeerFlowTaskQueue, - SearchAttributes: map[string]interface{}{ - "MirrorName": req.FlowJobName, - }, } dropFlowHandle, err := h.temporalClient.ExecuteWorkflow( ctx, // context diff --git a/flow/workflows/cdc_flow.go b/flow/workflows/cdc_flow.go index 3abdf6f5e7..753cff3804 100644 --- a/flow/workflows/cdc_flow.go +++ b/flow/workflows/cdc_flow.go @@ -189,10 +189,6 @@ func CDCFlowWorkflowWithConfig( } } - searchAttributes := map[string]interface{}{ - "MirrorName": cfg.FlowJobName, - } - // start the SetupFlow workflow as a child workflow, and wait for it to complete // it should return the table schema for the source peer setupFlowID, err := GetChildWorkflowID(ctx, "setup-flow", cfg.FlowJobName) @@ -205,7 +201,6 @@ func CDCFlowWorkflowWithConfig( RetryPolicy: &temporal.RetryPolicy{ MaximumAttempts: 20, }, - SearchAttributes: searchAttributes, } setupFlowCtx := workflow.WithChildOptions(ctx, childSetupFlowOpts) setupFlowFuture := workflow.ExecuteChildWorkflow(setupFlowCtx, SetupFlowWorkflow, cfg) @@ -225,8 +220,7 @@ func CDCFlowWorkflowWithConfig( RetryPolicy: &temporal.RetryPolicy{ MaximumAttempts: 20, }, - TaskQueue: shared.SnapshotFlowTaskQueue, - SearchAttributes: searchAttributes, + TaskQueue: shared.SnapshotFlowTaskQueue, } snapshotFlowCtx := workflow.WithChildOptions(ctx, childSnapshotFlowOpts) snapshotFlowFuture := workflow.ExecuteChildWorkflow(snapshotFlowCtx, SnapshotFlowWorkflow, cfg) @@ -323,10 +317,6 @@ func CDCFlowWorkflowWithConfig( return state, err } - searchAttributes := map[string]interface{}{ - "MirrorName": cfg.FlowJobName, - } - // execute the sync flow as a child workflow childSyncFlowOpts := workflow.ChildWorkflowOptions{ WorkflowID: syncFlowID, @@ -334,7 +324,6 @@ func CDCFlowWorkflowWithConfig( RetryPolicy: &temporal.RetryPolicy{ MaximumAttempts: 20, }, - SearchAttributes: searchAttributes, } ctx = workflow.WithChildOptions(ctx, childSyncFlowOpts) syncFlowOptions.RelationMessageMapping = *state.RelationMessageMapping @@ -367,7 +356,6 @@ func CDCFlowWorkflowWithConfig( RetryPolicy: &temporal.RetryPolicy{ MaximumAttempts: 20, }, - SearchAttributes: searchAttributes, } ctx = workflow.WithChildOptions(ctx, childNormalizeFlowOpts) diff --git a/flow/workflows/qrep_flow.go b/flow/workflows/qrep_flow.go index c8a7c1023f..3b8e77a686 100644 --- a/flow/workflows/qrep_flow.go +++ b/flow/workflows/qrep_flow.go @@ -206,9 +206,6 @@ func (q *QRepFlowExecution) startChildWorkflow( RetryPolicy: &temporal.RetryPolicy{ MaximumAttempts: 20, }, - SearchAttributes: map[string]interface{}{ - "MirrorName": q.config.FlowJobName, - }, }) future := workflow.ExecuteChildWorkflow(