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

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

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 4.2.0, 4.4.0, 5.0.0, 6.0.0
    • Component/s: manual, Server

      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.

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

              Created:
              Updated:
              1 year, 39 weeks, 1 day ago