Skip to content

Run collectReplicationLag synchronously to prevent goroutine accumulation#16

Open
dnovitski wants to merge 1 commit into
masterfrom
fix/collect-replication-lag-sync
Open

Run collectReplicationLag synchronously to prevent goroutine accumulation#16
dnovitski wants to merge 1 commit into
masterfrom
fix/collect-replication-lag-sync

Conversation

@dnovitski

Copy link
Copy Markdown
Owner

Every ticker tick spawned go collectFunc() with no guard. If collection takes longer than the tick interval, goroutines pile up with stale/out-of-order lag values. Running synchronously ensures at most one collection runs at a time.

Avoid spawning overlapping replication lag collectors on each tick.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

1 participant