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

ensure 'clone' command can be used to copy catalog info (indexes, options, and views) for *all* collections in the db

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 3.6.2
    • Fix Version/s: 3.7.2
    • Component/s: Sharding
    • Labels:

      Description

      This is the 'clone' command (https://github.com/mongodb/mongo/blob/r3.6.1/src/mongo/db/commands/clone.cpp) and how it's currently used by movePrimary (https://github.com/mongodb/mongo/blob/r3.6.1/src/mongo/db/s/config/configsvr_move_primary_command.cpp#L209-L240)

      Today, movePrimary uses the 'clone' command to copy
      1) the data for all unsharded collections in the db
      2) the catalog info (indexes, options, and views) for those unsharded collections

      We want to change the second so that the catalog info for all collections (sharded and unsharded) is copied.

      This ticket should add a jstest that creates two collections with non-default options (through createCollection), and on each

      It should then shard one of the collections, call movePrimary, and demonstrate (by calling listCollections and listIndexes directly on the new primary shard) that the new primary shard copied the indexes, options, and views for both the unsharded and sharded collections.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              kaitlin.mahar Kaitlin Mahar
              Reporter:
              esha.maharishi Esha Maharishi
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: