19195 cms guardrail 6.0 - #5044
Open
nvharikrishna wants to merge 5 commits into
Open
Conversation
Adds the minimum_cms_size_fail_threshold guardrail that fails an operator-requested CMS reconfiguration (nodetool cms reconfigure / JMX) when the resulting CMS size (aggregate replication factor across DCs) would fall below the threshold. - Config-driven, default -1 (disabled); valid values are -1 or >= 3 - Enforced only on operator-initiated reconfiguration, not the automatic reconfiguration on topology changes - Skipped for clusters smaller than the threshold - Fail-only (no warning threshold) patch by nvharikrishna; reviewed by <reviewer> for CASSANDRA-19195
Move the guardrail construction and the reconfigure skip logic into a dedicated CMSSizeGuardrail class, per review (aba3e2a). Keeps the cmsSize >= totalNodes clamp rather than reintroducing the totalNodes < minCmsSize skip, so the guardrail is not silently bypassed when the configured threshold exceeds the current cluster size. The clamp needs no threshold value, so the guard() overload takes only (totalNodes, cmsSize) and CMSOperations no longer reads the threshold.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes in #4950 ported for 6.0 branch.