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

Ensure Collections returned by CollectionCatalog are always initialised

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Catalog and Routing
    • 1

      At least in some repair paths (example), we fetch a Collection from CollectionCatalog, but then have checks to see if it is initialised, and call Collection::init otherwise. This is counterintuitive. Initialisation of Collection should only happen before it is registered in the catalog, or when creating copies within the catalog. The usual pattern is to fetch a Collection and just use it.

      Otherwise, it requires knowing we are not in an execution path where it is possible to have uninitialised collections returned.

            Assignee:
            Unassigned Unassigned
            Reporter:
            yujin.kang@mongodb.com Yujin Kang Park
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: