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

acquireCollectionWithBucketsLookup does not use consistent collection snapshots

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.2.0-rc0
    • Affects Version/s: 8.2.0-rc0
    • Component/s: None
    • None
    • Catalog and Routing
    • Fully Compatible
    • ALL
    • CAR Team 2025-05-12
    • None
    • 3
    • TBD
    • None
    • None
    • None
    • None
    • None
    • None

      If the acquireCollectionWithBucketsLookup function is executed concurrently with a drop collection operation, it could wrongly raise a  ConflictingOperationInProgress error.

      Even if the function has a retry loop in case of a concurrent drop it could quickly run out of retry attempts and wrongly return the ConflictingOperationInProgress error.

      During this function we first (1.) lookup if the collection exists using lookupCollectionByNamespace function and then if the collection exists we use (2. ) acquireCollectionOrViewWithLockFreeRead to acquire and lock the collection. The problem is that the first lookup (1.) will include drop-pending collections (being dropped concurrently) SERVER-104827 while the second acquire operation will not include them.

            Assignee:
            tommaso.tocci@mongodb.com Tommaso Tocci
            Reporter:
            tommaso.tocci@mongodb.com Tommaso Tocci
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: