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

Timeseries bucket collection creation should respect the critical section

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 6.1.0, 7.0.0, 7.3.0-rc0, 7.2.0
    • Component/s: None
    • Labels:
    • Catalog and Routing
    • ALL
    • Hide

      Repro attached to BF.

      Repro attached to BF.
    • CAR Team 2024-01-22, CAR Team 2024-02-05, CAR Team 2024-02-19, CAR Team 2024-03-04, CAR Team 2024-04-15, CAR Team 2024-04-29
    • 14
    • 2

      Detailed description of the problem in the related BF.

      Currently, the checks of the shard version when creating the bucket namespace are not run due to the shard version not being set on the bucket namespace in the OperationShardingState. This can lead to unsharded and sharded collection creation not serializing correctly.


      The occurrence in the BF shows that this can happen when sharding a collection without timeseries options and creating a timeseries collection. However, the reverse is also true. If we are sharding a collection with timeseries options, then we will use the local catalog create timeseries command which creates the bucket namespace and then afterwards, creates the view namespace. If, after the bucket namespace is created, a create command for the view namespace (just as a regular collection) comes in, it will find the bucket namespace in the local catalog and set the shard version on the bucket namespace. The create will then only take the collection lock for the original namespace (non-bucket) and so will never check the shard version and critical section.

            silvia.surroca@mongodb.com Silvia Surroca
            allison.easton@mongodb.com Allison Easton
            0 Vote for this issue
            6 Start watching this issue