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

CollectionUUID and OptionalCollectionUUID add more confusion than benefit

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 5.2.0
    • None
    • None
    • Fully Compatible
    • Execution Team 2021-11-29, Execution Team 2021-12-13
    • 136

    Description

      In the codebase we have defined aliases for UUID and boost::optional<UUID>, but the compiler doesn't ensure at all that they are used properly. For example, there are many places which use boost::optional<UUID> directly as a way to indicate an optional collection UUID.

      Because of this I found myself grepping for CollectionUUID and OptionalCollectionUUID with the expectation I will find all the usages referred to by SERVER-31540 until I realised that this is not enough.

      Generally aliasing common types is not very useful, unless it is constrained to a very small piece of code (like a class).

      Attachments

        Activity

          People

            daniel.gomezferro@mongodb.com Daniel Gomez Ferro
            kaloian.manassiev@mongodb.com Kaloian Manassiev
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: