Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Runs SendWalHeartbeat in parallel #675

Merged
merged 3 commits into from
Nov 17, 2023
Merged

Runs SendWalHeartbeat in parallel #675

merged 3 commits into from
Nov 17, 2023

Conversation

Amogh-Bharadwaj
Copy link
Contributor

SendWalHeartbeat now runs every 10 seconds in parallel during the PeerFlow phase of CDC (after setup and snapshot)
cancelActivity is called where previously the .Get() on the activity was called in cdc_flow.go

@@ -268,6 +256,13 @@ func CDCFlowWorkflowWithConfig(
state.Progress = append(state.Progress, "executed setup flow and snapshot flow")
}

heartbeatCancelCtx, cancelHeartbeat := workflow.WithCancel(ctx)
walHeartbeatCtx := workflow.WithActivityOptions(heartbeatCancelCtx, workflow.ActivityOptions{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make start to close timeout much longer like 1 week

StartToCloseTimeout: 5 * time.Minute,
})
workflow.ExecuteActivity(walHeartbeatCtx, flowable.SendWALHeartbeat, cfg)
//walHeartbeatFuture.Get(ctx, nil)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this

err = srcConn.SendWALHeartbeat()
if err != nil {
return fmt.Errorf("failed to send WAL heartbeat: %w", err)
ticker := time.NewTicker(10 * time.Second)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make it once every 10 mins and add a log with flow job name in it

@iskakaushik iskakaushik merged commit 2b944a3 into main Nov 17, 2023
@serprex serprex deleted the walheartbeat-always branch July 19, 2024 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants