Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generate correct number of codes in BatchBuilder
Previously, due to a bug in the inner loop, BatchBuilder could generate more codes than were requested. This removes the inner loop in favour of a single, smarter outer loop. Instead of always creating exactly batch_size new codes, we now create up to batch_size new codes. On each loop we try to generate batch_size new potential codes and only save the ones which are unique. This should result in fewer selects in scenarios where there is contention over codes. Though this is entire system is not well suited for there to be many conflicts.
- Loading branch information