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

SyncFlow: top level heartbeat #2401

Merged
merged 4 commits into from
Dec 30, 2024
Merged

SyncFlow: top level heartbeat #2401

merged 4 commits into from
Dec 30, 2024

Conversation

serprex
Copy link
Contributor

@serprex serprex commented Dec 29, 2024

was seeing heartbeat timeouts

@heavycrystal
Copy link
Contributor

we lose more visibility into which phase of a batch we are in

@serprex
Copy link
Contributor Author

serprex commented Dec 29, 2024

yes, tho with parallelism heartbeats were already stepping over each other. With changes to parallelism in last normalize change I'm wanting to move towards parallelism being on by default

@iskakaushik
Copy link
Contributor

@serprex - can we have this heartbeat contain a message that shows the consolidated status of syncs and normalizes, something like:

{
   start_sync_batch_id: ...,
   start_normalize_batch_id: ...,
   current_sync_batch_id: ...,
   current_sync_batch_start_time_utc: ...,
   current_normalize_batch_id: ...,
   current_normalize_start_time_utc: ...,
   current_time_utc: ...
}

@serprex serprex force-pushed the more-aggressive-heartbeat branch from 5970177 to ac39606 Compare December 30, 2024 19:28
@serprex
Copy link
Contributor Author

serprex commented Dec 30, 2024

updated with heartbeat state I think will be useful. Temporal already has timestamps on heartbeat, no need to put timestamps in message

flow/activities/flowable_core.go Outdated Show resolved Hide resolved
flow/activities/flowable_core.go Outdated Show resolved Hide resolved
@serprex serprex force-pushed the more-aggressive-heartbeat branch from ac39606 to 6d65399 Compare December 30, 2024 22:27

var currentSyncFlowNum atomic.Int32
var totalRecordsSynced atomic.Int64
var normalizingBatchID atomic.Int64
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: could probably store some of these in substruct of FlowableActivity and keep calls clean

@serprex serprex merged commit 60e80b8 into main Dec 30, 2024
9 checks passed
@serprex serprex deleted the more-aggressive-heartbeat branch December 30, 2024 23:36
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.

3 participants