Skip to content

Add per-service mutex to prevent concurrent reconciliation - #57

Open
mweibel wants to merge 1 commit into
feat/explicit-k8s-versionsfrom
fix/duplicate-lb-mutex
Open

Add per-service mutex to prevent concurrent reconciliation#57
mweibel wants to merge 1 commit into
feat/explicit-k8s-versionsfrom
fix/duplicate-lb-mutex

Conversation

@mweibel

@mweibel mweibel commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

Prevents duplicate LB creation when multiple goroutines process the same service concurrently (e.g. EnsureLoadBalancer + UpdateLoadBalancer triggered by node sync).

Uses sync.Map keyed by service UID. Locks are not cleaned up on service deletion to avoid issues with late-arriving goroutines.

Includes a failing unit test that reproduces the concurrent creation race.

@mweibel
mweibel force-pushed the fix/duplicate-lb-mutex branch from f4f6bcc to 12a02c9 Compare August 28, 2026 15:22
Prevents duplicate LB creation when multiple goroutines process
the same service concurrently (e.g. EnsureLoadBalancer +
UpdateLoadBalancer triggered by node sync).

Uses sync.Map keyed by service UID. Locks are not cleaned up
on service deletion to avoid issues with late-arriving goroutines.

Includes a failing unit test that reproduces the concurrent
creation race.
@mweibel
mweibel force-pushed the fix/duplicate-lb-mutex branch from 12a02c9 to 98b6400 Compare August 28, 2026 15:45
@mweibel
mweibel changed the base branch from main to feat/explicit-k8s-versions August 28, 2026 15:47
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