[SERVER-29910] Make RoleGraph non-copyable Created: 28/Jun/17  Updated: 30/Oct/23  Resolved: 01/Jul/17

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 3.5 Desired
Fix Version/s: 3.5.10

Type: Task Priority: Major - P3
Reporter: Sara Golemon Assignee: Sara Golemon
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Minor Change
Sprint: Platforms 2017-07-10
Participants:

 Description   

Actually copying a structure this size is unnecessarily expensive given how it's actually used. Remove copy-ability and replace with move semantics. Remove swap() method as well, replacing the one usage with a move since it's a local variable that's about to die anyway.



 Comments   
Comment by Githook User [ 01/Jul/17 ]

Author:

{u'username': u'sgolemon', u'name': u'Sara Golemon', u'email': u'sara.golemon@mongodb.com'}

Message: SERVER-29910 Make RoleGraph non-copyable (but movable)

Unrevert and apply MSVC workarounds.
Branch: master
https://github.com/mongodb/mongo/commit/be90e394a3a21ad38feed6d132e326bab27de5dd

Comment by Githook User [ 30/Jun/17 ]

Author:

{u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}

Message: Revert "SERVER-29910 Make RoleGraph non-copyable (but movable)"

This reverts commit 41cd527620d94a11362f2a5a1aa86643be22d36e.
Branch: master
https://github.com/mongodb/mongo/commit/ceb35c0db2ff109e6590028074162137c6d4add6

Comment by Sara Golemon [ 30/Jun/17 ]

RoleGraph is now non-copyable.
All usages updated.

Comment by Githook User [ 30/Jun/17 ]

Author:

{u'username': u'sgolemon', u'name': u'Sara Golemon', u'email': u'sara.golemon@mongodb.com'}

Message: SERVER-29910 Make RoleGraph non-copyable (but movable)

Changed explicit trivial constructor to `default`.
Removed explicit trivial destructor for non-virtual class.
Declared `default` move-assignment and move-constructor methods.
Removed `swap` implementations in favor of move assignment.

Removed a test which dealt specifically with copyability
since the class is no longer copyable.
Branch: master
https://github.com/mongodb/mongo/commit/41cd527620d94a11362f2a5a1aa86643be22d36e

Generated at Thu Feb 08 04:22:08 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.