Operational Defect Database

BugZero found this defect 132 days ago.

MongoDB | 2540186

Implicit collection creation should respect the critical section

Last update date:

3/15/2024

Affected products:

MongoDB Server

Affected releases:

6.1.0

7.0.0

7.3.0-rc0

7.2.0

Fixed releases:

No fixed releases provided.

Description:

Info

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.

Top User Comments


Steps to Reproduce

Repro attached to BF.

Additional Resources / Links

Share:

BugZero® Risk Score

What's this?

Coming soon

Status

Backlog

Learn More

Search:

...