[SERVER-15081] Improve DiskLoc::Hasher Created: 28/Aug/14  Updated: 08/Sep/14  Resolved: 28/Aug/14

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: None
Fix Version/s: 2.7.6

Type: Improvement Priority: Major - P3
Reporter: Mathias Stearn Assignee: Mathias Stearn
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Tested
Backwards Compatibility: Fully Compatible
Participants:

 Comments   
Comment by Githook User [ 28/Aug/14 ]

Author:

{u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}

Message: SERVER-15081 Improve DiskLoc::Hasher

The old implementation had a few problems. For one thing, it generated the
same hash for DiskLoc(1,2) and DiskLoc(2,1) as the combination operation
(xor) is commutative. Additionally the low order bits of the offset have low
entropy due to powerOfTwoSizing. Even without it, they are always at least
4-byte aligned.
Branch: master
https://github.com/mongodb/mongo/commit/d2a83bba7da59ec601ec37617ce0d7ea7e2b79ac

Generated at Thu Feb 08 03:36:52 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.