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

Collection acquisition establishing capped snapshot can miss collection concurrently being created

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical - P2 Critical - P2
    • 7.2.0-rc0, 7.1.0-rc3
    • None
    • None
    • None
    • Storage Execution EMEA
    • Fully Compatible
    • ALL
    • v7.1
    • Execution EMEA Team 2023-08-21, Execution EMEA Team 2023-09-04, Execution EMEA Team 2023-09-18
    • 105

    Description

      When acquiring a collection, we establish a capped snapshot if the collection requires it. When doing so, we simply look up into the collection catalog. If such a collection is concurrently being created, in the version of the collection catalog we're using it may have been added to CollectionCatalog::_pendingCommitNamespaces as a part of the pre-commit hooks. However it's possible that we haven't yet executed the commit handlers which come after committing the storage transaction. This would mean that we haven't registered the collection with the collection catalog yet; thus the aforementioned lookup in the collection catalog would not find the collection, and we would (incorrectly) not establish a capped snapshot. Then later in the collection acquisition logic we establish a consistent collection which opens the collection because it is in CollectionCatalog::_pendingCommitNamespaces. Therefore the end state of this sequence of events is that we have performed a collection acquisition on a collection which uses capped snapshots, without performing the required capped snapshot establishment.

      Attachments

        Activity

          People

            jordi.olivares-provencio@mongodb.com Jordi Olivares Provencio
            gregory.noma@mongodb.com Gregory Noma
            Votes:
            0 Vote for this issue
            Watchers:
            12 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: