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

forEachCollectionFromDb() should call abandonSnapshot() before running the user provided callback

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.2.0-rc1, 4.3.1
    • Affects Version/s: None
    • Component/s: Storage
    • None
    • Fully Compatible
    • ALL
    • v4.2
    • Execution Team 2019-06-17
    • 28

      The forEachCollectionFromDb CollectionCatalog helper should abandon its snapshot before it performs the user provided callback on each collection.
      If the snapshot is not abandoned, then any newly added collections have the chance to be seen as forEachCollectionFromDb iterates over the remaining collections. This could lead to inconsistencies, such as seeing indexes in the IndexCatalog of the new collection but not seeing them on-disk due to using an older snapshot.

            Assignee:
            gregory.wlodarek@mongodb.com Gregory Wlodarek
            Reporter:
            gregory.wlodarek@mongodb.com Gregory Wlodarek
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: