-
Type:
Task
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Fully Compatible
-
v7.2
-
105
-
None
-
3
-
None
-
None
-
None
-
None
-
None
-
None
The RecordId move assignment operator is a hot path. It uses a swap() function to perform the move: https://github.com/mongodb/mongo/blob/391d97d2e93fc94457c83124b90d6f0c9adee4a3/src/mongo/db/record_id.h#L133-L145
Since the moved-from RecordId object will no longer be in a valid state anyway, we only need to copy the bytes from the moved-from object rather than performing a swap.