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:
    • 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.

            Unassigned Unassigned
            yujin.kang@mongodb.com Yujin Kang Park
            0 Vote for this issue
            3 Start watching this issue