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

Collection creation within aggregations do not serialize with critical section

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.3.0-rc0
    • Affects Version/s: 6.1.0-rc0
    • Component/s: None
    • Labels:
    • Fully Compatible
    • ALL
    • v6.2
    • Sharding EMEA 2022-12-12, Sharding EMEA 2022-12-26
    • 7.5

      In SERVER-67633 we made that create collection operations serialize with the collection critical section if present. In particular in order to achieve so we made that the mongos always add shard version UNSHARDED to the create collection request that is being forwarded to the shard.
      The problem is that we forget about collection creation path that can happen during aggregation execution.

      This means that collection creation that happens as part of aggregation execution will ignore the critical section

      The goal of this ticket is to:

      • Fix the executeCommandOnDatabasePrimary. The cmdObjWithShardVersion variable is never used.
      • Ensure all creation path use the executeCommandOnDatabasePrimary wrapper and properly attach the shard version UNSHARDED.

            Assignee:
            paolo.polato@mongodb.com Paolo Polato
            Reporter:
            tommaso.tocci@mongodb.com Tommaso Tocci
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: