Skip to content

Commit 99a6c65

Browse files
committed
redirectpolicy: Fix race in marking desired-skiplbs initialized
The desired-skiplbs table may not have been correctly marked initialized in cases where multiple initializers to the frontends table existed. This would've prevented the skiplbmap from being pruned by the reconciler. Fix is easy: keep the 'initWatches' non-nil until we've marked the table initialized. Signed-off-by: Jussi Maki <jussi@isovalent.com>
1 parent 1e81d0c commit 99a6c65

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

pkg/loadbalancer/redirectpolicy/controller.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,10 @@ func (c *lrpController) run(ctx context.Context, health cell.Health) error {
169169
if chanIsClosed(fesInitWatch) {
170170
// Mark desired SkipLBs as initialized to allow pruning
171171
c.desiredSkipLBInit(wtxn)
172+
173+
// All initializers marked done, we can stop tracking these.
174+
initWatches = nil
172175
}
173-
initWatches = nil
174176
}
175177
}
176178

0 commit comments

Comments
 (0)