Repository navigation
Fix strict-mode disable race - #8924
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (8)
📝 WalkthroughWalkthroughThis pull request refactors the strict mode configuration update flow into a two-phase process. The main change occurs in Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
This PR fixes the flaky test_shard_transfer_rate_limiting.
Collection::update_strict_mode_configpublished the newstrict_mode_configtoself.collection_configbefore applying the rate-limiter change to local shards.During that window
info()reported the new state whileLocalShard::read_rate_limiterwas still on the old one, causing searches to return 429 Read rate limit exceeded after a successful disable.Fix
Invert the ordering: compute the merged
StrictModeConfig, push it into every shard's rate limiter, then updateself.collection_configand persist.LocalShard::on_strict_mode_config_updatenow takes the new config as a parameter instead of re-reading the sharedArc<RwLock<CollectionConfigInternal>>.