[SERVER-84482] convertToCapped and cloneCollectionAsCapped commands should support unsplittable tracked collections Created: 02/Jan/24  Updated: 06/Feb/24

Status: Blocked
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Enrico Golfieri Assignee: Pierlauro Sciarelli
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-85372 Make cloneCollectionAsCapped and conv... Open
depends on SERVER-84091 cloneCollectionAsCapped command stops... Closed
is depended on by SERVER-86031 Re-enable convertToCapped and cloneCo... Blocked
Duplicate
is duplicated by SERVER-85772 Allow convertToCapped to work on unsp... Closed
is duplicated by SERVER-85773 Allow cloneAsCapped to work on unspli... Closed
is duplicated by SERVER-85919 Adapt convertToCapped and cloneToCapp... Closed
Related
related to SERVER-86030 Temporarly disable convertToCapped an... Open
Assigned Teams:
Catalog and Routing
Operating System: ALL
Participants:

 Description   

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.


Generated at Thu Feb 08 06:55:09 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.