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

[SERVER] Clarify contraints for uniqueness of `_id` for sharded collections

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Major - P3 Major - P3
    • None
    • 4.2.0, 4.4.0, 5.0.0, 6.0.0
    • manual, Server

    Description

      The documentation states the following, that can be confusing:

      the `_id` index only enforces the uniqueness constraint per shard if the `_id` field is not the shard key or the prefix of the shard key.

      I propose to change this paragraph with the following (or similar phrasing):

      The `_id` index guarantees uniqueness across all shards only when the shard key is exactly `_id` . In any other case - even when the `_id` field is part of a compound shard key - uniqueness is only guaranteed on a per-shard basis.

      Attachments

        Activity

          People

            Unassigned Unassigned
            pierlauro.sciarelli@mongodb.com Pierlauro Sciarelli
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              1 year, 26 weeks, 6 days ago