Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-81188

Embed `createCollection` in sharding create collection request

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.2.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • Sharding EMEA 2023-10-02, Sharding EMEA 2023-10-16
    • 153

      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.

            Assignee:
            enrico.golfieri@mongodb.com Enrico Golfieri
            Reporter:
            pierlauro.sciarelli@mongodb.com Pierlauro Sciarelli
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: