[GODRIVER-2223] Use "math/rand" instead of "crypto/rand" for UUID generator Created: 09/Nov/21 Updated: 28/Oct/23 Resolved: 12/Nov/21 |
|
| Status: | Closed |
| Project: | Go Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 1.8.0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Matt Dale | Assignee: | Matt Dale |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Description |
|
The "x/mongo/driver/uuid package currently uses "crypto/rand" as its randomness source for generating UUIDs. The cryptographically secure randomness source on some systems can be extremely slow. Also, the driver sessions specification specifically suggests using a pseudo-random number generator. See a CockroachDB discussion on "crypto/rand" performance for more context. Definition of done:
|
| Comments |
| Comment by Githook User [ 16/Nov/21 ] |
|
Author: {'name': 'Matt Dale', 'email': '9760375+matthewdale@users.noreply.github.com', 'username': 'matthewdale'}Message: |
| Comment by Githook User [ 12/Nov/21 ] |
|
Author: {'name': 'Matt Dale', 'email': '9760375+matthewdale@users.noreply.github.com', 'username': 'matthewdale'}Message: |
| Comment by Matt Dale [ 11/Nov/21 ] |
|
PR: https://github.com/mongodb/mongo-go-driver/pull/803 Slight deviation from the definition of done:
|