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

Out-of-order destruction of multiple AutoGetCollectionForRead*LockFree helpers can result in unstashing the CollectionCatalog before all instances are done using it

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.9.0
    • Affects Version/s: None
    • Component/s: Storage
    • None
    • Fully Compatible
    • Execution Team 2021-02-22

      The top level AutoGetCollectionForReadLockFree instance stashes a copy of the CollectionCatalog as a shared pointer on the OperationContext. When it destructs, the stashed CollectionCatalog is removed. However, subsequently created AGCFRLR instances use the first instance's stash and do not create their own. So out of order destruction, i.e. the first instance is destroyed before the later ones, will cause the later ones to default back to the latest CollectionCatalog, no longer using consistent in-memory and on-disk state.

      Code references:

      This is important for query SBE. Currently getMore does out-of-order AGCFRLF destruction, and other cmds will in the immediate future.

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

              Created:
              Updated:
              Resolved: