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 {