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

Reads concurrent with create index that also modifies multikey errors fail to find collection

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.1.0-rc0, 7.0.0-rc3
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • v7.0
    • Execution Team 2023-06-12
    • 147

      Reading concurrently with a create index DDL operation that also modifies multikey fails. There is a condition inside establishConsistentCollection when, in addition to the DDL operation, a multikey setting has also changed.

      When instantiating the collection for the read, we look for the shared index ident in both the provided IndexCatalog and inside the drop pending reaper. If it isn't found in either we will simply fail to create the collection, and lookups by UUID/Namespace will return nullptr for the remainder of this operation.

      When an index is added it will only be in the index catalog for the collection instance in the pending commit state, but latestCollection is passed to the caller here. Causing the instantiation to fail and the read believes that the collection doesn't exist.

            Assignee:
            henrik.edin@mongodb.com Henrik Edin
            Reporter:
            henrik.edin@mongodb.com Henrik Edin
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: