Repository navigation
fix(relay): bound idle rehome polling and skip disabled scans - #20203
Conversation
|
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe regional rehome selector now returns no candidates when the global control is missing, disabled, or not yet effective. Tests cover control polling, activation, and disabling. The worker default polling interval changed from one second to six seconds. Tests verify immediate polling, six-second repetition, jitter, and shutdown behavior. Merge Risk: ⚪ Minimal · up to No actionable merge-blocking risk remains in the updated regional rehome control or polling behavior. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Description checkExplanation The description clearly explains the problem, implementation, validation, performance impact, and rollout limits. It omits the required Linked Issue, Visual Proof or exact N/A statement, and several template sections and checklist confirmations.
✨ Finishing Touches📝 Generate docstrings
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |

Setting the regional-correction cohort above zero started fleet/headroom/candidate scans on every director even while durable rehoming was disabled. During the production test, shared SQL CPU rose to 88–94%; cohort 0 was restored before enabling any migration, and CPU subsequently returned toward baseline.
Read the durable control before expensive selection and return for missing, disabled or future control. Space enabled polls by 6–7.2 seconds using the existing jitter, instead of 1–1.2 seconds. Transactional idle, capacity and enablement checks remain authoritative. This adds a few seconds of detection delay and reduces periodic scan frequency sixfold; it does not introduce a scheduler or cache.
Validation:
Deploy to the director with cohort 0 first, then repeat monitored enablement. The two upgraded cells need no additional rollout for this director-only polling change. Production migration and phone reconnection remain unproven.