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

Load views in CollectionCatalog initialization rather than Database initialization

    • Fully Compatible
    • Execution Team 2022-09-19, Execution Team 2022-10-03, Execution Team 2022-10-17
    • 60

      DatabaseImpl::init currently loads the views after the CollectionCatalog is available to access the <db>.system.views collections.

      Now that we've associated the view catalog with the collection catalog, we should change view loading to when the CollectionCatalog loads.

      -------------------------------------------------------------------------------------------------------------

      The tricky part of this may be how to identify where to find the views, since the particular <db>.system.views namespaces need to be identified first, and I don't believe we track databases in the CollectionCatalog. So we would likely have to track database names as we load Collections, and then check the databases for existing <db>.system.views collections.

      Additionally, the DurableViewCatalog dependency on the Database needs to be removed: right now DurableViewCatalog holds an internal Database*, which is only accessed to get the db name and system.views collection namespace. This should be easily remedied.

            Assignee:
            gregory.noma@mongodb.com Gregory Noma
            Reporter:
            dianna.hohensee@mongodb.com Dianna Hohensee (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: