[SERVER-57146] Add a way to construct a ComparableDatabaseVersion without a valid DatabaseVersion Created: 23/May/21  Updated: 29/Oct/23  Resolved: 25/May/21

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 5.0.0-rc1, 5.1.0-rc0

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

Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Backport Requested:
v5.0
Sprint: Sharding EMEA 2021-05-31
Participants:
Linked BF Score: 169

 Description   

The valid DatabaseVersion will be provided later through ComparableDatabaseVersion::setVersion.

This task completes the work started on SERVER-56908: the CatalogCache needs a way to create ComparableDatabaseVersion placeholders (i.e. only have the values captured from the atomics) that will be filled later once it gets the results from the loader.

SERVER-56908 assumed that a ComparableDatabaseVersion create with an empty-constructed DatabaseVersion would be enough. However, in some situations these placeholders don't get a valid version (BF-21215, mainly when the namespace is not found) and in this case the execution violated one important invariant: each DatabaseVersion has a valid uuid.

I evaluated other alternatives such as adding a method to check whether a DatabaseVersion but concluded that the proposal above is the less bad.



 Comments   
Comment by Vivian Ge (Inactive) [ 06/Oct/21 ]

Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you!

Comment by Githook User [ 25/May/21 ]

Author:

{'name': 'Sergi Mateo Bellido', 'email': 'sergi.mateo-bellido@mongodb.com', 'username': 'smateo'}

Message: SERVER-57146 Add a way to construct a ComparableDatabaseVersion without a valid DatabaseVersion

(cherry picked from commit 1a6e08a61c138e7da0500c11de78d3489b7024d4)
Branch: v5.0
https://github.com/mongodb/mongo/commit/4a282ff7da6f00be606ff816c22e7321dd66e202

Comment by Sergi Mateo Bellido [ 25/May/21 ]

Author:

{'name': 'Sergi Mateo Bellido', 'email': 'sergi.mateo-bellido@mongodb.com', 'username': 'smateo'}

Message: SERVER-570146 Add a way to construct a ComparableDatabaseVersion without a valid DatabaseVersion
Branch: master
https://github.com/mongodb/mongo/commit/1a6e08a61c138e7da0500c11de78d3489b7024d4

Generated at Thu Feb 08 05:41:06 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.