From ad769d4225eba6aa02b57d6cfc0f06c302a1c6e5 Mon Sep 17 00:00:00 2001 From: Kevin Biju <52661649+heavycrystal@users.noreply.github.com> Date: Sat, 2 Dec 2023 05:46:47 +0530 Subject: [PATCH] moved watermark table creation before QRep initialization (#745) --- 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 d56404af4..9ee7d5dc0 100644 --- a/flow/workflows/qrep_flow.go +++ b/flow/workflows/qrep_flow.go @@ -407,6 +407,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) @@ -418,11 +423,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 {