Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix rebalance crash post-2.1.0 upgrade.
If you had a builder file from an earlier version of Swift (before 6d77c37) and you attempted to rebalance it with a new version of Swift (after 6d77c37, before this commit), you could get a crash. Commit 6d77c37 changed the calculation for parts_wanted slightly (round up instead of round down), so if a rebalance is attempted without recomputing parts_wanted, then swift-ring-builder crashes. The crash only occurs if the first command run is "rebalance". Adding a device, removing a device, changing a device's weight, or changing replica count (basically, anything that gives you a reason to rebalance) will all cause parts_wanted to be recalculated, so subsequent rebalances will succeed. Change-Id: I6f7a69701f74546a00d3183aa7763e9e708408c9
- Loading branch information
Showing
2 changed files
with
36 additions
and
2 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