[SERVER-70200] Implement UUID::Hash using bytes from UUID instead of murmur3 Created: 04/Oct/22 Updated: 29/Oct/23 Resolved: 15/Sep/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 7.2.0-rc0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Henrik Edin | Assignee: | Damian Wasilewicz |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | neweng, techdebt | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Assigned Teams: |
Storage Execution NAMER
|
| Backwards Compatibility: | Fully Compatible |
| Sprint: | Execution NAMR Team 2023-09-04, Execution NAMR Team 2023-09-18 |
| Participants: |
| Description |
|
Since UUIDs are themselves randomly generated, one alternative to generating a hash for an UUID with a traditional hash algorithm is to take 4 bytes from the UUID itself and use that as the Hash. Care would be taken to avoid copying over the portions of the UUID that are deterministically set. |
| Comments |
| Comment by Githook User [ 15/Sep/23 ] |
|
Author: {'name': 'Damian Wasilewicz', 'email': 'damian.wasilewicz@mongodb.com', 'username': 'DamianWasilewicz'}Message: |
| Comment by Damian Wasilewicz [ 07/Sep/23 ] |
|
The original ticket was to change the UUID::Hash function from murmur to absl hash, but since most of the bytes in the UUID are themselves randomly generated, it might be faster to directly use a few of these bytes as the hash rather than running a hash algorithm. |