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

Query analyzer drop during dropCollection should attach session information

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0
    • Affects Version/s: 7.0.0, 8.1.0-rc0, 8.0.0
    • Component/s: None
    • None
    • Catalog and Routing
    • Fully Compatible
    • ALL
    • CAR Team 2024-10-28, CAR Team 2024-11-11
    • 1

      In the drop collection coordinator, we drop the query analyzer entry for the collection being dropped on the config server. However, we are not attaching session information to this command and the filtering is only done by namespace. This means that in certain cases, we could end up dropping the query analyzer entry for a new incarnation of the collection.

      An example of this scenario (shown in the attached repro) is:

      1. Start a drop coordinator and have it reach the point where it issues the drop over the query analyzer namespace
      2. The drop of the query analyzer entry gets stuck either in the network or on the config server
      3. The dbPrimary shard steps down, and a new primary steps up and issues a new drop (which succeeds)
      4. The drop coordinator succeeds
      5. Someone creates a new collection with the same namespace and enables the query analyzer
      6. The initial drop of the query analyzer entry completes

      In this case, we would end up executing the drop after the coordinator has completed and for a completely different instance of the collection.

            Assignee:
            paolo.polato@mongodb.com Paolo Polato
            Reporter:
            allison.easton@mongodb.com Allison Easton
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: