[SERVER-81188] Embed `createCollection` in sharding create collection request Created: 19/Sep/23  Updated: 08/Nov/23  Resolved: 02/Oct/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.2.0-rc0

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

Issue Links:
Depends
is depended on by SERVER-81189 Transform `create` requests in sharde... Closed
Problem/Incident
causes SERVER-82877 shardsvrCreateCollection request shou... Closed
Backwards Compatibility: Fully Compatible
Sprint: Sharding EMEA 2023-10-02, Sharding EMEA 2023-10-16
Participants:
Linked BF Score: 153

 Description   

Currently, we have the following commands/structs:

  • create: command invoked to create a collection
  • ShardCollection: struct used for the shardCollection command (client->router)
  • CreateCollectionRequest: struct used for the _shardsvrCreateCollection command (router->shard)

All of the above commands/structs contain some duplicated fields (with the same meaning and name) and some other fields (not duplicated).

Purpose of this ticket is to:

  • Unify the structs used for shardCollection and _shardsvrCreateCollection (if possible, they seem to have the exact same fields)
  • Extract a struct containing all fields of the create command
  • Chain the new struct to the shardCollection commands (removing duplicates)

This is a step towards having a unique code path for creating/sharding a collection.



 Comments   
Comment by Githook User [ 29/Sep/23 ]

Author:

{'name': 'egol', 'email': 'enrico.golfieri@mongodb.com', 'username': 'enricogolfieri'}

Message: SERVER-81188 Embed `createCollection` in sharding create collection request
Branch: master
https://github.com/mongodb/mongo/commit/28aeab50e4567929446d4be8bb67e07679a6d0e7

Comment by Githook User [ 29/Sep/23 ]

Author:

{'name': 'Pierlauro Sciarelli', 'email': 'pierlauro.sciarelli@mongodb.com', 'username': 'pierlauro'}

Message: Revert "SERVER-81188 Embed createCollection in sharding create collection request"

This reverts commit 3889d732245fef6a878d866fee20282d52a59d6b.
Branch: master
https://github.com/mongodb/mongo/commit/502583a08a08ae65e759a4dfd37524fb3a827a45

Comment by Githook User [ 28/Sep/23 ]

Author:

{'name': 'Enrico Golfieri', 'email': 'enrico.golfieri@mongodb.com', 'username': 'enricogolfieri'}

Message: SERVER-81188 Embed createCollection in sharding create collection request
Branch: master
https://github.com/mongodb/mongo/commit/3889d732245fef6a878d866fee20282d52a59d6b

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