Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-15173

Investigate changes in SERVER-63732: Add new implicitlyCreateIndex and enforceUniquenessCheck to shardCollection command

      Original Downstream Change Summary

      Added 2 new fields to the shardCollection command:
      implicitlyCreateIndex: Creates an index on the shard key pattern if the collection is empty. Defaults to true.
      enforceUniquenessCheck: Controls whether this command verifies that any unique indexes are prefixed by the shard key pattern if unique is true. If true then it will verify and if false then it won't. Defaults to true.

      Not strictly required to be in 6.0 docs, but eventually in the docs. These new fields are mostly for use by cluster to cluster replication and documentation is mostly for other mongo engineers. Not sure if there's a better place to put it aside from the docs.

      Description of Linked Ticket

      implicitlyCreateIndex defaults to true and when set to false, will not create new indexes while running the shardCollection command.

      enforceUniquenessCheck defaults to true and when set to false, ignores uniqueness property when validating indexes for shardCollection.

       Regardless of both settings, shardCollection should still return an error if there are no index that is compatible with the new shard key pattern.

            Assignee:
            jocelyn.mendez@mongodb.com Jocelyn Mendez
            Reporter:
            backlog-server-pm Backlog - Core Eng Program Management Team
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              1 year, 34 weeks, 2 days ago