From 467fd28e6675c1dd4106328269dfb1a404d796df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20Dub=C3=A9?= Date: Tue, 24 Dec 2024 14:48:37 +0000 Subject: [PATCH] NumberOfSyncs pause not triggered on errors --- flow/workflows/cdc_flow.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flow/workflows/cdc_flow.go b/flow/workflows/cdc_flow.go index 4526cf2b4..c10d6d1bb 100644 --- a/flow/workflows/cdc_flow.go +++ b/flow/workflows/cdc_flow.go @@ -503,12 +503,12 @@ func CDCFlowWorkflow( _ = workflow.Sleep(ctx, 30*time.Second) } else { logger.Info("sync finished") + if state.SyncFlowOptions.NumberOfSyncs > 0 { + state.ActiveSignal = model.PauseSignal + } } syncFlowFuture = nil finished = true - if state.SyncFlowOptions.NumberOfSyncs > 0 { - state.ActiveSignal = model.PauseSignal - } }) flowSignalChan.AddToSelector(mainLoopSelector, func(val model.CDCFlowSignal, _ bool) {