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

Clarify statement re: creating unique indexes on sharded collections

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Duplicate
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None

    Description

      From https://github.com/mongodb/docs/blob/master/source/tutorial/enforce-unique-keys-for-sharded-collections.txt#L22 :

      MongoDB does not support creating new unique indexes in sharded
      collections and will not allow you to shard collections with unique
      indexes on fields other than the ``_id`` field.

      There seems to be one notable exception to the above statement: MongoDB 3.2 supports creating a new unique index on a sharded collection if the shard key is a prefix of the new unique index.

      Attachments

        Activity

          People

            jonathan.destefano@mongodb.com Jonathan DeStefano
            bryan.deeney@yougov.com Bryan Deeney
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              6 years, 3 weeks, 4 days ago