Operational Defect Database

BugZero found this defect 55 days ago.

MongoDB | 2621631

Do not perform collection version check for create collection

Last update date:

3/25/2024

Affected products:

MongoDB Server

Affected releases:

5.0.0

6.0.0

7.0.0

8.0.0-rc0

Fixed releases:

8.0 Required

Description:

Info

Revert SERVER-88477 once the RCA has been completed. The test was failing due to the following problem: When the mongos send a create command for a timeseries collection to the shard, it will use `executeCommandAgainstDatabasePrimary` helper. This help will attach both the database version and an UNSHARDED collection version. When the shard executes the command, it will first (1.) create the bucket collection, and then (2.) it will try to create the associated timeseries view . If the collection metadata for the view are currently unknown by, the shard will fail with StaleConfig error before actually (2.) creating the timeseries view. Leaving a bucket collection without its associate view. The reason is that before 2 we perform a AutoGetCollection that is checking the collection version. One possible solution to solve this would be to use executeDDLCoordinatorCommandAgainstDatabasePrimary instead of executeCommandAgainstDatabasePrimary to forward the create command from the router to the shard. The former is only attaching the database version and thus AutoGetCollection will only perform database version check instead of collection version check. It is correct to only perform db version check and skip collection version check in this case because we are only using cached database information to perform routing.

Top User Comments


Steps to Reproduce


Additional Resources / Links

Share:

BugZero® Risk Score

What's this?

Coming soon

Status

Open

Learn More

Search:

...