-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kvserver: sensitize
AdminScatter
to force replica movement
This patch makes it such that `AdminScatter` now triggers a ~mostly random rebalance action. This has always been the contract that most of its callers (especially the `SSTBatcher`) assumed. Previously, calling `AdminScatter` would simply enqueue that range into the `replicateQueue`. The `replicateQueue` only cares about reconciling replica-count differences between stores in the cluster if there are stores that are more than 5% away from the mean. If all candidate stores were within 5% of the mean, then calling `AdminScatter` wouldn't do anything. Now, `AdminScatter` still enqueues the range into the `replicateQueue` but with an option to force it to: 1. Ignore the 5% padding provided by `kv.allocator.range_rebalance_threshold`. 2. Add some jitter to the existing replica-counts of all candidate stores. This means that `AdminScatter` now forces mostly randomized rebalances to stores that are reasonable targets (i.e. we still won't rebalance to stores that are too far above the mean in terms of replica-count, or stores that don't meet the constraints placed on the range, etc). Release note (performance improvement): IMPORTs and index backfills should now do a better job of spreading their load out over the nodes in the cluster.
- Loading branch information
1 parent
832d394
commit 73734cb
Showing
8 changed files
with
247 additions
and
36 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.