-
-
Notifications
You must be signed in to change notification settings - Fork 198
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LeastBackupPartitioner: fix, speedup
The docs indicate that if multiple partitions have the same backup, a random partition will be chosen. The random choice was forgotten, so when things were going fast, we always chose one partition. We now choose one at random using resevoir sample with k=1 (i.e., a very easy iterative random choice). Additionally, using an interface seems to be a good bit faster than using a func. The LeastBackupPartitioner is now faster for me locally than the StickyKeyPartitioner.
- Loading branch information
Showing
3 changed files
with
56 additions
and
35 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