Repository navigation
Add opt-in best-effort placement mode to WAGED rebalancer - #442
Open
LZD-PratyushBhatt wants to merge 2 commits into
Open
LZD-PratyushBhatt wants to merge 2 commits into
LZD-PratyushBhatt wants to merge 2 commits into
Conversation
Add ClusterConfigProperty.WAGED_BEST_EFFORT_PLACEMENT_ENABLED (default false) so WAGED places as many replicas as hard constraints allow instead of aborting on CAPACITY_DEFICIT or NO_CANDIDATE_NODE in skewed fault-zone or zero-spare topologies. When enabled: - Clamp negative scoring-capacity estimates, order replicas by partition ordinal and capacity-feasible active home within each state-priority tier, and break equal candidate scores by fault-zone candidate count. - Run bounded single-hop relocation when a replica has no direct candidate node, keeping enabled-live replicas off disabled or offline delayed targets. - Preserve sole surviving copies on non-modeled instances without retaining deleted or zero-replica partitions, update delayed overwrite merges for relocated live instances, and enforce cluster maxPartitionsPerInstance during bootstrap admission.
LZD-PratyushBhatt
requested review from
PranaviAncha,
arkmish,
chiragagrawal19,
kabragaurav,
laxman-ch,
ngngwr,
sjainit and
thestreak101
as code owners
November 21, 2026 04:25
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.
Adds
ClusterConfigProperty.WAGED_BEST_EFFORT_PLACEMENT_ENABLED(defaultfalse) so WAGED places as many replicas as hard constraints allow instead of failing the rebalance onCAPACITY_DEFICITorNO_CANDIDATE_NODEin skewed fault-zone or zero-spare topologies.When enabled:
minActiveReplicaoverwrite merges, preserves sole surviving copies on non-modeled instances when zero replicas fit, enforces clusterMAX_PARTITIONS_PER_INSTANCEon bootstrap admission, and keeps admin what-if and drain probes all-or-nothing.WAGED_INSTANCE_TAG_ISOLATION_ENABLEDwhen both flags are set. With the flag off, WAGED and all guardrails behave as ondev.Testing Done
TestWagedBestEffortPlacementcovers skewed fault-zone cold traps, zero-spare removal, skewed scale-up, single-hop relocation cost and live-target rules, delayed-overwrite merges, clusterMAX_PARTITIONS_PER_INSTANCEswaps,EVACUATEsole-copy preservation, trimmer change detection, and 600-node tag-clique bounds.Existing WAGED, tag-isolation, trimmer, and guardrail suites pass (160 tests), and
helix-core+helix-restcompile with--release 8and--release 11.