Operational Defect Database

BugZero found this defect 138 days ago.

MongoDB | 2535304

cloneCollectionAsCapped must support unsplittable collections

Last update date:

3/11/2024

Affected products:

MongoDB Server

Affected releases:

No affected releases provided.

Fixed releases:

No fixed releases provided.

Description:

Info

Currently createCapped(nss) only runs on unsharded collection which before SERVER-81190 are always on the primary shard. The command works as follow: create a new collection as capped and name it to "temp" clone all the data from nss to temp rename "temp" to nss with dropTarget=true All the three operations are running locally on the owning shard. In case the unsharded collection is an unsplittable collection, the rename causes nss to have a new UUID which is not updated in the CSRS. The goal of this ticket is to change createCapped to adapt it to the new unsplittable collection. In case the collection is an unsplittable collection, a quick idea could be: change the local createCollection to shardsvrCreateCollection Block migrations for the entire cloning phase. change the local rename to shardsvrRenameCollection Additionally, both cloneToCapped and convertToCapped send commands to the dbPrimary, so if the unsplittable collection was moved, it would not work. We need to make sure that the command work on unsplittable collections not located in the primary shard.

Top User Comments


Steps to Reproduce


Additional Resources / Links

Share:

BugZero® Risk Score

What's this?

Coming soon

Status

Closed

Learn More

Search:

...