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

Add type to refer to NamespaceString and UUID

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Server Programmability

      From a recent code review for SERVER-77348:

      The way I see it, there should be only the following ways to ask for a namespace and either it should be just 1 or all, but not some combination of the three:

      Either I give you the namespace (db.coll) and I don't care what's behind, which should be 99% of the cases
      OR I give you the DB+UUID and I don't care what's the name
      OR I give you all of the above and I want them all to match

      There are a few places where we track an optional nss, dbName, and uuid, which look deceptively similar to a NamespaceStringOrUUID. We should consider introducing a new type to express the case that NamespaceStringOrUUID cannot currently handle: NamespaceString and UUID. Another choice might be to support a third state in the NamespaceStringOrUUID union (and perhaps rename that type to something like CollectionOrViewLocator).

      Examples:

            Assignee:
            Unassigned Unassigned
            Reporter:
            matt.broadstone@mongodb.com Matt Broadstone
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: