From a28b3a65cdfd42c4f779fff49a3b2dec70cf4b0e Mon Sep 17 00:00:00 2001 From: Kevin Biju Date: Tue, 28 Nov 2023 21:58:23 +0530 Subject: [PATCH] moved watermark table creation before QRep initialization --- flow/workflows/qrep_flow.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/flow/workflows/qrep_flow.go b/flow/workflows/qrep_flow.go index 3b8e77a686..479b670876 100644 --- a/flow/workflows/qrep_flow.go +++ b/flow/workflows/qrep_flow.go @@ -404,6 +404,11 @@ func QRepFlowWorkflow( q := NewQRepFlowExecution(ctx, config, runUUID) + err = q.SetupWatermarkTableOnDestination(ctx) + if err != nil { + return fmt.Errorf("failed to setup watermark table: %w", err) + } + err = q.SetupMetadataTables(ctx) if err != nil { return fmt.Errorf("failed to setup metadata tables: %w", err) @@ -415,11 +420,6 @@ func QRepFlowWorkflow( return err } - err = q.SetupWatermarkTableOnDestination(ctx) - if err != nil { - return fmt.Errorf("failed to setup watermark table: %w", err) - } - logger.Info("fetching partitions to replicate for peer flow - ", config.FlowJobName) partitions, err := q.GetPartitions(ctx, state.LastPartition) if err != nil {