Repository navigation
fix(configs): reject clusters exceeding VSR replica limit - #4661
Radiancebobo wants to merge 2 commits into
Conversation
|
/skill team-review-slim |
|
/skill team-review |
|
Thanks for the PR. It is labeled If AI was used to create this PR, you must run the Slash commands (own line, regular comment) move it around the queue:
See CONTRIBUTING.md for details. |
|
|
There was a problem hiding this comment.
Summary: ClusterConfig::validate now rejects rosters above the VSR limit of 32, and a compile-time assert in core/server pins the new constant to consensus::REPLICAS_MAX. The two findings are a u8 conversion that the cap makes unreachable and an operator-facing documentation gap for the new limit.
Counts: critical 0, warning 0, nit 1, simplification 1
This review was generated by Claude Code 2.1.310 on deepseek-flash[1m]. Review the output before you act on it.
|
/request-review @hubcio |
Codecov Report✅ All modified and coverable lines are covered by tests. ❌ Your patch check has failed because the patch coverage (40.00%) is below the target coverage (50.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## master #4661 +/- ##
============================================
- Coverage 80.89% 80.56% -0.34%
+ Complexity 3107 3106 -1
============================================
Files 1465 1465
Lines 356197 356207 +10
Branches 300421 300434 +13
============================================
- Hits 288158 286990 -1168
- Misses 61207 62404 +1197
+ Partials 6832 6813 -19
🚀 New features to boost your workflow:
|
Which issue does this PR address?
Closes #4659
Rationale
VSR uses fixed-capacity structures for at most 32 replicas, but cluster configuration validation previously accepted larger rosters. A cluster with more than 32 nodes could therefore pass startup validation and later panic when a replica outside the supported range participates in a view change. Rejecting the configuration at startup makes the supported limit explicit and prevents the invalid topology from reaching consensus runtime code.
What changed?
Configuration validation now rejects enabled cluster rosters containing more than 32 nodes and prints an error that identifies the configured count and supported maximum. The configuration-layer limit is pinned to
consensus::REPLICAS_MAXwith a compile-time assertion, and tests cover acceptance at 32 nodes and rejection at 33.Local Execution
validate_accepts_the_vsr_replica_limitandvalidate_rejects_rosters_above_the_vsr_replica_limit); the configs test suite;cargo fmt --all.