Multi-cluster leader election: give lock client its own rate limiter #16396
All Vouch review confidence checks passed
Residual risk 0.14 = Change Risk (0.35) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.35 · 170 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.308
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #16396"
general
weight: 0.35
acpana
When multi-cluster leader election is enabled,
cmd/managerconfigures a shared token bucket rate limiter on the manager'srest.Config. When a manager wins the lease and becomes the leader, all resource controllers start concurrently; their initial LIST and WATCH requests saturate the rate limiter token bucket. Because the multi-cluster lease lock's client previously shared the samerest.Config(and its rate limiter pointer), lease renewal requests were queued behind controller startup requests and exceeded the 10-second renew deadline, causing the manager to lose the lease and exit.This change gives the lock's client its own
rest.Configwith a dedicatedflowcontrol.RateLimiter(lockClientQPS = 20,lockClientBurst = 30), ensuring that lock heartbeats and renewals are decoupled from resource reconciliation traffic.Includes
TestMultiClusterLeaseLockHasItsOwnRateLimiterinpkg/controller/kccmanager, verifying that lock requests do not go through the shared rate limiter on the manager'srest.Config.Fixes #16392
``
release-note
``NONE
This pull request was generated by an AI coding agent.
<sub>🤖 Agent session</sub>
<!-- factory:task-output kind=Change task=recipe-fix-20261124-190007-d21c -->