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

Prevent layers above the catalog from directly accessing the internal CollectionCatalog

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

      Original title: Expand ConsistentCollection to the rest of entrypoints for CollectionCatalog

      Original description:

      SERVER-90992 introduced the notion of ConsistentCollection which are a special C++ type that ensures we do not have leftover Collection * once we abandon the snapshot. This is to avoid issues involving OpenedCollections as those collections have their lifetime tied to the WT snapshot and callers can't know if their collection is an opened collection or not. We only protected the main entrypoint of establishConsistentCollection since we assumed other entrypoints would not misuse the rest of the API.

      SERVER-101456 is a counterexample to that assumption as timeseries misused unwittingly the lookup* API.

      This ticket is about expanding ConsistentCollection to all methods that may return an OpenedCollection in order to clamp down on this class of bugs once and for all.

            Assignee:
            Unassigned Unassigned
            Reporter:
            jordi.olivares-provencio@mongodb.com Jordi Olivares Provencio
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: