[SERVER-31540] Change uses of boost::optional of UUID to UUID in the sharding codebase Created: 12/Oct/17  Updated: 30/Oct/23  Resolved: 21/Oct/21

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 5.2.0

Type: Task Priority: Major - P3
Reporter: Nathan Myers Assignee: Kaloian Manassiev
Resolution: Fixed Votes: 0
Labels: techdebt
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Problem/Incident
causes SERVER-81092 Include collection namespace in balan... In Progress
Related
related to SERVER-61611 extend OpObserver::aboutToDelete() to... Closed
is related to SERVER-31191 Store the collection UUIDs in the Cat... Closed
is related to SERVER-36472 Convert OptionalCollectionUUID in OpO... Closed
is related to SERVER-42194 Make Collection always hold a UUID (r... Closed
Backwards Compatibility: Fully Compatible
Sprint: Sharding 2018-05-21, Sharding 2018-06-04, Sharding 2018-06-18, Sharding 2018-07-02, Sharding 2018-07-16, Sharding 2019-10-07, Sharding EMEA 2021-11-01
Participants:

 Description   

Numerous class members and function arguments are declared OptionalCollectionUUID or boost::optional<UUID> throughout the server. These should all be changed to UUID in 3.7, and code that checks for the presence of a value may be deleted.



 Comments   
Comment by Githook User [ 20/Oct/21 ]

Author:

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

Message: SERVER-31540 Get rid of boost::optional<UUID> from sharding code
Branch: master
https://github.com/mongodb/mongo/commit/d881f91800f3d213df8348a6acacdad9dff174da

Comment by Githook User [ 19/Oct/21 ]

Author:

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

Message: SERVER-31540 Get rid of boost::optional<UUID> from the OpObservers (Part 2)
Branch: master
https://github.com/mongodb/mongo/commit/9679e8ab24b6d990ad9379ca15ed95d26c6f1e5f

Comment by Githook User [ 19/Oct/21 ]

Author:

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

Message: SERVER-31540 Get rid of boost::optional<UUID> from the OpObservers (Part 2)
Branch: master
https://github.com/10gen/mongo-enterprise-modules/commit/db7c9c6639fe0bef88aa05b1ccc81f4cc51abb63

Comment by Githook User [ 15/Oct/21 ]

Author:

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

Message: SERVER-31540 Get rid of boost::optional<UUID> from the OpObservers
Branch: master
https://github.com/mongodb/mongo/commit/e9a8bc753f79abff3aec1eff945ca2ea7f3fd311

Comment by Githook User [ 15/Oct/21 ]

Author:

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

Message: SERVER-31540 Get rid of boost::optional<UUID> from the OpObservers
Branch: master
https://github.com/10gen/mongo-enterprise-modules/commit/4345cd7f70ed536e60dcf01a4656272050135a0d

Comment by Connie Chen [ 15/Sep/21 ]

This ticket is a huge effort, we should attempt to try and split this ticket into multiple tickets to be assigned out separately when we take this on. 

Comment by Githook User [ 24/Feb/21 ]

Author:

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

Message: SERVER-31540 Remove usages of boost::optional<UUID> from the StorageInterface
Branch: master
https://github.com/mongodb/mongo/commit/7748b1b65fd0072345755356fa043072e63f85f8

Comment by Githook User [ 23/Feb/21 ]

Author:

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

Message: SERVER-31540 Remove usages of boost::optional<UUID> from the collMod path
Branch: master
https://github.com/mongodb/mongo/commit/3ab41506ca75092c5d71877791b5b07016c2d160

Comment by Maria van Keulen [ 02/Mar/18 ]

I have removed these TODOs as a follow-on patch to SERVER-32741. The uuid field is intentionally optional in CollectionOptions because CollectionOptions is used for both parsing stored collection options and parsing user-specified collection options, and users are not allowed to define their own UUIDs.

Comment by Dianna Hohensee (Inactive) [ 01/Feb/18 ]

SERVER-32741 had to add temporary unit test code to always have UUIDs. Please remove that code in this ticket – it's marked with TODOs and SERVER-31540.

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