Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-57146

Add a way to construct a ComparableDatabaseVersion without a valid DatabaseVersion

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.0.0-rc1, 5.1.0-rc0
    • Affects Version/s: None
    • Component/s: Sharding
    • Labels:
      None
    • Fully Compatible
    • v5.0
    • Sharding EMEA 2021-05-31
    • 169

      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.

            Assignee:
            sergi.mateo-bellido@mongodb.com Sergi Mateo Bellido
            Reporter:
            sergi.mateo-bellido@mongodb.com Sergi Mateo Bellido
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: